"I wrote the artificial intelligence for Halo 1," Chris explains. "Basically, it is a very specialized type of intelligence. There was a custom piece of code for each character." In "Halo 2," Chris broadened the AI he built for the first game. The first thing to understand about the AI characters in Halo is this: "The AI lives in a simulated world."
Most first person shooter games, such as Quake or Unreal, are built on a graphical engine. The player is essentially a stationary "camera," and the engine creates the sensation of moving through a world by rendering graphics that create that effect. Halo is different, Chris explains. "Halo is a simulation engine. The engine creates the world, then puts the player and the AI in it ... [The] characters and their code are isolated from the world."
Each character is written to do certain things, but despite their individual roles, they all function in the same way. It breaks down like this:
- The character uses its AI "senses" to perceive the world -- to detect what's going on around it.
- The AI takes the raw information that it gets based on its perception and interprets the data.
- The AI turns that interpreted data into more processed information
- The AI makes decisions about what its actions should be based on that information.
- Then the AI figures out how it can best perform those actions to achieve the desired result based on the physical state of the world around it.
"That all works through the same capabilities the player has," Chris explains. This is a key point in how the Halo AI works: Because the characters are forced to perceive the world around them, they are, in many ways, limited like the player by their senses -- in their overall awareness of what is going on around them. This limitation creates more lifelike behavior for the AI characters, as they can be surprised, make mistakes and decisions based on their perceptions of what's going on around them. As Chris puts it, "there is really very little difference between a player and an artificial intelligence character in Halo."