Algorithms in a Nutshell

(Tina Meador) #1
A*Search | 197

Path Finding
in AI

Specifically, A*SEARCHchecks whether the goal state is reached only when a
board state is removed from the set ofopenboard states; this is done to ensure
that the solution represents the shortest number of moves from the initial board
state. Example 7-5 contains a sample Java implementation.

Figure 7-11. Sample A*Search tree in 8-puzzle using GoodEvaluator f*(n)

Algorithms in a Nutshell
Algorithms in a Nutshell By Gary Pollice, George T. Heineman, Stanley Selkow ISBN:
9780596516246 Publisher: O'Reilly Media, Inc.


Prepared for Ming Yi, Safari ID: [email protected]
Licensed by Ming Yi
Print Publication Date: 2008/10/21 User number: 594243
© 2009 Safari Books Online, LLC. This PDF is made available for personal use only during the relevant subscription term, subject to the Safari Terms of Service. Any other use

Free download pdf