Informed Search Strategies - Heuristic Properties, Weighted A*, and IDA*
Overview of Informed Search Strategies and Heuristic Properties
Informed Search Strategies Defined:
Informed search strategies utilize additional problem-specific knowledge beyond the core domain definition. This extra information is known as a heuristic (denoted as ).
Heuristics guide search algorithms toward goal states more efficiently than uninformed search methods.
Heuristic Admissibility:
Definition: A heuristic is admissible if it never overestimates the true cost to reach the nearest goal state. Formally, satisfies , where is the true optimal path cost from node to the goal.
Impact on Search: Admissibility guarantees that search will return an optimal solution when searching tree structures or graphs without closed list restrictions.
Impact on Greedy Search: While Greedy Best-First Search does not guarantee optimality even with an admissible heuristic, using an admissible heuristic significantly improves practical efficiency, helping the search locate solutions faster while minimizing overall path cost.
Heuristic Dominance:
Definition: Given two admissible heuristics and , heuristic dominates if for all non-goal nodes .
Practical Consequence: A dominant heuristic provides estimates closer to the true path cost . Searches using a dominant heuristic expand fewer nodes on average, leading to higher efficiency and faster solution discovery.
Special Case: Zero Heuristic ():
When the heuristic is set to for all nodes , the evaluation function simplifies directly to .
This converts search into Uniform Cost Search (UCS), as the frontier priority queue orders nodes purely based on cumulative path cost .
Consistency (Monotonicity) Property and Formal Proof
Definition of Consistency (Monotonicity):
A heuristic is consistent (or monotonic) if, for every node and every successor of generated by any action : where represents the step cost of transitioning from to .
Triangle Inequality Analogy: The estimated cost of reaching the goal from must not exceed the step cost to reach a neighbor plus the estimated cost to reach the goal from .
Monotonicity of Evaluation Function :
Consistency ensures that the evaluation function is monotonically non-decreasing along any path leading to the goal.
If a heuristic is inconsistent, can fluctuate up and down along a path, causing graph search algorithms with standard closed lists to prioritize suboptimal paths.
Formal Proof of for Consistent Heuristics:
Objective: Prove that for any node and successor , .
Step 1: From the definition of consistency:
Step 2: By definition, the evaluation function at successor is:
Step 3: Express the path cost in terms of node :
Step 4: Substitute into the expression for , obtaining:
Step 5: Apply the consistency inequality to the substituted equation:
Step 6: Substitute into the right side:
Conclusion: The evaluation function along any path is non-decreasing when is consistent.
Implementing Closed Lists: Reopening Nodes and Inconsistency Handling
The Closed List Dilemma:
Tracking explored states in a closed list (or explored set) avoids redundant node expansions and infinite loops.
If a heuristic is admissible but inconsistent, standard graph search with a strict closed list can return a suboptimal solution because it discards revisited nodes that were expanded earlier via higher-cost paths.
Graph Search with Node Reopening:
To maintain optimality when consistency cannot be proven or does not hold, search must incorporate a reopening mechanism for nodes in the closed list.
Reopening Logic:
When a state is generated that already exists in the closed list, evaluate its new path evaluation score .
If f_{\text{new}}(n) < f_{\text{old}}(n), update the stored path score for state and re-insert into the frontier (reopen the node).
If , ignore the duplicate state and continue.
Illustrative Reopening Example:
Consider a graph with start node , goal , and intermediate nodes , , :
Path generates node with score . Node is expanded and placed in the closed list.
Path later generates node with path evaluation score ().
Standard closed list drops the path because is in the closed list.
Reopening closed list compares scores: 3 < 4. Node is re-added to the frontier with , preserving access to the optimal path to G$.\n\n* **Algorithmic Insights & Parameter Sensitivity**:\n * Small algorithmic adjustments (e.g., adding node reopening logic) significantly alter theoretical properties such as completeness and optimality.\n * Understanding low-level computational decisions is essential across complex algorithms, including machine learning models with hundreds of parameters.\n\n\n# Interactive Quiz and Graph Analysis\n\n* **Quiz Results & Leaderboard**:\n * **First Place**: Krishna (fastest and most correct performance).\n * **Second Place**: Ji Chen.\n * **Third Place**: Eva (competing as SSS).\n * **Other Participant**: Lou (answered 3 questions, selected 1 incorrect answer choice).\n\n* **Graph Analysis Question 1: Admissibility Verification**:\n * **Problem Statement**: Determine if the heuristic hB in the given graph is admissible.\n * **Node Breakdown**:\n * Node Ch^(C) = 1h(C) = 1 (admissible).\n * Node Ah^(A) = 6h(A) = 6 (admissible).\n * Node Bh^*(B) = 3h(B) = 5$.
Conclusion: Because h(B) = 5 > 3 = h^*(B), the heuristic overestimates the actual cost. Thus, is not admissible.
Graph Analysis Question 2: Consistency Verification:
Problem Statement: Analyze admissibility and consistency properties across nodes , , , , .
Node Properties:
Node : , step cost .
Node : .
Consistency Evaluation at Edge : Checking direct value bounds: fails.
Admissibility Check:
Node : , (admissible).
Node : , (admissible).
Node : , (admissible underestimate).
Conclusion: The heuristic for this graph is admissible but inconsistent.
Weighted A* Search
Motivation:
Weighted Search balances the speed of Greedy Best-First Search with the optimality guarantees of Uniform Cost Search (UCS) / standard .
Introduces a weight parameter to adjust the relative influence of path cost and heuristic .
Evaluation Function Formula:
Note: Alternative formulas exist in literature (e.g., ), but the formulation above allows continuous scaling between standard algorithms across defined boundary values of :
Case : . The heuristic is ignored completely. Operates identically to Uniform Cost Search (UCS).
Case : . Reverts to classical Search.
Case : . Path cost is ignored completely. Operates identically to Greedy Best-First Search.
Case : . Weighs path cost more heavily; behaves closer to UCS, preserving optimality.
Case : . Weighs heuristic value more heavily; finds solutions faster by being greedier, but forfeits optimal path guarantees.
Trace Example for :
Start state : ,
Successor Generation: Node expands to , , .
Frontier Path Options: , , .
Execution Path: Proceeds greedily with path , reaching a solution in fewer node expansion steps than classical A^*$.\n\n* **Algorithm Properties**:\n * **Time Complexity**: Comparable to UCS or Greedy Search, depending on weight setting w.\n * **Space Complexity**: High (requires storing all open states in priority queue memory).\n * **Completeness**: Complete.\n * **Optimality**: Guaranteed if w imes 1w > 1$.
Iterative Deepening A* Search (IDA*)
Motivation:
Standard and Weighted consume large amounts of memory storing open lists in priority queues.
Depth-First Search (DFS) uses linear memory , but lacks completeness and optimality.
combines the linear space efficiency of DFS with the optimality and time properties of .
Core Mechanism:
uses the evaluation function as a cost threshold for depth-limited search passes.
The frontier is maintained as a LIFO stack (DFS structure).
During each iteration, paths are expanded depth-first until a node exceeds the threshold (f(n) > L).
Pruned nodes that exceed are not added to the stack. Their evaluation scores are recorded.
The threshold for the subsequent iteration is set to the minimum score among all nodes pruned in the current iteration.
Step-by-Step Execution Example:
Initial Setup: Start state with , .
Iteration 1 ():
Root () generates successors , , .
Calculated scores: , , f(D) = 10$.\n * All exceed threshold L = 5; all are pruned.\n * Update threshold: L_{ ext{next}} = imes(10, 6, 10) = 6$.
Iteration 2 ():
Root expands (), while () and () are pruned.
Path expands to ().
has no further successors (dead end).
Pruned values gathered: . Minimum exceeded value is 7$.\n * Update threshold: L_{ ext{next}} = 7$.
Iteration 3 ():
Stack explores .
generates (f(ABFD) = 13 > 7; pruned).
Minimum exceeded value is 10$.\n * Update threshold: L_{ ext{next}} = 10$.
Iteration 4 ():
Explores (f(ADH) > 10; pruned).
Exceeded scores: . Minimum exceeded value is 11$.\n * Update threshold: L_{ ext{next}} = 11$.
Iteration 5 ():
Threshold reaches the cost of the optimal solution path (), finding the optimal goal state instantly.
Algorithm Properties:
Completeness: Complete.
Optimality: Guaranteed if heuristic is admissible.
Space Complexity: Linear , where is the branching factor and is maximum depth. Significantly outperforms in memory efficiency.
Time Complexity: Exponential in worst-case analysis, but asymptotically comparable to in practice.
Comparative Analysis of Search Algorithms
Breadth-First Search (BFS):
Admissible/Optimal: Yes (when all step costs are equal to ).
Space Complexity: High (exponential).
Uniform Cost Search (UCS):
Admissible/Optimal: Yes (for general positive step costs).
Space Complexity: High (exponential).
Depth-First Search (DFS):
Admissible/Optimal: No.
Space Complexity: Low (linear ).
Greedy Best-First Search:
Admissible/Optimal: No.
Time Efficiency: High (fast in practice).
Space Complexity: High.
Iterative Deepening Search (IDS):
Admissible/Optimal: Yes (for uniform step costs).
Space Complexity: Low (linear).
Search:
Admissible/Optimal: Yes (with admissible heuristic).
Space Complexity: High (stores open priority queue in memory).
Search:
Admissible/Optimal: Yes (with admissible heuristic).
Space Complexity: Low (linear memory usage).
Questions & Discussion
Inconsistency vs. Admissibility Property Independence:
Question: Are admissibility and consistency completely separate properties? Can a heuristic be admissible while simultaneously being inconsistent?
Answer: Yes. Admissibility () and consistency () are distinct mathematical properties. A heuristic can never overestimate the true remaining cost (admissible) while still exhibiting local step fluctuations that violate monotonicity (inconsistent).