Docsity

artifical intelligence, Lecture notes of Artificial Intelligence

Partial preview of the text

Download artifical intelligence and more Lecture notes Artificial Intelligence in PDF only on Docsity!

Artificial IntelligenceArtificial Intelligence

Heuristic Search (chapter 6.3) Heuristic Search (chapter 6.3)

Heuristic SearchHeuristic Search

“Heuristics can be said to be estimates of how far the goal state is. Heuristics basically predict how far the goal state maybe or how much it will cost to get to the goal state from a particular node.”

“the efficiency of the algorithm depends on the quality of the

heuristic. The nearer the heuristic is to the actual cost, the

better is the speed of the algorithm”

6.3.2 A* Search6.3.2 A* Search

A* Search also makes use of a priority queue just like Uniform Cost Search with the element
stored being the path from the start state to a particular node, but the priority of an element
is not the same. In Uniform Cost Search we used the actual cost of getting to a particular
node from the start state as the priority. For A*, we use the cost of getting to a node plus the
heuristic at that point as the priority. Let n be a particular node, then we define g(n) as the
cost of getting to the node from the start state and h(n) as the heuristic at that node. The
priority thus is f(n) = g(n) + h(n). The priority is maximum when the f(n) value is least. We
use this priority queue in the following algorithm, which is quite similar to the Uniform Cost
Search algorithm

A* Search ExampleA* Search Example

S

A

C

G

B

D

State h(n) S 4 A 2 B 6 C 2 D 3 G 0 f(n) = g(n)+h(n) g(n) = the cost of getting to the node from the start state h(n) = the heuristic at that node