Artificial Intelligence for Computer Games
Craig Maloney writes "Artificial Intelligence (AI) is a very hot topic today in computer circles because of the interest in modeling behaviors on machines that we find in nature. Many books have been dedicated to studying and expanding the field of AI, but generally fall into two categories: those that concentrate on AI as a research topic, and those that concentrate on AI in the field of game development. Artificial Intelligence for Computer Games (AI for Computer Games) is unique in how it takes classical AI and merges that knowledge into AI for game development. It's an approach that will be fascinating to those currently studying AI, but the approach limits the usefulness of this book to a select audience of AI researchers interested in game development." Read on for the rest of Maloney's review.
Artificial Intelligence for Computer Games
author
John David Funge
pages
127
publisher
A K Peters, td.
rating
6
reviewer
Craig Maloney
ISBN
1568812086
summary
An introduction to Gaming Artifical Intelligence
AI for Computer Games begins with a brief introduction to the historic roles that AI has played in games such as Pac Man and Mario, and how these Non-Playable Characters (NPCs) achieved fame through their roles as NPCs. The NPCs play important roles in games, and their behavior can ultimately determine if the game is entertaining or frustrating. The author then describes the differences between the field of Artificial Intelligence as compared with Gaming Artificial Intelligence. Later he shows how these two fields can intertwine with each other, and how Gaming Artificial Intelligence can be useful to AI researchers via game-playing robots and other similar experiments. The author also introduces the architecture of the components of a game. They are:
Next, AI for Computer Games discusses NPC perception. Players in a gaming environment are hindered by what the renderer will display to them, so likewise, the NPCs should not have omniscience in the game. The author recommends a strategy for handling this for NPCs: use the render engine for determining the perception of the NPCs as well. This allows the players and NPCs to work from the same rules. The author also describes how NPCs can handle partial observability, as well as prediction.
The rest of the book deals with the NPCs' abilities to react, remember, search, and learn to the game environment. This is the heart of the book, and provides a good analysis of the various methods available to the developer to model complex behaviors. The section on learning is especially interesting, as the idea of rewarding the algorithm when it performs correctly seems both strange and obvious at the same time (although the author points out that sometimes the algorithm can do undesirable things in order to obtain that reward). There are many ideas in these sections for perfecting the AI of the game, and the author expertly describes each one and where each would best be used.
AI for Computer Games was both enlightening and frustrating at the same time. The author obviously possesses a lot of knowledge in the AI field; the frustration is in his telling of that knowledge. The book reads much like an academic paper on AI applications in games, and could put off many potential readers with its rather dense descriptions of complicated material. The book also suffers from being rather short. The book is 127 pages in total length with code snippets, diagrams, and other page artwork. The brevity makes the book easy to pick up and read for a bit, but the density ensures you'll be re-reading several chapters in order to catch what the author is trying to convey. The code snippets also suffer from brevity. The code snippets are in C++, but are primarily constructors, with precious few methods defined. The author has excellent ideas; using an environment where the player and the NPCs are equals removes much of the complexity for the example AI to handle. Unfortunately the execution in this book leaves me wanting more.
You can purchase Artificial Intelligence for Computer Games from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
AI for Computer Games begins with a brief introduction to the historic roles that AI has played in games such as Pac Man and Mario, and how these Non-Playable Characters (NPCs) achieved fame through their roles as NPCs. The NPCs play important roles in games, and their behavior can ultimately determine if the game is entertaining or frustrating. The author then describes the differences between the field of Artificial Intelligence as compared with Gaming Artificial Intelligence. Later he shows how these two fields can intertwine with each other, and how Gaming Artificial Intelligence can be useful to AI researchers via game-playing robots and other similar experiments. The author also introduces the architecture of the components of a game. They are:
- Game State: The current state of the world
- Simulator: Encodes the rules for how the game state changes, and the rules for the game (physics, etc.)
- Renderer: The display of the game
- Controllers: The player and NPC methods for interacting with the game.
Next, AI for Computer Games discusses NPC perception. Players in a gaming environment are hindered by what the renderer will display to them, so likewise, the NPCs should not have omniscience in the game. The author recommends a strategy for handling this for NPCs: use the render engine for determining the perception of the NPCs as well. This allows the players and NPCs to work from the same rules. The author also describes how NPCs can handle partial observability, as well as prediction.
The rest of the book deals with the NPCs' abilities to react, remember, search, and learn to the game environment. This is the heart of the book, and provides a good analysis of the various methods available to the developer to model complex behaviors. The section on learning is especially interesting, as the idea of rewarding the algorithm when it performs correctly seems both strange and obvious at the same time (although the author points out that sometimes the algorithm can do undesirable things in order to obtain that reward). There are many ideas in these sections for perfecting the AI of the game, and the author expertly describes each one and where each would best be used.
AI for Computer Games was both enlightening and frustrating at the same time. The author obviously possesses a lot of knowledge in the AI field; the frustration is in his telling of that knowledge. The book reads much like an academic paper on AI applications in games, and could put off many potential readers with its rather dense descriptions of complicated material. The book also suffers from being rather short. The book is 127 pages in total length with code snippets, diagrams, and other page artwork. The brevity makes the book easy to pick up and read for a bit, but the density ensures you'll be re-reading several chapters in order to catch what the author is trying to convey. The code snippets also suffer from brevity. The code snippets are in C++, but are primarily constructors, with precious few methods defined. The author has excellent ideas; using an environment where the player and the NPCs are equals removes much of the complexity for the example AI to handle. Unfortunately the execution in this book leaves me wanting more.
You can purchase Artificial Intelligence for Computer Games from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
So how many of the people out there who are designing game AI have a typical CS background and how many have been specifically trained in AI principles through their education? Along the same track, is someone interested in studying AI more likely to be employed by a game publisher when they graduate or by an actual organization doing AI work for some other application?
The section on learning is especially interesting, as the idea of rewarding the algorithm when it performs correctly seems both strange and obvious at the same time (although the author points out that sometimes the algorithm can do undesirable things in order to obtain that reward).
Genetic Algorithms will most definitely be involved in the way the gaming experience progresses.
To expand on the idea of rewarding, those genomes that are rewarded the most are then permitted to "mate" with other strong genomes, which will take into account inheritance, mutation, natural selection, and recombination (or crossover) resulting in the "smartest" population.
The fitness test could also be controlled by the player, keeping the game even more interesting, for a much longer period of time.
ZEN is a prime number in base-36
I'm still waiting for FPS bots that use Maze Theory instead of "waypoints" for navigation. If only I could code worth a damn...
Model 551, Chambered in 6mm
Learning is only a subset of artificial intelligence.
I read that preview, and it really does sound neat. However, there were a lot of "..and then suddenly, your village transformed into a city with roads and walls..." type phrases. This disturbs me a bit, as though the game were deciding "well, at this point I can't really make any changes, so things will transition to the 'next step'." That smacks of a lot of predestination, as these "expert systems" usually have. I'm not saying that I could figure out a better way, just that it would be nice if things were such that the transitions were more "real".
I just ran into this a couple hours ago today. Haven't tried it at all yet. NERO is an artificial intelligence game in which you train your armys AI to react to certain situations. Then you pit your trained army up against other peoples armies and let the AI battle it out. Looked very interesting.
*DrugCheese rants*
what if you have a pseudorandom sequence generator with the range of 0-20 (random number generator) attached to the AI
after making any intelligent weighted decision, the random number is chosen, if the number is 10 (or some arbitrary number in that range) the AI will then disregard the intelligent choice and choose some other descision with a higher weight (this could be random as well) and introduce a bit more unpredictability into the AI, and make them a bit more human, just as humans do random idiotic things sometimes in stressfull situations, sometimes resulting in good results (see: "pulling a Homer")
May you be touched by His Noodly Appendage. RAmen.
I think one of the big hurdles is the countable number of states of a digital computer versus the uncountable number for an analog computer (like the brain). We live in the digital era, but this has the side effect that we are blinding ourselves to the limitations of digital technology.
Screen resolution is a good example. The resolution of text on a computer screen is lousy compared to a printed page, but people spend so much time reading text off of their computers that they seem shocked that reading low-rez text is hard on the eyes.
I know, advancements in digital devices can make up most of the gap. You just need pixels slightly smaller than the smallest thing the eye can see. Then the digital display can equal the 'analog display' of real-world objects.
But for intelligence? We need so many states to simulate a human brain that it just isn't feasible. I guess this point isn't lost on AI researchers, who look for shortcuts and such, but it is interesting...
Wait, we were talking about game 'AI'. Game AI is like chatbot AI. It needs to be fun to play with, not necessarily smart, learning, or challenging (although those things can be fun too).
Use the Firehose to mod down Second Life stories!
It's strange. Modern game industry is obsessed with graphics, yet there is very few books that can teach you how to make a decent 3d engine (at least, I was not able to find one yet). AI, on the other hand, seems to be the most common topic.
Has anyone read Brian Greenstone's Game Programming Guide for Mac OS X? I'm curious if that is a better place to start than this book.
:)
Note: This is not a plug, I'm not the author, and your offtopic mods don't scare me.
But when the first one found a path to you, they would mark the grid point just before you with a high (but not infinite) 'cost'. Then the next enemy to plot a path to you would naturally try to avoid that spot, but would use it if there were no other choice.
Presto, enemies naturally try to come at you from multiple directions, without having to spend a lot of expensive cycles on modelling 'intelligent' coordination and strategy.
PHEM - party like it's 1997-2003!