Chapter 9. Artificial Intelligence


Types of AI

Homegrown AI

The Perfect Maze

Pathfinding Algorithms

Points to Remember

Artificial Intelligence (AI) is a machine's ability to perform tasks that we think require intelligence. For example, if in real life a cop were trying to capture someone on foot, then he would try to take all possible shortcuts. The shortcuts would depend on where he was, where he wanted to go, and his own knowledge of the area involved. In a computer game, a character can be programmed with similar behavior. That is one application of AI.

The concept of AI has been around for a long time. Noted philosophers in the 1800s debated whether machines could think. The concept of AI was thrust a little more into the public eye in the 1980s with the upsurge of arcade games. But what really got people very interested in this topic was the famed chess match that pitted IBM's Deep Blue against chess Grandmaster Garry Kasparov in 1997. Kasparov lost the six-game match, and (as they say) history was made. Since then, artificial intelligence has rooted itself even further into games much more complicated than chess. You have probably seen some pretty amazing AIs used in real-time strategy games.

Getting back to reality (meaning Flash, of course!), you probably know that as smart as you think this program is, Flash simply doesn't have the power to support an ActionScript-written, Deep Blue level of intelligence. But it can write a good enough script to help you produce the kind of AI you'd need to help make most of your games interesting and fun. Certainly there are some games in which no AI is needed, such as multiplayer checkers (because your opponent has a brain!). But for many games, even ones as simple as Pong or a basic platform game, an AI of some sort is a requirement to keep the game player engaged. In this chapter we introduce the topic of AI in Flash, mention the major flavors of AI seen in games, and give example implementations.



Macromedia Flash MX Game Design Demystified(c) The Official Guide to Creating Games with Flash
Macromedia Flash MX Game Design Demystified: The Official Guide to Creating Games with Flash -- First 1st Printing -- CD Included
ISBN: B003HP4RW2
EAN: N/A
Year: 2005
Pages: 163
Authors: Jobe Makar

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