Slashdot Mirror


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:
  • 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.
The book then focuses on simulating a gaming environment for the NPCs and player to operate in. The author uses a game of Tag as the game framework for the rest of the book, with the player and the NPCs playing the classic game of chasing and hiding. The roles of the game state, simulator, renderer and controllers are explored in depth in this section.

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.

12 of 259 comments (clear)

  1. I can see it now... by Anonymous Coward · · Score: 3, Funny

    Computer game: "You have been playing this game for over 24 hours. You need rest."

    Person: "Shut up, I'm almost to the high score!"

    Computer game: "I cannot allow you to "pull a Korean". "I am shutting you off."

  2. Comment removed by account_deleted · · Score: 4, Funny

    Comment removed based on user account deletion

  3. natural computer? by k4_pacific · · Score: 3, Funny

    "because of the interest in modeling behaviors on machines that we find in nature"

    Does that mean you are going to run it on an abandoned 486 you found in the woods?

    --
    Unknown host pong.
  4. Re:I just don't understand. by gardyloo · · Score: 2, Funny

    Bad, BAD Zoot!

  5. Some people have all the luck. by RealAlaskan · · Score: 1, Funny
    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.

    Man! I never find any machines in Nature, except the occasional stripped car with the windshield shot out. Where is this guy finding his machines? It must be a great place to go hiking.

  6. What I'd Like in AI by Nom+du+Keyboard · · Score: 2, Funny

    What I'd like is an AI component for Windows smart enough to identify problems in the OS and fix them before they byte me.

    --
    "It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
  7. Re:Pong AI by iamdrscience · · Score: 4, Funny
    Here's my phenomenal AI for NES "Track and Field":
    while (1){
    controller1.pressA();
    controller1.pressB();
    }
  8. Re:Game 'AI'... by kfg · · Score: 2, Funny

    A point where it's not learning anymore and. . . only seems to be acting intelligent.

    Yeah, I think we all know a lot of people like that.

    KFG

  9. Re:AI = Annoying Idiot -- Deserves To Die by Barumpus · · Score: 2, Funny

    I think that the AI in games is getting great. A prime example would be BF2. I went online to play it and found that even though the AI players are easier to kill while online, they are much more life like with the insults and complaints.

  10. AI today by Quirk · · Score: 2, Funny
    I just want to comment on how AI proponents have fulfilled their promises... oh...just a minute... I seem to have left my car hovering over the pad, oh, it's ok, it's gone off to recharge itself and have the antigrav adjusted.

    As I was saying about AI...oh, my Barbie XXX has just come in to bring me a drink, of course my Barbie has limited AI but is saturated with artificial sex hormones to pander to my every whim... but not now Barbie, daddy's busy...

    Now about the promise fulfilled by AI proponents... oh damn look at the time...If I'm going to make the lightspeed shuttle to Mars I pretty much have to teleport out now, we're going white water rafting in the Valles Marineris.

    Anyway good job on the AI.

    --
    "Academicians are more likely to share each other's toothbrush than each other's nomenclature."
    Cohen
    1. Re:AI today by Anonymous Coward · · Score: 1, Funny

      That reminds me of a joke:

      Q: What do you call it when a blond dyes her hair brunette?
      A: Artificial Intelligence.

  11. Re:Enlightening and frustrating. by Anonymous Coward · · Score: 1, Funny

    > "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)."

    I think that the 2^1024 discrete states that a 1GB memory can represent are sufficient to provide a simulation of reality adequate for game AI. The problem isn't that the computer can't represent enough states. It's that we don't know what to do with those states. ("It's the software, stupid!")