Artificial Intelligence - A * algorithm

First, the algorithm thought

The A * algorithm is the Algorithm A cost function f (n) = g (n ) + h (n) a heuristic search algorithm obtained given some restrictions

Suppose f * (n) starting from an initial node S0, bound via a node n reaches minimum cost Sg destination node, the evaluation function f (n) is the estimate of f * (n) is. Remember

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

Wherein, g * (n) S0 is the minimum cost from the arrival of the n, h * (n) is the minimum cost to Sg, n.

If the limit were made the following algorithm A (global preferred) of g (n) and h (n):

  1. g (n) is a minimum cost g * (n) is estimated, and g (n)> 0;
  2. h (n) is the minimum cost h * (n) lower bound, i.e., for any node n have h (n) ≤h * (n).

A method called restricted to satisfy the above two A * algorithm.


Second, it can be satisfied of the A * algorithm

FIG space for any state, from the initial node when the destination node has a path to exist, if the search algorithm can always find an optimal path from the initial node to the destination node within a finite number of steps, and this path on the end of the search algorithm is said to be adopted.


Three, A * algorithm instance

Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/starter_____/article/details/91660275