|
Playing God <b>Mark Van de Walle</b> on Black & White's revolutionary artificial intelligence |
WHEN YOU GO to the message boards for the new game Black & White, released by Lionhead Studios earlier this month, the most popular topic around seems to be crap. In post after post, the flight, trajectory, and eventual resting place of vast quantities of virtual crap is discussed in loving detail. Villagers are pelted with crap; fields are fertilized with crap; crap is produced and promptly eaten. There's evil crap and good crap. The arrival of both is occasionally greeted with dancing from local villagers. On other occasions, crap is desired but difficult to come by. Players' avatars, in the form of cows, tigers, and apes (known collectively in Black & White-speak as "creatures"), work mightily to generate it, and get nothing but gas and maybe some embarrassed looks. FEED: The heart of the game, in a lot of ways, is the creature-learning routines. What did you do there that was new? EVANS: Well, the creatures learn in a variety of ways: -- Learning facts (that there is an enemy town behind that hill) -- Learning how to do things (how to fish, how to cast miracles) -- Learning which desires to prioritize (do you want a greedy creature? a compassionate creature? a playful creature?) -- Learning which factors should be most important for particular desires. For instance, there are lots of possible motives for [eating]: Having low energy, feeling depressed, seeing something tasty. You can [teach] your creature which factors are most important, and which to ignore. -- Learning which types of objects are most suitable for satisfying particular desires: What sorts of things are best to eat? What sorts of things should you try and help? As well as many different sorts of things to learn, there are also different types of situations which prompt a learning experience. The creature learns when he is slapped or stroked, but also, more importantly, he learns from watching what you are doing, trying to understand the motives behind your actions. So there are a variety of types of situations that can prompt a variety of types of learning. This happy bundle of learning types coexist together snugly. FEED: Do you use a variation of Artificial Life code for the creature learning, or is it something else, like a combination of pathfinding and A-Life? EVANS: To implement the creature learning, we used a combination of methods: We used perceptron training for learning desires, and symbolic (decision-tree) learning for the opinions. Perceptron training has been used before in A-Life programs like Creatures, but decision-tree learning has not to my knowledge been used before in games. FEED: As for the villagers -- how smart are they? How does their intelligence compare, in terms of its complexity, to that of the creatures? EVANS: Given how many of them coexist in a world, the villagers are very smart indeed. Like creatures, they have basic bodily desires: survival urges, urges to sleep and eat. But they also participate in a variety of group activities, both for their own sake, and for that of their colleagues. Their behavior is driven by a variety of group minds. FEED: Can you talk a bit about the group interaction among the villagers? EVANS: The town itself is a group mind, working out what needs to be done, and delegating jobs appropriately. Every time they react to something -- a friendly creature, a miracle, a house on fire -- they are controlled by a Reaction which is another type of group mind. When they dance, they are controlled by a different sort of group mind. It is these various group minds -- coexisting, shifting priority over time -- that give the villagers their varied behavior. FEED: How open-ended is the AI? Were you thinking in terms of making the AI extensible when you built the code? The AI is very extensible. If new types of objects are introduced into the game by other people, the creature will automatically know about it, and can learn how to behave towards it specifically. It is also easy to add new actions or animations to the creature. You can also add new motives and motive-factors, but these changes require a recompile. FEED: Have you been surprised by any of the creatures' -- or villagers' -- behaviors so far? EVANS: The first time the creature was put down in the game world, he just stared at his feet. I was puzzled, but after debugging found that the creature was trying to eat himself. He was hungry, and had spotted himself as a nearby convenient object! There are a number of sites on the Net, with funny unanticipated creature behavior on them. Look at Planet Black & White or Black & White Community site. FEED: How closely did you work with Peter? Or rather, how did you and Peter work together -- was it a matter of his providing an overall picture and the AI fitting into that, or did you work directly together on the larger issues of the AI? EVANS: I sit next to Peter, and I think he feels that I don't wash enough and smoke too much. We worked closely together on the villager reactivity, the alignment, and the foundation classes. Peter also helped me with the creature, introducing the critical concept of the leash. FEED: What was the most interesting AI issue you got to explore while you were working on Black & White? EVANS: The issue of empathy, the way the creature keeps a mental model of his master. FEED: Was there anything that you really wanted to include in either the creatures' or the villagers' AI that you had to leave out? EVANS: Anticipation. FEED: Can you talk a little more about that? Like what kinds of behaviors anticipation involves, etc.? EVANS: The agents in Black & White are reactive and proactive, but they are not anticipatory. They are reactive in that they respond appropriately to unusual events. They are proactive in that they decide what to do based on their desires. But they are not anticipatory: They do not plan ahead, or see the consequences of their and others' actions. They are incapable of calculating counterfactuals: "What would happen if?" So, for example, a creature might have decided to put down a rock. We need to hard-code the fact that he needs to put it down in a safe place to stop it from damaging people as it falls; if the creatures could calculate counterfactuals, they could work out that if they were to drop the rock there, it would cause damage, so they must drop it elsewhere. In future projects, we hope to build a Counterfactual Engine, which would be used by the agents so that they could be more flexible. Mark Van de Walle is a contributing editor at FEED. His book on
trailer park disasters, Magnets for Misery, will be available soon
from RE-Search/Juno Books. Other articles by Mark Van de Walle |