Informed (or heuristic) search strategies

It is also called heuristic search: it uses additional informations beyond problem definition.

  • f(n)f(n) is the evaluation function, It extracts from the frontier the nodes with minimum path cost. f:Nodesβ†’Rf:Nodes\rightarrow \mathbb{R}

  • g(n)g(n) is the path cost function, which is the cost to reach a node nn from the initial state. If f(n)=g(n)f(n)=g(n) then we get UCS.

  • h(n)h(n) is the heuristic function, which is an estimation of the cost of the cheapest path from node nn to a goal node.

Informed search strategies differ basing on the choice of f(n)f(n).

  • f(n)=g(n)f(n)=g(n): UCS (uninformed).

  • f(n)=h(n)f(n)=h(n): Greedy BFS. Greedy because we will select nodes of the frontier basing on our estimation of the cost to reach the goal.

  • f(n)=g(n)+h(n)f(n) = g(n) + h(n): it represent the whole path from the root node to the goal node, passing trough n. It is called A search*.

Properties of heuristic functions

#### Admissibility (tree-search)

h(n)h(n) is admissible if it never overestimates the cost of the cheapest path to get to the goal node, which means that:

βˆ€s∈S,h(s)≀Cβˆ—(s)\forall s \in S, \hspace{0.3em} h(s) \le C^*(s)

Where Cβˆ—(s)C^*(s) is the minimum cost to get from ss to a goal state. How do we find an admissible heuristic? An admissible heuristic can usually be seen as the cost of an optimal solution to a relaxed problem, obtained by removing constraints).

Tree-search is complete and optimal iff h(s)h(s) is admissible.

h(n)h(n) is consistent (or monotonic) if for every pair of nodes nn and nβ€²n' of the search tree such that nn' is a successor of nn:

With c()c() which is the cost function.

Graph-search is complete and optimal iff h(s)h(s) is complete.

Notes on h(n)h(n)

If asked to find a proper heuristic for a state space problem, it is useful to think in terms of what is the total cost of getting from the initial state to the goal state (so basically by reasoning in general about the actions we have got to perform in order to get to the goal).

Greedy BFS (GBFS)

f(n)=h(n)f(n)=h(n)

We decide which nodes to extract first basing on their heuristic function value. Similar to UCS in this regard but we're checking heuristic value instead of cost.

Properties

  • Not complete (it is if m<∞m < \infin for tree-search, and if ∣S∣<∞|S|< \infin for graph-search)

  • T(n)=S(n)=O(bm)T(n)=S(n)=O(b^m)

Node generation/extraction

  1. Node generation: add node to frontier (choosing the node with smallest hh)

  2. Node extraction: is it goal? Yes -> stop. Otherwise:

    Is it in the closed list? Yes -> skip it. Otherwise -> add it to closed list, expand.

A*

f(n)=g(n)+h(n)f(n)=g(n)+h(n)

Node extraction/generation

  1. Node generation: add node to frontier

  2. Node extraction: is it goal? Yes -> stop. Otherwise -> expand.

Notes

  • A* can be either tree-search mode, or graph-search mode. The latter has the closed list implementation.

  • A* is optimally efficient if no other optimal algorithm is guaranteed to expand fewer nodes than A* using the same heuristic.

  • Weighted A*: A* variant with the following evaluation function:

    f(n)=g(n)+Wβˆ—h(n),W>1f(n)=g(n)+W*h(n), \hspace{0.3em} W > 1

Last updated