Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
XBox (Games)

Halo 2 Artificial Intelligence Explained 68

An anonymous reader writes "Stuffo has an interesting interview with Bungie's lead AI developer, Chris Butcher. Butcher explains in detail how the enemies in Halo 2 think and exactly why they do the things they do."
This discussion has been archived. No new comments can be posted.

Halo 2 Artificial Intelligence Explained

Comments Filter:
  • by Anonymous Coward on Wednesday November 17, 2004 @03:05PM (#10844705)
    The linked article is rife with popups and requires one to click 'next page' about 50 times, so here's most of the text. NB - I only got the first 6 pages; pages 7 and 8 came up 404.

    In the Mind of the Enemy
    The Artificial Intelligence of Halo 2
    by Robert Valdes
    11/17/04
    So here I am ... surrounded by pizza boxes, soft taco wrappers, empty beer and soda cans and controllers. I'm tired, and I smell bad. I've finally beaten "Halo 2." I've been ambushed, sniped, flushed out, cornered and just plain beat down by the Covenant more times than I care to remember. In both "Halo" and "Halo 2," the enemy's battlefield savvy is one of the most impressive aspects of the game. The enemies are so much more than just an onslaught of fodder. This is not your daddy's shooter. If you think that a quick trigger finger is going to let you plow through the Covenant in "Halo 2," then there is a body bag with your name on it.

    The enemy characters in "Halo," as with all video games, are driven by artificial intelligence or AI. The complexity of the AI can often make or break a game's level of fun, realism and replay value. Halo is at the top of list when it comes to AI. The enemies react, respond and adapt to the player like real combatants on a battlefield.
    If you're amazed by just how "dirty" the Covenant's "dirty pool" can get in the heat of battle, then you will be interested to hear what Chris Butcher had to say about the artificial intelligence of "Halo 2." Chris is one of four Engineering Leads at Bungie Studios, who are each responsible for certain sections of Halo's creation. Chris created the AI for the original "Halo" and got to expand his work in "Halo 2." Stuffo got a chance to sit down with Chris a few days before "Halo 2" launched and talk about the artificial intelligence of "Halo 2."
    The Basics
    "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 stationery "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."
    AI Perception
    Chris goes on:
    "If we were writing artificial intelligence for a robot, we would have to
  • by Profane MuthaFucka ( 574406 ) <busheatskok@gmail.com> on Wednesday November 17, 2004 @03:08PM (#10844740) Homepage Journal
    Just go for the printable version. The whole article on one page. No popups either, because I'm running firefox.

    http://stuffo.howstuffworks.com/halo2-ai.htm/print able [howstuffworks.com]
  • by Anonymous Coward on Wednesday November 17, 2004 @03:15PM (#10844803)
    Over all the AI is very good, and occasionally quite clever. But it can occasionally get caught in an indecision loop when it faces two threats.
  • Wow (Score:2, Informative)

    by dretay ( 583646 ) <drew@[ ]umd.edu ['cs.' in gap]> on Wednesday November 17, 2004 @03:33PM (#10844977) Homepage
    I was very impressed by the depth of understanding that the AI showed in HALO 2 before reading this article. What I found particularly interesting is the "Uncanny Valley" problem whereby the AI becomes very life like and then, when it does something inhuman, it just becomes creepy. I have never personally experienced the problem, but I have a friend who refuses to play certain games for exactly this reason.
  • by gothzilla ( 676407 ) on Wednesday November 17, 2004 @03:41PM (#10845089)
    The difference is that Quake and Unreal have a single universe, so to speak. The walls, objects, and enemy characters are all part of the same engine and rendered at the same time. Walls, boxes, and monsters were all part of the same code and were handled the same way with the same engine physics.

    Halo 2 creates 3 separate entities. Instead of the enemies being part of the world and rendered at the same time with it, they are now a separate part of the game and don't share any code with the landscape, walls, etc. The game first creates the world, then it creates the AI totally separately and puts them into the world. Basically you have one engine that controls the world and another totally different AI engine that has to interact with the world engine.
  • by Anonymous Coward on Wednesday November 17, 2004 @03:45PM (#10845141)
    I would say it's really good. They do lot of coordination. They'll spread out and take cover, protecting their flanks but still near enough that they can provide interlocking fire. Elites will band together to drive into a position, and outflank a powerful opponant. Enemy snipers appear to fire on who ever has the sniper rifle first.
  • by Relic of the Future ( 118669 ) <dales AT digitalfreaks DOT org> on Wednesday November 17, 2004 @03:53PM (#10845240)
    In many games, the NPC/targets/AIs/whatevers are just another object, like a brick, that gets dropped into the game world. For Halo 2 though, they made them just like any other player, only instead of taking their input controls from your xbox controller, they take them from a piece of code. Instead of having that code look at an image on screen (like you as a player do when playing the game) they instead examine all of these tags that exist in the game world; where you see a clump of pixels and think "wall", the AI has been told "cover.value=+2.8", and can react accordingly.

    This approach allows for the AI to react much more realistically and intelligently with the environment without requiring an impossible amount of effort. It also allows improvements in the AI code to be isolated from the design of the levels (as long as the rules of this "tagging" interface are obeyed by both sides of the programming aisle).

    I wonder how much of this tagging was done by hand, vs. how much was done by automated analysis.

    (As an aside, the grav-lift on Collossus needs to be turned off for CTF, Assault, and Oddball games. Am I right?)

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...