Review
B000BMXJSC

Evolving with Creatures’ AI: 15 Tricks to Mutate into Your Own Game

Alex J. Champandard on October 1, 2007

The Creatures game has played a very unique role in the history of games, selling over half a million units by incorporating many ideas from academic AI. It is touted as a breakthrough in artificial life, and ranked highly on the list of Top 10 Most Influential AI Games because of it.

In Creatures, the player interacts with and teaches little “Norns,” which creates the feeling of a social and emotional experiment. This kind of gameplay is only possible thanks to the incorporation of techniques like neural networks and evolutionary algorithms. In this technical review, you’ll learn how to apply similar technology into your own games.

Relationships with the Creatures

The interaction with the Norns is arguably the most innovative part of the game. Many players develop a strong connection with their creatures. Here’s specifically how it was done.

Norn interacting with fruit

Screenshot 1: A Norn found a fruit in Creatures 3.

1) Teaching as Gameplay

The entire game revolves around the interaction with little creatures. The players follows the development of their Norn, and effectively guide it through the world, and through life. It’s rather like The Sims, but with less control!

What makes this game unique is that the creatures can learn basic verbs and actions, so the player becomes a teacher. The game is built to support the player’s role as a teacher, providing many different learning opportunities.

2) Support Social Interaction

The first way the player can interact with the Norns via the world’s objects. This is done via a user interface specifically designed for that purpose:

  • The player’s mouse changes within the world, for example as the image of a hand.

  • The player may move objects in the world by picking them up and dropping them down.

What makes this different to typical 2D games is that the Norns observe these changes and respond to them.

3) Gameplay Emphasizes Emotions

Another important way the player may teach the creatures is by reward and punishment.

“The user can attract the attention of a creature by waving the hand in front of it, or by stroking it (which generates a positive,
‘reward’ reinforcement signal) or slapping it (to generate a negative, ‘punishment’ reinforcement signal).”

This is a very emotional form of interaction, and builds a bond between the player and the creature.

4) Death Has Consequences

In many action games, death is simply a backwards step on the same path of finishing the level. In Creatures, the Norns die of old age — never to return. In fact, the biological life-cycle of real animals is simulated:

  • Life phases such as childhood, adolescence, maturity modeled.

  • The Norns get bigger on screen until they reach maturity.

  • If they survive long enough, the Norns have a senesence phase when they start dying.

These phases encourage a bond to be built between the creatures and the player.

5) Interaction Changes Over Time

The Norns have age-specific logic. Within the different life phases of each creature, their brains develop differently. This is caused by the underlying genes that model these creatures:

“Each gene’s header also contains a value determining its switch-on time. The genome is re-scanned at intervals, and new genes can be expressed to cater for changes in a creature’s structure, appearance and behavior, for example during puberty.”

This adds more variety to the gameplay, while at the same time helping the player identify with different phases of the Norn’s life.

Biological Models of Brain and Body

The Creatures series have innovated in the field of Artificial Life (A-Life) partly because of the of the underlying model that generates such interesting behaviors.

Brain Structure

Figure 1: The brain’s structure in Creatures [2].

6) Biological Plausibility is Enough

The AI in creatures features a biologically “plausible” architecture. It’s not 100% realistic, but sufficiently so to support the gameplay elements. This is obvious in:

  1. The way the creature perceives its world.

  2. The way creatures inherit characteristics from their parent.

  3. The way the creature learns new things.

As mentioned by Steve Grand in [1]:

“The network architecture was designed to be biologically plausible, and computable from the ‘bottom-up’, with very few top-down constructs.”

7) Approximate Sensors Semi-Symbolically

The game simulates sight, sound and touch for each of the Norns — which is perfect for most games. In Creatures, however, this is done in a partly symbolic, partly connectionist (two traditionally opposed approaches to AI).

  • A game entity is detected to be in the field of view using standard 2D intersection tests, and then converted into a boolean symbol.

  • The boolean symbol indicating presence is then used as the input to a connectionist model, i.e. a network with connections between neurons.

This applies to sound also: they attenuate over distance and are muffled by any objects between the creature and
the sound-source. The result is a boolean value used as input for a neuron in the network.

8) Use Modularity, Even with Neural Networks

A neural network is entirely responsible for making decisions and controlling the creatures. However, as shown in Figure 1, the neural network is built in a modular way. This helps deal with the typical unpredictability problems of neural networks, and also helps make training more accurate.

“Each creature’s brain is a heterogeneous neural network, sub-divided into objects called ‘lobes’ […] Cells in each lobe form connections to one or more of the cells in up to two other source lobes to perform the various functions and sub-functions of the net.”

In total, the model contains approximately 1000 neurons in 9 lobes, all interconnected with 5,000 synapses roughly.

9) Hand-Craft AI Logic

Even in Creatures, the neural networks are heavily tweaked and tuned during development. This is necessary no matter what kind of model is used for the AI logic. As Steve mentions in [2]:

“[The neural network] must be capable of supporting the planned brain model, i.e. the neural configuration which controls the first generation of creatures.”

So the behavior of the first Norn is heavily crafted, and then it is left to evolve over the course of the game.

