PROJECTENGRAM

HEURISTICS AND A-STAR SEARCH

Heuristics and A-Star Search

Tags: #◇Computer Science #◇CSINTSY #◇Heuristics and A-Star Search #◇Problem Solving #◇M2


◇Overview

Informed search, unlike uninformed search, exploits partial knowledge about the problem to guide the exploration of the state space. This domain knowledge is often encapsulated in a heuristic function, h(s)h(s), which estimates the cost from state ss to the goal.

Greedy Best-First Search (GBFS) Expands the node that appears closest to the goal (lowest h(s)h(s)). Characteristics: Complete if the state space is finite. Not optimal. Devolves to BFS or DFS if h(s)=0h(s) = 0.

A Search* Combines Uniform Cost Search and Greedy Best-First Search by considering both the accumulated path cost g(s)g(s) and the estimated cost to the goal h(s)h(s). Characteristics: Complete for finite spaces. Optimal if the heuristic is admissible. If h(s)=0h(s) = 0, A* devolves into UCS.

Admissibility:
A heuristic h(s)h(s) is admissible if it never overestimates the true cost to reach the goal: h(s)≤h∗(s)h(s) \leq h^*(s), where h∗(s)h^*(s) is the true optimal cost.

◇Important Formulas

Heuristic Function evaluation in A Search*
f(s)=g(s)+h(s)f(s) = g(s) + h(s)
Where: g(s)g(s) = Cost accumulated from start node to current node ss. h(s)h(s) = Estimated cost from node ss to goal node.

Admissibility Condition
h(s)≤h∗(s)h(s) \leq h^*(s)

Consistency (Monotonicity) Condition
h(u)≤c(u,a,v)+h(v)h(u) \leq c(u, a, v) + h(v)
Theorem: A consistent heuristic guarantees that when A* selects a state for expansion, the optimal path to that state has already been found. No re-expansion of explored states is required.

◇Theoretical Framework: A* State Space Expansion & Evaluation

A* Min-Priority Queue Execution Pipeline

◇Worked Examples

8-Puzzle Heuristics:

  1. Number of misplaced tiles: h(s)h(s) = count of tiles not in their goal position.
  2. Total Manhattan Distance: h(s)h(s) = sum of horizontal and vertical distances of each tile from its target location.

A Algorithm Walkthrough:*

  1. Add sstarts_{start} to FRONTIER with priority h(sstart)h(s_{start}).
  2. While FRONTIER is not empty:
    • Remove state ss with the lowest priority pp. Let cc be the cost up to ss.
    • If IsEnd(s)\text{IsEnd}(s) then return the solution.
    • Add ss to EXPLORED.
    • For each action a∈Actions(s)a \in \text{Actions}(s):
  • Get successor s′=Succ(s,a)s' = \text{Succ}(s, a)
  • If s′s' is not yet in EXPLORED, update s′s' in FRONTIER with priority c+Cost(s,a)+h(s′)c + \text{Cost}(s, a) + h(s').

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

How does informed search differ from uninformed search?

Q2

What is the primary characteristic of Greedy Best-First Search (GBFS)?

Q3

How does A* Search calculate the priority of a node to expand?

Q4

What happens to the A* Search algorithm if the heuristic function h(s)h(s) is always set to 0?

Q5

What does the Admissibility Condition h(s)≤h∗(s)h(s) \leq h^*(s) ensure for a heuristic?