Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Halo 2 Artificial Intelligence Explained

Zonk posted more than 9 years ago | from the aliens-think-like-peepul dept.

XBox (Games) 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."

cancel ×

68 comments

Sorry! There are no comments related to the filter you selected.

Sounds like a good approach (5, Interesting)

ex_ottoyuhr (607701) | more than 9 years ago | (#10844636)

I've long suspected that the proper way to handle game AI, and game development in general, is to model things in a manner as similar to the real world as possible... It's also nice to finally have a self-preservation instinct in game enemies...

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 (3, Funny)

Anonymous Coward | more than 9 years ago | (#10844664)

And is the server messed up, or is this a first post? :)

It can't be a first post, it had content.

Duh! (1)

MyLongNickName (822545) | more than 9 years ago | (#10844691)

Learn to spell 'Frist'!

I will say this about Halo 2 (1, Informative)

Anonymous Coward | more than 9 years ago | (#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.

Re:I will say this about Halo 2 (1, Interesting)

Anonymous Coward | more than 9 years ago | (#10846726)

What about when it screws up, and you find an Elite or Grunt trying to run against a wall, or large box without moving. After reading that, I put it down to someone screwing up the box's characteristics - the Elite assumes it is small and can be "run through" or pushed aside, when it isn't.

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 - but I think it shines most when it comes to multiplayer LIVE rather than the single campaign)

Re:I will say this about Halo 2 (1, Interesting)

Anonymous Coward | more than 9 years ago | (#10849254)

I really haven't found that too frequently. There is one "box" on the first level right before the descent into the armory that seems to give elites trouble if I can keep the marines alive and get them a good angle to pin them down.

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 cover if he doesn't have any buddies left to pour fire on me. Cause if my marine help gets outflanked and killed by his pals, he seems to fight correctly. And I've seen them jump up on top of it, when they have a great force advantage and I've been forced to take off.

Re:Sounds like a good approach (2, Insightful)

DrSkwid (118965) | more than 9 years ago | (#10846915)

is to model things in a manner as similar to the real world as possible...

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 who are right and agree to be in your game

stage the game

or you could just build complicated decision trees that fool the gamer into seeing what he wants to see for considerably less input than modelling the whole universe.

Re:Sounds like a good approach (1)

ex_ottoyuhr (607701) | more than 9 years ago | (#10862183)

(Yes, I do realize that the parent of this article is a bit of a joke. Suffice to say that I'm setting out to break the ironimeter...)

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 takes one heck of a lot of time, and tends to run the designer out of names pretty quickly, not to mention producing (to pick on this post's official target) those ridiculous Nabooese lifeforms. Don't knock it 'till you've tried it -- an evolutionary model would never have produced those preposterously large fish. :)

grow some simulated babies and in a simulation of the particular culture of your required characters and find those who are right and agree to be in your game

You left out "simulate the development of the culture," which is another good idea: no more one-note alien civilizations, religions that span whole species, species that span whole religions, and the like. Plus, you can tack on a UI and pause it for turns, and you've got... Sid Meier's Civilization! The only problem is processor power... :)

or you could just build complicated decision trees that fool the gamer into seeing what he wants to see for considerably less input than modelling the whole universe.

Seriously, this is a false dichotomy. The alternatives for a game setting are not "The Super-Matrix" and "A Finite-State Machine." The fact that the Halo series is trying to model things in a manner closer to reality is an extremely good thing. Did you notice this article [slashdot.org] , which included that argument? (Second heading, "Why Natural Might Be Better.")

[partial] article without popups (4, Informative)

Anonymous Coward | more than 9 years ago | (#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 write all kinds of computer vision and analysis of the images to figure out what it was seeing. But because [the Halo characters] live in a simulated world, the characters can directly perceive that world. We chose to do that through simulated senses, because that way, the characters perceive the world in a way that players can reason about, because the player understands how their senses work in that world. We made simulated senses [for the AI].
So we have simulated vision, hearing and also a little bit of tactile knowledge. 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."
Chris continues:
"So we have simulated vision and sound. We take that information about what the AI can see right now and we turn that into a memory structure. So [the AI] is able to say, 'At this moment in time, I'm able to see [a woman] sitting right there. I see a woman wearing a black sweater right there.' You then turn that into more processed information by saying, 'I have a memory there that is [a woman] who is in this particular state at this time.' If [that woman] were to walk out of the room and go around that corner, I wouldn't see her anymore. But the AI would keep a memory of that character and the fact that they last saw her there, and when she left, she was moving in that direction.
So they have memory models that are what they know about the world. They take that memory model and turn it into more specific combat information. For instance, if I have memory of seven characters in this room and one of them is my friend and the other six are my enemies, I will have the knowledge that says, 'I am in a battle in close quarters with an overwhelming force. There are six enemies and only two friends in here.' That is an example of more processed information that is used to create a more persistent knowledge about what is the state of the battle or what is the state of the world and how should I react to it?"
The Decision Making
The AI in Halo each take turns "thinking". These turns occur very quickly, which gives the impression that each AI is constantly thinking. When it is its turn, each AI makes decisions based on the data they have processed. This is the AI behavior system. Chris explains:
"The behavior system is essentially the decision-making system. The way that works is hierarchical. So at any one time, you have an AI deciding what it should be doing in the world right now. It is a hierarchy of actions they undertake from the base level they can choose from. The hierarchical structure for their decision-making is based on a programmed set of combat cycles.
The four states of the combat cycle are:
Idle
Guard/Patrol
Attack/Defend
Retreat
That's the decision making. Behind it all is a basic combat cycle of seeing enemies, engaging enemies retreating and going back into another combat state. Now those are all combat-specific behaviors because ... our AI doesn't drink, it doesn't eat, it doesn't sleep. All it really does is stand around and then fight when enemies are nearby, but we try to make those behaviors be as life-like as possible."
Chris continues:
"So at every level of the hierarchical tree, those decisions about what the most appropriate thing to do is made based on the knowledge of what is going on in the world and knowledge about the type of character the AI is. For example, at that top-most level, it should say, 'If there are enemies I can see, then I should be engaging them in combat.' But if the AI is a cowardly character, it might say, 'If I am faced with overwhelming force, then I will retreat.' That is the level where our game designers come into play. They have access to all this game information and to all the numerical quantities that control the behavior of the AI.
We don't do things by random chance very much. The goal is not to create something that is unpredictable. What you want is an artificial intelligence that is consistent so that the player can give it certain inputs. The player can do things and expect the AI will react in a certain way. For example, if I sneak up behind a Grunt and surprise him, I expect him to run away. It would be bad if they only ran away half of the time, because then the player can build a plan that will only work half of the time. We try to go for predictable actions but unpredictable consequences. The Grunt will always run away, but you don't necessarily know where he'll run away to. That is where the re-playability comes from."
Pathfinding
Chris continues:
"If I'm an AI, fighting with enemies around me, one of the decisions I have to make is where is the most advantageous position for me to be standing? In each environment, there are hundreds of points specified by the level designer -- these are possible places an AI might like to be. That is how they control the flow of the game. They take AI and move them from one point to another, based on what's occurring. You feed all that into the really low-level intelligence. Like, if I am here and I want to get there, how do I get there? That's called pathfinding and really, I like to say that almost all AI is about pathfinding.
In encounters, there are rules. The Covenant will be here on top of the building. If the player kills three of them, then the Covenant goes to a set of points that are inside the building. What's really happening is the Covenant is following quite simple rules that the player perceives ... as the flow of battle. It seems like the Covenant thinks they have been weakened, so they retreat to a more defensive position. In fact, they are actually just following quite specific rules that have been laid out for them in that space."
Chris works with the level designers to analyze each point in the allowable area for the AI. In a way, the thinking is done for them. Each point is assigned a value, based on its characteristics in the space. For instance, a high spot may be a good location if you are on the offensive but not so good if you are being attacked. A spot behind a wall may be a good place to hide, but not to shoot. The AI knows these values and picks the location that offers the value it needs for the current situation.
The real challenge of pathfinding is getting to that point in a way that makes sense. Chris elaborates:
"If you have a character that can't navigate in an environment, that character will do things that are perceived by the player as stupid, like running into a wall or standing still and being dumb. That's because they want to go somewhere, but they don't know how to do it. We invested a lot of time in pathfinding in our game. Our AI knows that there are objects in the world that we have tagged with properties; this is a small object or a large object or a huge object. The AI will know, 'I can run through small objects' when pathfinding. They will kick them aside. But they have to run around larger objects. Certain larger characters know they can barge through objects that small characters will avoid or run around. "
In order to create even more realism in how AI interacts with objects in the world, the team uses animation to smooth out the look of the pathfinding. "We also tag objects with animation points," Chris explains. "A crate may have a tag that tells the AI, 'You can jump on top of this if you want to.' So when pathfinding the AI can decide to make a path over tagged objects. In combat, if the AI knows an enemy is hiding behind that tagged object, they may choose to jump on top of it and say something scary, or if they have lost sight of the enemy they may decide to jump up on an object to get a better look."
Object tags are also used to keep the AI aware of changes in their environments and indicate places that an AI can use as cover. But if these cover objects are destroyed or moved, the tag changes. This is how the AI knows they can no longer seek cover at that point in space. The cover tag is attached to the object, not the space.
Working Together
"Halo 1" offered players a level of a AI coordination and cooperation rarely seen in FPS games. By creating a series of built-in responses in each individual AI, the creators made the AI appear to be working together. Chris explains, "one of the most interesting things about Halo is that we have a lot of tools to make the AI work together as a coordinated force... [The AI] make individual decisions based on what's happening around them with their friends. For example, a Grunt would make the individual decision, 'The Elite I was just with got killed. So I am going to run away.'"
The Grunts are programmed to always react in that way. What appears to the player as an emotional or tactical response is, in fact, a simple "if/then" statement.
AI were also issued commands to move individually with guidelines that made them appear as if they were a team. Chris used the Marines as an example: "'I like to stand with my friends, but not too close.' That is how the Marines work. The Marines tend to move together as a unit but they won't stand in each others field of fire."
But that was the first Halo. "In 'Halo 2,' we have new tools for them to work together," Chris explains. His team added a joint behavior system to the AI that allows them to work together on much more complicated tasks. "The AI will say, 'I'm considering this joint behavior, and I notice there are people around me who are my friends.' So they post a request to the other AI to say, 'I would like to do this behavior with you. Will you accept it?' and the other AIs, when it is their turn to think, will either accept it or reject it and tell the originator. We used these new developments for various subtle and obvious improvements. The most obvious is the characters talking to each other. The AI posts a joint behavior, 'I notice both of us are looking for the same guy. I want to tell you something about him and I want you to respond to me.' or, 'We're both looking for the same guy. Let's work together to find him so that we can jump out and surprise him together.'"
Getting into a vehicle is another group behavior. If an AI can see a moving vehicle, it cam post a request to the AI driving that vehicle, asking for a ride. The AI driver, if he accepts the post, will stop, turn around and pick him up.
And the dialogue isn't just for flavor, Chris explains. "The talking is important because the AIs behavior and communication wouldn't be obvious to the player without the AI saying something and declaring their motives to the player."
The Uncanny Valley
As the interview started to wind down, Chris and I discussed some of the challenges facing AI.
"Are you familiar with the 'Uncanny Valley' theory from computer animated film?" he asked. I wasn't, so Chris explained it:
"As characters become more photo-realistic, you start to believe in them more and more. With humans characters, you get to a certain point of realism. What happens is there are characters that are so realistic you want to believe they are actually human. Then you notice their deficiencies. They have very plastic skin or very wooden eyes. All of the sudden they just become creepy. They are like zombie people, rather than appealing computer people. The appeal of the character rises, then drops dramatically, then rises again as you approach photo-realism."
Chris continues:
"In our game, we're not trying to be photo-realistic. Our characters are what they are in terms of visuals. The problem is that we are starting to approach that 'uncanny valley' point with behavior. We have all these characters that say all of these interesting things, that are very rich and meaningful about their environment. They have all of these interesting combat capabilities, but you can do something that they are not programmed to respond to, and they don't know how to react. Then all of the sudden they become dumb, like a zombie. They don't have any lines for, 'Hey Chief, you just made that soda machine do a complete flip. That was awesome!'
They have all this interesting stuff they do and say in combat and after combat and at certain points in the mission, but if you just hang around and observe them, they don't really do anything. The game industry is fast approaching this point where we are building characters who are really lifelike in their specific modes of operation, but when you take them out of those modes of operation, they really start to fall apart.
The challenge with AI in games right now is, 'What are the boundaries of AI? How do we hide those boundaries from the player? And how do we go beyond them?' That is what artificial intelligence is all about. It's about tricking the player into believing that there is something intelligent there."
---

After this point, the article cut out - page 7 (7!) gave

Document Not Found
The document (/halo2-ai8.htm) you requested was not found. Click search to search for it, or click here for our home page.

Re:[partial] article without popups (5, Informative)

Profane MuthaFucka (574406) | more than 9 years ago | (#10844740)

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]

Re:[partial] article without popups (0)

Anonymous Coward | more than 9 years ago | (#10844913)

lol... I was like pop-ups? what are those =) I didn't see any.

Re:[partial] article without popups (0)

Anonymous Coward | more than 9 years ago | (#10846115)

Safari kills the pop-ups just fine.

Re:[partial] article without popups (1)

gothzilla (676407) | more than 9 years ago | (#10845825)

Pages 7 and 8 are 404 because there are no 7 and 8. The article stops at page 6. They just forgot to remove the "next" arrow links at the bottom of 6.

Re:[partial] article without popups (1)

AvantLegion (595806) | more than 9 years ago | (#10854821)

>> The linked article is rife with popups

-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 (5, Interesting)

MyLongNickName (822545) | more than 9 years ago | (#10844726)

It is interesting to see how much work is required to get something that simulates 'common sense'. Note how much 'tagging' was required to get a character in a controled environment from point A to point B in a logical manner.

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 (5, Insightful)

mrdogi (82975) | more than 9 years ago | (#10844847)

Humans 'tag' as well. We just do it much faster (with experience) and have years of experience to help with that tagging, both in speed and in richness of tagging. Although, I suppose we also get superfluous tagging ("What idiot painted that box yellow?") to distract us a bit.

Re:AI (4, Funny)

gothzilla (676407) | more than 9 years ago | (#10845750)

We also can make a lot of mistakes in our tagging.
"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 (1)

obeythefist (719316) | more than 9 years ago | (#10850430)

Ahh, humans tag, if you will, but they do it dynamically. If we were like an AI, we'd need someone to go around in front of us painting things orange or red or green so we'd know where to go.

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 all of the paths and areas and points of interest for the AI before the game starts.

Likewise, amusingly, where superfluous tagging works on humans, it doesn't on AI. If you paint a box yellow, it's no more or less remarkable.

I guess we will have to rely on human opponents in deathmatches for the time being.

Re:AI (2, Insightful)

Osty (16825) | more than 9 years ago | (#10851295)

Ahh, humans tag, if you will, but they do it dynamically. If we were like an AI, we'd need someone to go around in front of us painting things orange or red or green so we'd know where to go.
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 all of the paths and areas and points of interest for the AI before the game starts.

Actually, a lot of things humans do have been pre-tagged. It's just that we can apply one set of tags from one situation to a new situation and expect them to work relatively well. As an example, look at driving a race car on a track. For a given driving style, there is an optimal line to take on the track for best speed. If you put a human in a race car on that track for the first time, with nobody helping them, they have to go through many laps of trial and error to find the line (level developers tagging things). If instead you put an experienced driver in the car, but kept this as his first time on the track, he'd be able to apply sets of tags from other race tracks to similar turns on this one. It won't be perfect, but it gives him a good place to start (level designers learning how to tag levels for AI, becoming more proficient). Now if you put an instructor who knows the track in the car with driver, and put down cones on the track for braking points, turn-in, apex, and exit points, most drivers will be able to turn flawless laps almost immediately (they'll still have to work up their speed, though). That's equivalent to putting an AI into a pre-tagged level.

It's not much fun watching someone drive a race track for the first time (it's fun doing it, but not watching it). Most people prefer to watch the actual race, filled with drivers who know what they're doing and who know the track. It's more fun that way. Similarly, you don't really want to spend your time running around with the AI while they learn a level. Therefore, the best thing to do is to pre-tag levels so the AI already knows what to do. Alternatively, you could use a learning AI, but you still need to spend the time up front to teach the AI the levels before you ship. If you build a new map, it's up to you to train the AI and provide that information when you ship the map.

Re:AI (1)

obeythefist (719316) | more than 9 years ago | (#10851585)

Amusing idea, following on from that, perhaps one could have an AI that tags maps so that the developer doesn't have to. You'd probably only need to tag the map once to generate the AI tags for prosperity.

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 (1)

Osty (16825) | more than 9 years ago | (#10851807)

Amusing idea, following on from that, perhaps one could have an AI that tags maps so that the developer doesn't have to. You'd probably only need to tag the map once to generate the AI tags for prosperity.

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 AI recording where you went. That way, you could run routes from quad to rocket launcher to rail gun, or show the bots where they could climb the level in non-obvious ways. The other was to just let the bots loose on the level, and they'd eventually find their way around, prioritizing their routes as they made them. About all I really remember is that you could see the bot's paths as green laser beams connecting skull nodes (those being entities already built into Quake 2, and repurposed as mapping constructs).

Does anybody else remember such a bot, and if so what the name of it was and who wrote it? I wasn't a big Quake 2 guy (at the time, I was still playing TeamFortress on Q1), so I saw this only in passing.

Re:AI (0)

Anonymous Coward | more than 9 years ago | (#10888228)

Yes, I remember that bot, but its name escapes me.

Re:AI (1)

FFFish (7567) | more than 9 years ago | (#10844973)

And it would be nice if there were a few more variables guiding their behaviour.

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 (0)

Anonymous Coward | more than 9 years ago | (#10846532)

Plus some sort of geneological randomness. Make some enemies braver than others and some able to take more damage than others. It'd be really neat if some enemies that survived assaults by fleeing learned from their experience and became better at fighting.

Re:AI (1)

FFFish (7567) | more than 9 years ago | (#10847316)

Geez, what if they communicated their learning to their unit? "CrazyGamer69 likes to hide behind boxes; be careful when approaching boxes!" "TopDoggy is carrying a flak weapon: keep your distance!"

It could get downright difficult...

Re:AI (1)

Roman_(ajvvs) (722885) | more than 9 years ago | (#10851147)

knowledge propagation would only be an issue if they lived long enough to tell their buddies. It would still be consistent, plannable behaviour if they passed this on. If some grunt on another world knew about it, I'd say that's bad propagation, but if you manage to snipe one brute, then the others should be smart enough to realise he's dead and "duck and cover".

... but we all know how effective that technique is...
*aims the rocket launcher*

Re:AI (1)

tc (93768) | more than 9 years ago | (#10850723)

I think the point was that although variability might be more realistic, it isn't necessarily better for gameplay, because predictable outcome allows the player to plan. The game then takes on some puzzle-game like qualities.

If you have to choose between realism and good gameplay, good gameplay should win.

Re:AI (1)

FFFish (7567) | more than 9 years ago | (#10856256)

Good gameplay is playing online against other human beings. *Much* more exciting, challenging, and satisfying than playing against bots.

Anything that gets bots playing more like humans is a Good Thing in my book.

Re:AI (1)

freewilli (267048) | more than 9 years ago | (#10845080)

The article seems make the AI out to be just a complicated FSM. I guess FSM's are still the best approach in squad based tactical AI.

Re:AI (1)

Dinny (16499) | more than 9 years ago | (#10846226)

First the article isn't very interesting. Basically the Halo2 AI uses virtual sences and can make ally requests. It also uses lots of level designere set locations.

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 (1)

urbaer (778997) | more than 9 years ago | (#10850553)

Hmmm... I like this quote

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 how does this help the player? Do XBox's have scratch'n'sniff panels now?
2. Wouldn't a marine smell? Does playing Halo2 for hours upon end without taking a shower make the game harder as enemies could track you down? Are there showers in Halo2?

I have more, but I feel like I'm about to cross from funny to troll....

Article text (sumarized) (1)

JVert (578547) | more than 9 years ago | (#10844768)


"Its alot like AI for a nascar race except they shoot at you."

Re:Article text (sumarized) (1)

wolf31o2 (778801) | more than 9 years ago | (#10844907)

HAHAHAHAHA!!!

Not only is this a great comment, but your sig is just brilliant.

Could someone explain... (2, Interesting)

Bret540 (794463) | more than 9 years ago | (#10844813)

What this means in plain english? 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." What the hell is a simulation engine, and if Halo uses a simulation engine where the hell do the graphics come from?

Re:Could someone explain... (3, Insightful)

mrdogi (82975) | more than 9 years ago | (#10844875)

I suppose something like this...

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... (0)

Anonymous Coward | more than 9 years ago | (#10845058)

The graphics to your screen are done pretty much the same. Your a cammera running around. But the simulation isn't centered around you only now. So instead of the world being... darn... I get "it" but I can't explain it any better than they do... The graphics are done basicaly the same... but the simulation is done diffrently...

Re:Could someone explain... (3, Informative)

gothzilla (676407) | more than 9 years ago | (#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.

Re:Could someone explain... (4, Informative)

Relic of the Future (118669) | more than 9 years ago | (#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?)

Re:Could someone explain... (2, Funny)

tenaciousj (769989) | more than 9 years ago | (#10848977)

where you see a clump of pixels and think "wall", the AI has been told "cover.value=+2.8", and can react accordingly.

That's because the AI has freed its mind.

The Matrix has you Relic of the Future.

It is a different approach basically (3, Insightful)

SmallFurryCreature (593017) | more than 9 years ago | (#10845721)

I think it was a recent star wars fps where I was stuck so I switched of clipping and drifted through the walls to see where I was supposed to go. Bit of a suprise when I saw myself standing somewhere. It was the setup for a cutscene.

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 (1)

TechniMyoko (670009) | more than 9 years ago | (#10847285)

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.

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 (1)

skyman8081 (681052) | more than 9 years ago | (#10848713)

And it certainly doesn't help that your NPC buddies are immune to Tartarus' one-hit-kill Hammer of DooM.

Re:It is a different approach basically (1)

TechniMyoko (670009) | more than 9 years ago | (#10862519)

They aren't from what I've seen on Legendary

Re:It is a different approach basically (1)

ssand (702570) | more than 9 years ago | (#10850002)

In earlier levels of Halo 2 there are times when they go out ahead of you. When I was in the city level, I tried to hop into the gunner seat of the warthog, but had to pick up the phone. The AI took off with the warthog and started engaging the enemy along the path that you should have taken with them.

Re:It is a different approach basically (1)

Darekun (734317) | more than 9 years ago | (#10878795)

If this is what he meant, then "Quake or Unreal" must not include Quake Arena or Unreal Tournament, where "your AI buddies could very well have completed the level while your trying to find your way back". Heck, in UT2004 onslaught levels, you have to claim a vehicle if you don't want to be left back at base while your AI teammates take the first few nodes. (There usually aren't enough vehicles for the recommended players, maybe they expect some people to go out on foot.)

Re:Could someone explain... (2, Interesting)

ajd1474 (558490) | more than 9 years ago | (#10847716)

The best way to see this is when you are involved in the three way battle between Covenant, the Flood and the Humans (when you are the arbitor).

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 flood... just let them battle it out, then waltz in a take out the winner.

The AI treats all enemy forces the same way, and as such you become just another player in the battle. It is also noticable when you die, in a lot of games the AI simply stops once you're dead, because you are the trigger for every action... in Halo 2 they just keep on fighting each other.

It means the world feels much more real, because all this is happening "around" you, and not "because" of you.

Wow (2, Informative)

dretay (583646) | more than 9 years ago | (#10844977)

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.

Re:Wow (1)

Metroid72 (654017) | more than 9 years ago | (#10845193)

This is a great coincidence, last night I went to the movies. Whatching the trailer to "Polar Express" and my date said the same "creepy" comment about the graphics in the movie. I wonder where the original theory came from

Re:Wow (1)

Goobermunch (771199) | more than 9 years ago | (#10845419)

There was a great article on this on Slate a few weeks ago.

Here's the link.

http://slate.msn.com/id/2102086

--AC

Re:Wow (1)

jessecurry (820286) | more than 9 years ago | (#10848185)

I thought that the "Uncanny Valley" was very interesting too. I'm curious as to whether or not game designers are going to try and hide things from the players or start to develop AI that simulates NPCs at rest.

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? (1)

fireduck (197000) | more than 9 years ago | (#10845011)

Out of curousity, how good is halo 2's AI? The first game I noticed that had decent enemy AI was the original halflife. The enemy marines were quite clever in how they handled situations, and the way the sonic doggies would run around like puppies chasing train cars seemed realistic. How advanced are we these days?

Re:is halo2's ai that good? (1, Informative)

Anonymous Coward | more than 9 years ago | (#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.

Re:is halo2's ai that good? (2, Interesting)

Hassman (320786) | more than 9 years ago | (#10845287)

Yea, they seem to use a lot of covering fire as well. The elites will pin you behind a wall with constant fire while others advance on your position. Pretty cool stuff.

Re:is halo2's ai that good? (1)

taeric (204033) | more than 9 years ago | (#10845497)

It might be decent in single player, but it really falls apart in the coop setting. I don't know how many times an enemy would be hiding from my friend while looking straight at me. It was rather amusing, as there were times when I thought the character was simply on my team. It was only when I realized that he would step from behind the box to start firing at my friend (still ignoring me) that I realized it was an enemy.

Re:is halo2's ai that good? (3, Funny)

bar-agent (698856) | more than 9 years ago | (#10846874)

It was only when I realized that he would step from behind the box to start firing at my friend (still ignoring me) that I realized it was an enemy.

Maybe it was thinking the same thing you were. I guess that's some pretty advanced AI!

Re:is halo2's ai that good? (1)

DrSkwid (118965) | more than 9 years ago | (#10846958)


take it off Easy and put it on Legendary

AI level = Difficulty level (2, Interesting)

MMaestro (585010) | more than 9 years ago | (#10847811)

On Legendary I've seen the AI do some crazy things they never do on Normal or Heroic. So far out of the ordinary, I've seen marines press their backs against cover and peek around it before attempting to fire. I think grunts attempt to use grenades to blow away your cover, but that might just be flushing out techniques. I've had elites try to 'bait me' by letting one come out in the open and having the others stay hidden until I tried to take the bait. And of course, they flank you. A lot.

I haven't tried any missions where there are jackals, hunters, flood, forerunner drones, or *spoiler* brutes yet but I'm guessing they have their own tricks. Oh and before you question what I saw, on legendary there are LOTS of situations where you're against 6+ elites at once so you see their tactics quite often.

Re:AI level = Difficulty level (1)

jZnat (793348) | more than 9 years ago | (#10849701)

Did you beat the game on Legendary yet? If so, was there an alternate ending?

Unamazing AI (1, Flamebait)

Dinny (16499) | more than 9 years ago | (#10845043)

First the article isn't very interesting. Basically the Halo2 AI uses virtual sences and can make ally requests. It also uses lots of level designere set locations.

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 (1)

Dr. Spork (142693) | more than 9 years ago | (#10845869)

Well, it's not AI in the sense the purists mean. It's more about simulating intelligent behavior with conditional scripts. But for a shooter, that's all you want. You don't need real learning or anything of that sort.

Re:Unamazing AI (4, Insightful)

AzraelKans (697974) | more than 9 years ago | (#10845947)

Well.. you have to remember a few details before judging, first of all halo 2 is all about battles, so you would expect they expent more time on that than say "conversations" or other nuisances and on that level both as partners and as enemies the AI acts pretty convincingly. Second, halo2 is definetily a lot larger and complex than half life.(not HL2 though) so is a lot harder to coordinate the AI and place tag points effectively. And 3rd the AI in a console game expending so much cycles in a console in network and graphics code, can only be good enough to be believable, but cant expent so much cycles to be "ground breaking" so their target was believable and enjoyable and I think they got that right.

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 (1)

MonkeyCookie (657433) | more than 9 years ago | (#10854873)

In Halo 1, they explain why you are able to understand the Covenant. Rather than them speaking English, they speak normally, but the AI you are carrying around with you understands the Convenant language and translates it to English for you. Very convenient.

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 (1)

johannesg (664142) | more than 9 years ago | (#10859328)

Halo 2 larger than Half Life? Just how much scenery did they have to duplicate to achieve that!?

Re:Unamazing AI (1)

spudgun (39016) | more than 9 years ago | (#10846017)

simple = good
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 (0)

Anonymous Coward | more than 9 years ago | (#10846870)

You know, it is kinda fun watching the behind the scenes bits and seeing the NZ flag hanging from the ceiling :)

(But I didn't know he was from Otago Uni... nice to know ;)

Re:Unamazing AI (1)

spudgun (39016) | more than 9 years ago | (#10847067)

yea Otago, Comp Sci Graphics Lab specificaly , his website which I'm not linking on /. (search google "chris butcher otago" says massey then otago, met him a few times .... think he kicked my ass at marathon more than once on the mac network.....

Re:Unamazing AI (1)

joemadeus (834855) | more than 9 years ago | (#10928094)

I have to agree w/ what was said about simple being better. But, in any case, I'm a lot more impressed with the ai in H2 compared to H1. My favorite example: when you're trying to get to the bomb in the first scene, and you're about to go outside, two of those worker bees (bees - not sure what the h3ll to call them) show up in the doorway. I plasma 'naded the one on the left, and the one on the right said something like, "you have a grenade on you, brother!" Agreed, it's all scripted. Agreed, it's the output of a load of if/then statements (in essense). It's still cool.

-j

Interesting book, too (1)

joemadeus (834855) | more than 9 years ago | (#10928061)

Just got done reading an excellent book about AI in games that includes more detail about what was talked about in the interview - look for "Artificial Intelligence for Computer Games" by John David Funge. An excellent, high-level overview. -j
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>