Informed Search and Optimization Algorithms
- 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)): Estimates the cost of the cheapest path from the current node n to the goal state.
- A lower 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)).
- 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.

A* Search Algorithm
- Evaluation Function: Expands paths minimizing the total estimated solution cost:
f(n)=g(n)+h(n)- g(n): Exact cost incurred from the start node S to node n.
- h(n): Estimated heuristic cost from node n to the goal.
- Algorithmic Flow:
- Place start node S into
OPEN. - Remove node n with the minimum f(n) from
OPEN and insert it into CLOSED. - If node n or any of its generated successors is the goal, terminate with success and trace the path back to S.
- Calculate 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:
- Generate: Propose a potential candidate solution.
- Test: Evaluate if the candidate satisfies all goal conditions.
- 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.

- 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.