FUNDAMENTALS OF GAME DESIGN, SECOND EDITION
Artificial Life Games
Artificial life is a branch of computer science research, just as artificial intelligence is. Artificial life, or A-life as it is sometimes called, involves modeling biological processes, often to simulate the life cycles of living things. A-life researchers hope to discover new ways of using computers by using biological mechanisms—mutation and natural selection, for example—rather than algorithmic ones. In particular, A-life is the study of emergent properties, unanticipated qualities or behaviors that arise out of the interactions of complex systems. Life itself is considered an emergent property of the planet Earth.
Because they're intended for entertainment rather than research, commercial A-life games implement only a subset of what A-life research investigates. There aren't any commercial A-life games about observing thousands of generations of one-celled animals evolving in an environment. Typically, A-life games focus on maintaining and growing a manageable population of organisms, each of which is unique.
Artificial Pets
Artificial pets make up one subcategory of artificial life games. These simulated animals live on your computer (or mobile device), either in an environment of their own or on your desktop. They can be simulations of real animals, as in the Nintendogs game for the Nintendo DS, or fantasy ones like the Tamagotchi that inhabit a tiny and very simple electronic game built into a keychain.
Artificial pets are almost always cute. The gameplay concentrates on training, caring for, and watching the creatures do endearing things. They seldom reproduce or die (although there are exceptions, and sometimes they run away if you ignore them or mistreat them), and the player usually wants to interact with only one or two at a time. (The section "Genetic A-Life Games," later in this chapter, discusses games about whole populations of organisms in which individuals do reproduce and die.)
If the player is going to spend much time looking at an artificial pet, then the pet needs to have quite a lot of AI: a variety of things that stimulate it and behaviors that it exhibits. An artificial pet should have a number of emotions or moods that manifest themselves through the pet's behavior. The player should be able to tell, by observation, how the pet is feeling and to influence its feelings by interacting with it in different ways. The animal also needs to interact meaningfully with others of its own kind: teasing, playing, grooming, fighting, and so on. Above all, it needs to be able to learn, so there must be a way for the player to show it how to do
things. The learning process must not be too long (or the player will get frustrated and think his pet is stupid) or too short (or the player will run through everything he can teach it very quickly). Tamagotchi are exceptions to this principle, because they are very inexpensive and are intended only to provide simple interactions, not gameplay. Tamagotchi also showed that players don't necessarily need rich graphics to develop an emotional attachment to an artificial pet.
This quality of rich artificial intelligence distinguishes artificial pets from other kinds of A-life, in which individuals have simple rules but the population as a whole develops emergent properties. Artificial pets, on the other hand, can have properties that appear only after they have been around for a while, but typically these are preprogrammed and are not truly emergent.
Because an artificial pet doesn't present much of a challenge or impose a victory condition (apart from training it to do something specific), it's really a software toy rather than a game. In Nintendogs, shown in Figure 20.1, you can see two puppies, both eating from the same bowl. The game takes advantage of the Nintendo DS's two screens, one of which is touch-sensitive so that you can "pet" your dog. An artificial pet exhibits a large number of behaviors that the player sees repeatedly and others that occur more rarely. Part of balancing such a game—making sure that the player doesn't get bored with it—is making sure that these rare behaviors occur often enough that the player does get to see them but doesn't take them for granted.
The Sims
This section takes an extensive look at The Sims (and its sequels and many modules), because it is by far the most successful A-life game ever created. It is also almost the only game of its kind. There was one game a bit like The Sims called Little Computer People many years ago (it ran on the Commodore 64), but it was a much simpler game. The Sims is a virtual dollhouse: It simulates a family in a suburban home. You can make the people—each of which is called a sim—move around, cause them to complete certain tasks, tell them when to go to bed and when to get up, and so on. You can indirectly influence their relationships by making them talk to each other, but you can't decide what they will say, and you can't guarantee that they will like each other. Each simulated person comes with his or her own personality, likes, and dislikes.
The Sims offers multiple ways to play with it, a major selling point. The game includes the features of both an artificial pet and a construction and management simulation (CMS). Like a CMS, there is an economy: Sims need money to build additions to the house and to buy new furniture for it. At least one member of a Sim family earns that money by having a job. Players can spend quite a lot of time in the buying-and-building mode, if they can afford it. Some players, the particularly goal-oriented ones, really concentrate on this aspect, working hard to construct a mansion and fill it with luxuries. Others are more interested in the interactions and relationships among the sims and spend a lot of the time giving them things to do and watching their reactions.
The main challenge of The Sims is to manage this group of slightly incompetent people and to improve their career prospects by teaching them things that will help them get better jobs. In The Sims 3, each sim has six needs that she must meet on an ongoing basis: hunger, hygiene, bladder, energy level, fun, and social interaction (see Figure 20.2). These needs drive her behavior. When a sim feels a need, she takes actions to meet it. If the need goes unmet for too long, the sim becomes unhappy and can even die (in the case of an unmet hunger need). Each sim has a list of things to do to meet her current needs, with the most urgent ones at the top. The player can also give the sim orders, in effect inserting a behavior at the top of the list.
The need-based behavior simulation in The Sims is based upon pioneering work by the psychologist Abraham Maslow in the 1950s. Maslow organized human needs into a hierarchy, with physiological needs (such as oxygen and water) at the bottom, and social and psychological needs (such as love and respect) farther up. The lowest-level needs are the most urgent ones, the ones that a person must meet in order to stay alive. Other things being equal, a human will try to meet the lower needs first, but in practice, needs change over time. Once a person has fulfilled his lower-level needs, he can turn to fulfilling his higher-level ones. The Sims uses a
similar mechanism. If a sim feels both lonely and hungry, she will seek out food before social interaction, because food is a physiological need and more urgent. Once the sim has met her most urgent needs (for example, she still feels lonely but no longer feels hungry) she will then act to meet her higher-order psychological needs.
You can design such a system fairly easily. You don't have to use the needs that Maslow posited for human beings, or the ones in The Sims. A fantasy creature whose behavior is based on an animal such as ants or bees might have a completely different hierarchy of needs. It might give the safety of its colony the highest priority, and self-preservation a lower priority, for example.
Although the needs-management system is fairly simple, that doesn't mean that the creature's AI will be easy to implement. The creature still has to have enough intelligence to actually perform the behaviors required to meet its needs. If a sim is hungry in The Sims, she must know how to obtain food, and that means knowing which appliances in the house can provide it, where they are, and how to operate them.
Unlike artificial pets, sims don't need to be taught by repeatedly showing them what the player wants them to learn. Instead, the trick is finding the time for them to improve their skills, which they can do by a variety of means. The sims in the
original game have six skills: cooking, repair, charisma, body (physical strength and dexterity), logic, and creativity. These skills influence the jobs that they can take and, consequently, the amount of money that they can earn. Unfortunately, the sims stay so busy and do everything so slowly that often they don't get enough leisure time to study or work out. The game is very much an exercise in time management. By building up a sim's skills, the player can make the sim more efficient, which in turn gives the sim more free time and sometimes allows him to earn more money. In The Sims 3, the player can choose a lifetime goal for each sim that he creates and then help the sim achieve it.