Unit 3
Unit 3
Uninformed – Informed –
Heuristics – Local Search Algorithms and Optimization Problems – Searching with Partial
Observations – Constraint
Satisfaction Problems – Constraint Propagation – Backtracking Search – Game Playing – Optimal
Decisions in Games
– Alpha – Beta Pruning – Stochastic Games
Problem solving in Artificial Intelligence (AI) involves techniques that enable machines to reason,
plan, and find solutions to complex tasks. These methods can be broadly categorized into search-
based, knowledge-based, and logic-based approaches.
Key Methods:
• Breadth-First Search (BFS):
• Explores all nodes at the current depth before going deeper.
• Complete and Optimal (for uniform-cost problems).
• Time/space complexity: O(b^d) where b is branching factor, d is depth.
Key Methods:
• Greedy Best-First Search:
• Selects node with lowest h(n).
Heuristics:
• Examples:
• Manhattan Distance for grid navigation.
• Misplaced tiles for 8-puzzle.
• Good heuristics = faster solutions.
Key Algorithms:
• Hill Climbing:
• Greedy local move to increase value.
• Can get stuck in local maxima/plateaus.
• Simulated Annealing:
• Similar to hill climbing but accepts worse moves occasionally.
• Probability of bad moves decreases over time (cooling schedule).
• Genetic Algorithms:
• Inspired by natural evolution.
• Maintains a population of solutions.
• Uses crossover and mutation to evolve better solutions.
• Local Beam Search:
• Keeps k states, chooses best k successors from all neighbors.
👀 4. Searching with Partial Observations
Applies when the agent has incomplete knowledge of the environment.
Concepts:
• Belief States:
• Represent sets of possible actual states.
• Contingency Planning:
• Plans for all possible outcomes of uncertain events.
• POMDPs (Partially Observable Markov Decision Processes):
• Mathematical model to handle decision making under uncertainty.
• Incorporates probabilities and observations.
Examples:
• Sudoku, Scheduling, Map Coloring.
Key Techniques:
• Backtracking Search:
• Depth-first search that backtracks when a constraint is violated.
• Constraint Propagation:
• Reduces domain of variables by enforcing constraints.
• Techniques:
• Forward Checking: Prune values that will lead to failure.
• Arc Consistency (AC-3): Makes sure binary constraints are satisfied.
• Heuristics in CSPs:
• Minimum Remaining Values (MRV): Choose variable with fewest legal values.
• Degree Heuristic: Pick variable involved in most constraints.
• Least Constraining Value: Choose value that rules out fewest options.