Algorithms in a Nutshell

(Tina Meador) #1

(^216) | Chapter 7: Path Finding in AI
One last observation is how NEGMAXhandles the leaf nodes in the game tree (e.g.,
when the decreasing value ofplyfinally hits zero). As you can see from the code in
Example 7-7, these leaf node game states are all evaluated from that final player’s
perspective, which means the selectedMoveEvaluationfor the parent nodes of
these leaf nodes is simply the maximum over these leaf nodes.
Figure 7-19. Sample NegMax exploration
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