Artificial Intelligence - A algorithm

First, the algorithm thought

In the state space search, if each step using the evaluation function f (n) = g (n ) + h (n) to the Open table nodes are sorted, then A algorithm. It is a heuristic search algorithm.

Algorithm type:

  • Global preferred: selecting a cost function value of all the nodes from the smallest table Open extended.
  • Partial merit: only newly generated child node selects a minimum cost function value to be extended.

Second, the global A merit-based search algorithm process

  1. Into the initial node S0 Open table, f (S0) = g (S0) + h (S0);
  2. If Open table is empty, the problem has no solution, failed to exit;
  3. The first node into Closed Open table fetch table, and referred to as the n-node;
  4. Examine whether the node is the destination node n. If so, then find a solution to the problem, successful exit;
  5. If node n can not be extended, go to (2) step;
  6. Extension node n, generating its child nodes ni (i = 1, 2, ...), each sub-node is calculated estimated value f (ni) (i = 1, 2, ...), and for each sub-node point setting a pointer to the parent node, then the child node into the Open list;
  7. The cost function value of each node, all nodes on the Open table in ascending order reordering;
  8. Rotation (2) step.

Third, the global A merit-based search algorithm searches

Here Insert Picture Description
Here Insert Picture Description

Guess you like

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