10) Rely on Emergent Behaviors

The neural network brain of each creature is attached to a body, also modeled in a biologically plausible way. It has the following features:

  • The brain’s decisions are subject to hormones in the body.

  • The body may be affected by toxins injected while eating.

  • Norns have a metabolism that may be affected by bacteria in food.

Interesting behaviors emerge from combining a learning brain with a body that is a complex (but deterministic) system in itself.

The World

The world in Creatures provides a varied environment for both the player and the Norns to interact with.

Waterfall scene

Screenshot 2: Waterfall scene from Creatures 2.

11) Object-Oriented Item Behaviors

The environment in Creatures has been implemented with object-oriented programming techniques, as mentioned in [1]:

Virtual objects in the world such as toys, food, etc. have scripts attached that determine how they interact with other objects, including the creature agents and the static parts of the environment. Some objects are “automated”, such as elevators which rise/fall when a button is pressed.

This has many advantages:

  • The process of editing behaviors for objects may be divided among multiple people.

  • Other objects and environments may be added later without breaking the existing code.

  • The rules in separate objects may play together to create emergent behaviors.

Creatures implements these ideas in a statically-typed compiled language for efficiency.

12) 2D Graphics Highlight the Essence of the game

Creatures has also resisted the appeal of 3D graphics. The original game was 2D (with multiple depth levels for objects), and its successors have kept that model.

This is a wise decision for the game, as it allows the player (and the developers) to focus on the core elements of the game: the interaction with the creature and the world through a simple interface.

Evolution

In creatures, new Norns can be created based on their parents genetic traits. This provides a source variation for players who play for multiple generations.

AI Architecture

Figure 2: The architecture of the AI in Creatures [2].

13) Identify Mutable Properties

Traditional evolutionary algorithms can cause major changes in genotypes, which would result in seemingly random behaviors in the game. As mentioned in [2]:

“[Evolution] must not be too brittle—mutation and recombination should have a fair chance of constructing new systems of equal or higher utility than those of the parents.

To do this, the developers specifically identified properties that could be changed. For example, in the context of neurons in the brain:

  • The types of dendrites used as input to the neuron.

  • The expression used to calculate the neuron’s state value.

  • The threshold for calculating the output of the neuron.

  • The relaxation rate of excited neurons, and their rest state value.

This limits the evolution to a sensible set of properties on each neuron.

14) Make Crossover & Mutation Safe

In certain cases, evolution can make too dramatic changes to the genotype, which would cause the Norns‘ brains to stop working! To guard against this, Steve advocates a post-mutation check [1]:

“To prevent an excessive failure rate due to reproduction errors in critical genes, each gene is preceded
by a header which specifies which operations (omission, duplication and mutation) may be performed on it.”

These special genes must be identified by developers, but once that’s been done, they cannot be removed during evolution.

15) Focus on Visible Traits

A lot of genetic code represents the mechanics of the brain and body, but arguably the most important from the player’s perspective are the visible traits.

“Creatures are bipedal, but minor morphological details such as coloring and hair type are genetically specified. […] The life-span of each creature is genetically influenced: if a creature manages to survive to old age (measured in game-hours) then senescence genes may become active, killing the creature.”

Using the player’s expectations of such a game, the developers could identify necessary properties to model, then take them into account (e.g. draw the Norn or simulate using an additional parameter).

References

[1] Creatures: Entertainment Software Agents with Artificial Life
Stephen Grand, Dave Cliff
Autonomous Agents and Multi-Agent Systems, 1997

[2] Creatures: Artificial Life Autonomous Software Agents for Home Entertainment
Stephen Grand, D. Cliff, A. Malhotra
International Conference on Autonomous Agents, 1997

Discussion 3 Comments

Dave Mark on October 4th, 2007

I played (with) the original Creatures when it came out. It fascinated me at the time. I realized, however, that to do what they were doing from an AI level was not possible to scale to other sorts of games in the FPS and RTS genres. The processing power just wasn't there at the time. However, we are now about 6 years later and (with a nod to Mr. Gordon Moore) we have significantly more processing power available to us. Why are we not seeing more of this level of AI in other genres of games? As it simply because of the fear of the idea of what debugging this sort of behavior would entail? Maybe someone should bring this up as a "scary idea" as per another post on this site!

alexjc on October 6th, 2007

Good point Dave. Well, I can't speak on behalf on anyone else, but I think the skills that allowed Steve Grand to design this AI system aren't very commonplace. It takes a certain academic background to achieve this... As for bring this topic up elsewhere, if you want to write about it be my guest, or it could be a discussion topic! Alex

mikster on July 4th, 2008

I"ve been scouring the web for those two papers: [1] Creatures: Entertainment Software Agents with Artificial Life Stephen Grand, Dave Cliff Autonomous Agents and Multi-Agent Systems, 1997 [2] Creatures: Artificial Life Autonomous Software Agents for Home Entertainment Stephen Grand, D. Cliff, A. Malhotra International Conference on Autonomous Agents, 1997 preferably for a .pdf copy. So far, I've found [2] in html format, but no sign of [1], and CiteSeer appears to be down. Any suggestions as to where I could get a copy of [1]?

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!