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."
Sounds like a good approach (Score:5, Interesting)
Does anyone know if Far Cry used a similar approach? Its AI struck me as very close to Halo's in a lot of ways. (Then again, the whole game was like that...)
And is the server messed up, or is this a first post?
Re:Sounds like a good approach (Score:3, Funny)
It can't be a first post, it had content.
Duh! (Score:1)
I will say this about Halo 2 (Score:1, Informative)
Re:I will say this about Halo 2 (Score:1, Interesting)
There are actually a lot of buggy moments with the AI in Halo2 - things that just didn't happen in Halo. Many times it feels like Halo had better AI, which is certainly disappointing.
(It is still a good game though - bu
Re:I will say this about Halo 2 (Score:1, Interesting)
And that's what I'm talking about with the indecision loop. I've seen them waffle back and forth really quick, or run in a little circle. I think that because of the way I flank him, and the fire from the marines on my right he'll have a little trouble deciding to get out of
Re:Sounds like a good approach (Score:3, Insightful)
first we model the fundamental particles
then photons, electrons, neutrons and protons
add in a few forces, gravity of the planets & stars, expansion of the universe that sort fo thing
evolve your target planet where your game is to take place
keep running the evolution software until your required habitats form
grow some simulated babies and in a simulation of the particular culture of your required characters and find those wh
Re:Sounds like a good approach (Score:1)
evolve your target planet where your game is to take place
Are you sure this is sarcastic? After all, if George Lucas had followed this advice, we would never have seen Naboo...
keep running the evolution software until your required habitats form
Hey, it saves design effort, you don't have to manually think up alien analogues to terrestrial flora and fauna -- which take
[partial] article without popups (Score:4, Informative)
In the Mind of the Enemy
The Artificial Intelligence of Halo 2
by Robert Valdes
11/17/04
So here I am
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
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
Re:[partial] article without popups (Score:5, Informative)
http://stuffo.howstuffworks.com/halo2-ai.htm/prin
Re:[partial] article without popups (Score:2)
Re:[partial] article without popups (Score:2)
-1, IE User.
Mozilla, Firefox, Opera, Safari... take your pick.
What kind of "nerd" runs around with IE still? "Gee golly, I like popups!"
AI (Score:5, Interesting)
Now take your average FPS player. He is able to look at the terrain without these tags and make a coherent game plan. Leave one tag off of an object, and that AI player is suddenly trying to do something impossible and not able to make a decision to try a different tact.
AI has certainly improved. I can't even begin to guess how many single player games have been destroyed simply because I found an explotable AI weakness. What will make AI really good is when it can adapt strategies when it has consistently lost.
Re:AI (Score:5, Insightful)
Re:AI (Score:5, Funny)
"After looking at the angle of that corner up there, I calculate that I can take it in my Ferrari at 82 mph without losing control."
"I can jump over that fire hydrant without smashing my nuts."
"This gun isn't loaded so it can't hurt me."
Re:AI (Score:2)
What would be great would be to have an AI that can tag terrain dynamically and decide which is the best place to go based only on what it can "see". That way you could design any map, random or planned, and drop an AI into it and have a great game. Unfortunately what happens is that the game developers plot out
Re:AI (Score:2, Insightful)
Re:AI (Score:2)
That way you could have anybody design a map and just let the AI loose on it once to develop decent tags.
That would be much cooler than having a human tag the map up for the AI.
Re:AI (Score:1)
Similar things have been done. There was a bot for Quake 2 (sorry I don't remember which one, I saw my little brother playing with it but never did so myself) that you could teach maps. IIRC, you could go about it in one of two ways. The first way was to run through the level yourself, with the bot
Re:AI (Score:2)
A hopped-up Grunt who has been really kicking ass on the enemy probably isn't going to immediately run away just because his Elite buddy bit the turf.
A "flight or fight" variable would help a lot, and should be influenced by health, energy, success, perceived threat, perceived gain, etc.
Re:AI (Score:2)
It could get downright difficult...
Re:AI (Score:2)
*aims the rocket launcher*
Re:AI (Score:2)
If you have to choose between realism and good gameplay, good gameplay should win.
Re:AI (Score:2)
Anything that gets bots playing more like humans is a Good Thing in my book.
Re:AI (Score:1)
Re:AI (Score:1)
Second the AI doesn't sound very advanced. It seems a lot like the stuff the Half-life AI was doing back in '97. Maybe it's just the target audience of the article, but is seems like they are trying to make the AI seem very simple.
Re:AI (Score:1)
Where the player has five senses to deal with, and they're well developed, the AI in Halo really primarily only responds to visual input and sound input. That's because the two ways the player generally makes himself known to the AI is: The AI sees the player or they make a noise, like shooting someone.
This makes me think a few thoughts all at once and I'll try to unscramble them.
1. what do the enemies in Halo taste and smell like? Okay, they probably taste like chicken, but h
Article text (sumarized) (Score:2)
"Its alot like AI for a nascar race except they shoot at you."
Re:Article text (sumarized) (Score:1)
Not only is this a great comment, but your sig is just brilliant.
Could someone explain... (Score:1, Interesting)
Re:Could someone explain... (Score:3, Insightful)
In Quake, etc. the creatures just stand around until you come into their field of view (or they come into yours, I suppose), then attack.
In Halo 2, they can look around at the start of the game, and then start banding together, or exploring until they find you.
Re:Could someone explain... (Score:4, Informative)
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.
Re:Could someone explain... (Score:5, Informative)
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?)
Re:Could someone explain... (Score:2, Funny)
That's because the AI has freed its mind.
The Matrix has you Relic of the Future.
It is a different approach basically (Score:4, Insightful)
Basically in a quake like game wether it is half-life or quake itself the game centers around the player. The player is the center around wich the world moves. Until you move and trigger something wether it is AI or a scripted sequence the world will remain static.
In a simulated world the world will go happen wether you move or not. A very good example is MS flight simulator. With the proper settings if you start the game you are sitting on the ground at an airport. But as you sit there you can see weather patterns moving. Other aircraft taking off an landing. Air control giving instruction to ensure seperation.
Note that this is purely an approach to how the "story" in the game is developed. You could easily use the quake engine to create a simulated world and use MS flight simulator to create a trigger driven story game. In fact they exist.
So halo has the same kind of graphical answer as quake. What is different is how the population changes. It seems that the halo makers claim they have a more MS flight simulator like approach where the AI does its thing even if you just stand at the start. Note that in the recent MS flight simulator you are part of the AI as both air traffic control and other aircraft react to you (sometimes).
It should be easy to check if there is an invisible mode/no clipping mode in halo 2. If they are right then you should see that enemy walking around and chatting long before you have walked along the corridor and triggered them to do their stuff.
Personally I think Halo2 is a cross. A true simulated FPS would have far more of a realistic combat mode as you would be on a battlefield with a battle going on and you would be just one of the soldiers. If you remember Call of Duty then think about the russian square assault. While their is obvious AI going on the AI is totally incapable of achieving anything. You score the majority of kills and you "unlock" the next bits in a level.
If Call of Duty had a simulated world then you could just sit to the side and slowly see the AI on one side win. F16 falcon had this to a certain degree. It was a very realistic combat flightsim and I sucked at Air to Air. However as long as I setup the right mission where I bombed and had my wing mates cover me the AI would do the job. One time I started a mission but had a call of nature. The rest of the flight started in the air and the base was attacked. As I was sitting on the toilet I could hear my wing engaging the attacking flight and shooting them down. All without me even having touched the controls. That is a simulated world.
So is this the future? Well for some games. Imagine if you played a simulated RPG. If you then went to the toilet and let the game running a NPC would pick up the role of hero and complete the story quests. Hmmm.
Imagine in Halo if it was truly simulated world. If you take the wrong turn your AI buddies could very well have completed the level while your trying to find your way back.
Flight sims and realistic combat games might be fun with truly simulated worlds. FPS ala Halo are perhaps better when the player is the hero who triggers events. Some simulation can take place but do you really want the intresting bits to be done by the your AI buddies?
Half-life is a scripted STORY engine. Halo claims to be a simulated STORY engine. The graphics are exactly the same. They choose the wrong words.
Re:It is a different approach basically (Score:1)
In the last ending during the end battle, I took the gravity lift up a floor to go get dual Plasma Rifles. By the time I got back down, (Normal difficulty mind you) my elite's had defeated the end boss for me.
Re:It is a different approach basically (Score:1)
Re:It is a different approach basically (Score:1)
Re:It is a different approach basically (Score:1)
Re:It is a different approach basically (Score:1)
Re:Could someone explain... (Score:3, Interesting)
Each time you enter an area there is a battle going on between the humans/flood/covenant. Most games the action revolves around you triggering something. Halo 2 (and similar games) have the world and its players acting out their own story. You could stand in a corner and just watch the battle unfold. This is useful when you come up against a bunch of sentinels and
Wow (Score:2, Informative)
Re:Wow (Score:2)
Re:Wow (Score:2)
Here's the link.
http://slate.msn.com/id/2102086
--AC
Re:Wow (Score:1)
It would be very cool to have a game in which the NPCs would sit around and chat, or play cards when they think that they are idle. It would also be very cool to sneak up on a group that was enjoying social time. Imagine flying drinks and tables being knocked over when you start shooting them.
is halo2's ai that good? (Score:2)
Re:is halo2's ai that good? (Score:1, Informative)
Re:is halo2's ai that good? (Score:3, Interesting)
Re:is halo2's ai that good? (Score:2)
Re:is halo2's ai that good? (Score:4, Funny)
Maybe it was thinking the same thing you were. I guess that's some pretty advanced AI!
Re:is halo2's ai that good? (Score:2)
take it off Easy and put it on Legendary
AI level = Difficulty level (Score:3, Interesting)
I haven't tried an
Re:AI level = Difficulty level (Score:1)
Unamazing AI (Score:1, Flamebait)
Second the AI doesn't sound very advanced. It seems a lot like the stuff the Half-life AI was doing back in '97. Maybe it's just the target audience of the article, but is seems like they are trying to make the AI seem very simple.
Re:Unamazing AI (Score:2)
Re:Unamazing AI (Score:5, Insightful)
I havent even noticed before reading the article but the enemies DO talk to each other (in english) before teaming up on your poor butt. Thats an interesting detail to watch (although it ussually ends with you dead in the ground).
Oh I almost forgot, you have to play in the "heroic" dificulty level to see what the AI can really do. The easy and normal levels are quite dumbed down in comparison.
Re:Unamazing AI (Score:2)
I do enjoy hearing what the Covenant grunts have to say. "Uh oh! Bad guy somewhere!", "Run, grenade!", or when they have a plasma grenade stuck to them, a very panicked "Aaaiiieeeeee!".
Re:Unamazing AI (Score:2)
Re:Unamazing AI (Score:1)
complex = bad
simple is often better , less cpu usage for A.I. on an X-Box means more cpu for other stuff.....
Computer Science teaches you to seek out "Simple" solutions. and judging by the success of Halo and the Halo Game serries Console [userfriendly.org] it's good enough to be successful!
( and all those people wondering how do i get a job in the games industry - Chris wrote some sort of Map tool for Myth while at University [otago.ac.nz] and got noticed by Bungie.....)
Re:Unamazing AI (Score:1)
Re:Unamazing AI (Score:1)
Interesting book, too (Score:1)