Informed Search and Optimization Algorithms

Fundamentals of Informed Search

  • Informed Search (Heuristic Search): A search strategy in artificial intelligence that incorporates problem-specific knowledge to guide exploration toward promising states and reduce redundant computation.
  • Heuristic Function (h(n)h(n)): Estimates the cost of the cheapest path from the current node nn to the goal state.
    • A lower h(n)h(n) signifies that a state appears closer to the goal.
    • Heuristics provide estimated, rather than actual, remaining costs.

Greedy Best-First Search

  • Mechanism: Selects and expands the node that appears closest to the goal strictly based on the lowest heuristic estimate (h(n)h(n)).
  • Tracking Lists:
    • OPEN: Priority queue containing discovered nodes evaluated by the heuristic that have not yet been expanded.
    • CLOSED: Set of nodes that have already been evaluated and expanded.
  • Properties:
    • Combines deep exploration of depth-first search with the level-wise evaluation of breadth-first search.
    • Not optimal and can be incomplete if the heuristic is poorly designed.

Greedy Best-First Search tree traversal and heuristic estimates table

A* Search Algorithm

  • Evaluation Function: Expands paths minimizing the total estimated solution cost:
    f(n)=g(n)+h(n)f(n) = g(n) + h(n)
    • g(n)g(n): Exact cost incurred from the start node SS to node nn.
    • h(n)h(n): Estimated heuristic cost from node nn to the goal.
  • Algorithmic Flow:
    • Place start node SS into OPEN.
    • Remove node nn with the minimum f(n)f(n) from OPEN and insert it into CLOSED.
    • If node nn or any of its generated successors is the goal, terminate with success and trace the path back to SS.
    • Calculate f(n)f(n) for all new successor nodes and insert unvisited successors into OPEN.
  • Key Properties: Complete and optimal, though computationally limited by substantial memory consumption.

Generate-and-Test Technique

  • Core Three-Step Cycle:
    1. Generate: Propose a potential candidate solution.
    2. Test: Evaluate if the candidate satisfies all goal conditions.
    3. Repeat: If validation fails, produce and evaluate another candidate.
  • Operational Variants:
    • Exhaustive: Systematically tests every candidate without heuristic guidance.
    • Heuristic: Applies domain knowledge to generate promising candidates first, minimizing wasteful evaluations.
    • Plan: Assembles an upfront candidate list prior to systematic verification.

Hill Climbing Algorithm

  • Definition: A greedy local search technique that continuously moves in the direction of increasing elevation or objective value to locate the optimal solution.
  • Node State Representation: Characterized by state configuration and evaluation value.
  • Key Attributes: Variant of Generate-and-Test; operates greedily on immediate neighbor states without backtracking.

State space landscape showing local maxima, ridges, and global maxima

  • Selection Variants:
    • Simple Hill Climbing: Inspects neighboring states one at a time and moves to the first neighbor that improves upon the current value.
    • Steepest-Ascent Hill Climbing: Inspects all neighboring states and chooses the single neighbor offering the highest improvement.
    • Stochastic Hill Climbing: Chooses randomly among available improving neighbors.

Hill Climbing Landscape Challenges & Solutions

  • Local Maximum: A peak state superior to all immediate adjacent neighbors but inferior to the global maximum.
    • Solution: Implement backtracking by maintaining a list of promising paths to explore alternate routes.
  • Plateau: A flat region of identical evaluations across all neighboring states, depriving the search of directional guidance.
    • Solution: Apply variable step sizes (very large or very small steps), or jump randomly to a distant non-plateau state.
  • Ridge: A steep, elevated structure with an inclined slope higher than adjacent areas that cannot be traversed via a single basic move.
    • Solution: Execute bidirectional search or combine movements in multiple directions simultaneously.