A book on AI has to begin with a discussion of what AI is and where it has been. The first chapter does just that, giving an overview of the history of AI from 1940 onwards, including the contributions of several of the major figures in AI research (Alan Turing, Marvin Minsk, and so forth). He also makes the point that this book is going to be about weak AI, that is, "features that have been added to systems to give them intelligent qualities", as opposed to strong AI, which involves attempts at making computers think like humans. This sets up expectations for a discussion of pragmatic usages of AI techniques rather than a defense of AI as a field of study.
This book covers ten fields of AI research in 350 pages, and surprisingly, it does it well. For example, the chapter on simulated annealing is only twenty pages long, but it's twenty pages of good material. There's an application of the technique to the n-queens problem, some charts showing the decreasing energy and temperature as a simulated annealing solution progresses, and some illustrative code snippets from the sample programs.
Each chapter is concluded with a one- or two-page summary and a list of some applications of the topic. For example, the chapter on genetic algorithms (GAs) ends with a note about a symbolic problem (Towers of Hanoi) and an actual problem encountered by the author (star tracking), both of which have been addressed using GAs. This provides enough information to be useful for seeding a Google search without being overwhelming.
The chapter I liked the best was on fuzzy logic. It's a short chapter (only twenty pages) but it has some nice diagrams of membership functions, a nifty chart of the predator/prey example, and a good discussion of the sample code. Furthermore, the sample code provides several membership function profiles, so it's actually useful outside of the example; it could serve as the beginning of a fully-functional fuzzy logic library. After reading this chapter and working through the examples, I've been able to understand some discussions in other AI books on the topic with no problems. Just one minor nit: The Fuzzy Control Language (IEC 61131-7) could have been given a short mention in this chapter, but there's only so much space.
The sample programs are what really made this book valuable for me. At
least one sample program is provided to illustrate how each topic can be
applied to a problem. The programs are written in compact,
well-commented C (
make files are included), and they ran
without a hitch on my Linux workstation. I found myself reading a
section of the book, tweaking a
#define or two in the
sample program, and recompiling and rerunning to see the effects. It's
especially nice that the code is not overly complicated. There are some
structs and some pointers, but no gratuitously complex uses of macros or
setjmp()/longjmp(). The CD contains all the sample
programs, and it only holds about 400K of actual data, so it's easy to
copy the information to your hard drive and to get the samples compiled
Note that the fact that lots of actual code is provided doesn't mean that there are no theoretical underpinnings discussed. The "Ant Algorithms" chapter, for example, spends a few pages discussing Hamiltonian graphs (i.e., the Traveling Salesman problem) and shows how the ant movement algorithm is structured. The other chapters are the same, a bit of theory followed by the implementation of a sample application.
There were a few typos in the book. In one place, it looked like a code sample had been copied and pasted accidentally. The author provided me with an errata file, though, and the problems should be corrected in the second printing of the book (which was due in October 2003).
In order to study the book, I began a little Open Source project to translate the examples from C to Ruby. The author has been very supportive of this effort, and it's been a good review of C and has helped me understand the sample programs much better. I chose Ruby as the translation target because it's compact and reasonably fast, and its dynamic nature seems to lend itself well to AI programming. It's also nice not to have to compile the examples, since Ruby is interpreted.
As part of the translation project, I've included some general notes on translating C code to Ruby. There's nothing spectacular there, but there are a few things which have bitten me that other folks may find interesting.
If you're getting a PhD in computer science, this book will not go deeply enough into each topic to make you happy. But if you're a programmer who's interested in getting an overview of artificial intelligence programming techniques for use in your work, or if you're writing a game and you want to provide some semi-intelligent behavior for your non-player characters, this is an excellent investment. You'll get a good overview of how things work, and you'll have some sample code to show you how to get started.