Turn-Based Game AI


Turn -Based Game AI

Certain constraints are imposed on turn-based games that shape the way we develop an AI. For one thing, the player and the computer take turns making moves. Unlike arcade games that have to process rapidly and continuously, turn-based games can have (and often do have) more complex code. If your AI for choosing which chess piece to move takes five seconds, that should be acceptable. An analysis in an arcade game that took five seconds would make the game unmanageable.

Our game project for this chapter is going to be an AI for tic tac toe. You might be thinking that tic tac toe is a simple game; it is for a human. For a computer, the task is somewhat more complicated. Building an AI for such a simple game can be similarly complex. It will probably be one of the more challenging applications in the book. The good news, though, is that after you've implemented tic tac toe, taking the script a step or two further to implement games such as checkers or Connect 4 isn't bad. To start the process of learning to build our own AI, we first need to review some of the basic scripting theory involved.




Macromedia Flash MX 2004 Game Programming
Macromedia Flash MX 2004 Game Programming (Premier Press Game Development)
ISBN: 1592000363
EAN: 2147483647
Year: 2004
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net