The sub-title of this book is Synthetic Creatures with Learning and Reactive Behaviors. The book covers what it calls “nouvelle AI” and reactive techniques, as opposed to planning and searching.
Instead of dry theory the book tries to show the AI techniques in real applications, which is a great idea. The theme is creating a shooting NPC (non-player character, also referred to as an “animat") for the game of Quake and it is quite possible there are real-world military applications. Now, call me a liberal, loonie pacifist—you can even call me French if you like—but I had trouble getting excited by this.
The book is divided into 8 sections, each of which approach one part of the problem, and generally show one AI technique. The AI technique chosen is not always the best match for the problem but I had no issue with that.
Section I is the overview. Four boring chapters of repetitive advocacy. The author also introduces FEAR, which is the open-source framework used throughout the book, and is available at http://fear.sf.net
Section II is about moving and navigation. Mostly tedious. The AI technique is rule-based systems.
Section III covers shooting, and the AI technique is neural nets. The maths gets a bit heavy but I found these the first chapters worth reading in the book.
Section IV is on weapon selection. The techniques are scripting and decision trees. The latter were interesting but I found the explanations lacking enough clarity for me to grasp them on a first read. Feel free to call me stupid.
Section V is on using objects and defensive actions. The topics covered are fuzzy logic and genetic algorithms. Some good chapters here.
Section VI is on emotions and the technique is finite state machines. Quite good, though state machines seem better suited to some of the other problems rather than emotions.
Section VII brings it altogether: choosing when you should move, when to shoot, when to run away. The technique is reinforcement learning. Some nice diagrams but there seemed lots of overlap with earlier sections in the techniques shown.
Section VIII is summary. Nothing special.
There is a web site for the book at http://AiGameDev.com/ which allows you to download the source code. I had a brief look at the source code and it seems to be well written. I didn’t try compiling any of it (Windows, Visual C++ only apparently).
I have three main problems with this book. First is that, while there is some pseudo code, there is no source code. Even I am surprised that it bothers me because one of my pet hates is books that kill innocent trees to show the same source code over and over. You know the kind of thing: “Listing one shows how to write a server in just 400 lines. Now let’s add 5 lines to show how it can restrict access by IP: see the 405 lines in listing two.” But there is a balance to be struck and AI Game Development goes too far the other way. In many places I was in desperate need of some concrete C++ code to help me understand the Greek-letter mathematics or the vague English algorithm description.
That brings me to the second problem, which is that the writing is not good. It is a first draft that has not been edited on any level: there were typos, there was poor grammar (this is not just tedious to read, it also made it hard to follow paragraphs of the form: A. But B. However C. Yet D.), and at a higher level the writing was repetitive. Frequently I saw a group of three or four paragraphs, all saying roughly the same thing, that could have been written more clearly in half the space.
My third complaint is that there were no quantitative results. The conclusion at the end of each section maybe had a fuzzy description of how well the techniques worked. The counter-argument that these things are hard to measure and that you can only judge the difference by playing a death-match against the animat you have made is not true. For instance you can run a 1000 games pairing each animat against others, in different environments, and report the winning percentage. Currently not all source code is available for download on the web site. Perhaps the author wrote the book first and so would not have been able to include results?
But despite those problems the book is still quite good. The later sections of the book are better than the early sections and the few good chapters are good: I will come back and read them again and study their source code. In summary I can recommend this book if you are interested in the theme and the AI techniques presented; just brace yourself for the fuzziness.


AI Game Development by Alex J. Champandard
Hardware Hacking Projects for Geeks by Scott Fullam.
PC Annoyances by Steve Bass.
Google Pocket Guide by Tara Calishain, Rael Dornfest & DJ Adams.
The Photoshop Book for Digital Photographers by Scott Kelby.
Mac OS X Hacks by Rael Dornfest, Kevin Hemenway
Linux Server Hacks by Rob Flickenger.
Digital Video Pocket Guide by Derrick Story.
PHP Pocket Reference, 2nd Edition by Rasmus Lerdorf.
Actionscript Cookbook by Joey Lott.
Outlook Pocket Guide by Walter Glenn.
Designing With Web Standards by Jeffrey Zeldman.
PHP Cookbook by Adam Trachtenberg and David Sklar.


