Fundamental Approaches to Problem Solving in Artificial Intelligence
Dr. Dhaval Patel • 2025
Today we'll explore two powerful ways that computers solve complex problems and make smart decisions.
Systematic Problem Solving Through Constraint Propagation
Think of constraint satisfaction problems like solving puzzles with rules. You have to find solutions that follow all the rules at the same time.
Unlike finding the shortest path, constraint problems focus on finding any solution that works rather than finding the best route to get somewhere.
Variables: The things you need to assign values to
Domains: The possible choices for each thing
Constraints: The rules that limit our choices
Solving these problems means finding choices that make all the rules happy at the same time.
Constraint satisfaction problems form the computational foundation for numerous AI applications where intelligent agents must make decisions under complex restrictions.
The ability to model real-world problems as constraint satisfaction problems and apply systematic search with backtracking is essential for developing robust, scalable AI systems that can handle complex decision-making scenarios.
Backtracking is like smart trial and error. Instead of trying everything randomly, we learn from our mistakes and avoid making the same errors again.
Understanding when to go back and try something different is crucial for solving complex puzzles efficiently.
Setting up a problem correctly is half the battle. If you describe the problem wrong, even the best solution methods won't work well.
Master this systematic approach before jumping into specific problems. A well-described problem is much easier to solve.
Systematic Constraint Checking and Conflict Resolution
Variables: V = {1, 2, 3, 4}
Domain: D = {Red, Green, Blue}
Constraints:
Understanding how graph coloring relates to scheduling, register allocation, and frequency assignment problems demonstrates the practical importance of this fundamental CSP.
The systematic approach to constraint checking and conflict resolution in graph coloring translates directly to these complex real-world scenarios.
Start with all nodes having full domain: {Red, Green, Blue}. No assignments made yet, all possibilities remain open.
Make first assignment. Apply constraint propagation: adjacent nodes (2, 3) can no longer be Red.
Choose Green for node 2. Propagate constraint: node 4 (adjacent to 2) cannot be Green.
Assign Blue to node 3. Propagate: node 4 (adjacent to 3) cannot be Blue. Domain becomes {Red}.
Node 4 automatically gets Red (only remaining option). Verify all constraints satisfied.
Understanding conflict scenarios and recovery mechanisms is essential for mastering constraint satisfaction algorithms.
Consider a different assignment sequence for our 4-node graph:
This systematic process ensures we explore all possibilities without missing valid solutions.
Complex Constraint Propagation and Intelligent Backtracking
Cryptarithmetic puzzles are like secret codes where letters hide numbers. You need to figure out which number each letter represents to make the math work correctly.
These puzzles teach us advanced problem-solving skills like making smart guesses, systematic backtracking, and rule checking.
Key Insight: The leftmost result is O, so T + G must generate exactly 10 (carry of 1).
In position: T + G = O (with possible carry from right)
Since result starts with O, and we need single carry: O = 1
Since T + G = 10 and digits are 0-9, and O = 1:
The equation becomes: T = O + O = 1 + 1 = 2
From T + G = 10 and T = 2:
2 + G = 10, therefore G = 8
Rightmost: O + O = UT (where T=2, O=1)
1 + 1 = 2, but we need carry generation: U = 0
Check: 21 + 81 = 102 ✓
All constraints satisfied: unique digits, valid arithmetic, single carry
Strategic Action Sequence Generation for Goal Achievement
Questions & Discussion
Continue exploring AI • Build intelligent systems • Shape the future