Steve Bond works for Valve Software as a computer programmer, and his most recent project at
Valve was designing and programming the AI system used in the company's hit FPS game Half-Life. He is now working on Valve's next game, Team Fortress II.
The interviewer is John Crickett, author of the Oak series of Quake and Quake II bots.
He also is co-webmaster of Bot AID.
John Crickett: Steve, a lot of valve interviews have sprung up recently, but as yet I don't believe you have had the pleasure, would you care to introduce yourself?
Steve Bond: I'm 24 years old and I've been with Valve since November of 1996. I have the messiest office, ever.
John Crickett: What is your position at Valve, and what part did you play in making Half-Life?
Steve Bond: I guess if I were filling out an application, I'd write "Computer Programmer" here. I'm mainly a programmer but I also try to participate
in as much design work as I can. I did a lot of design and programming on the Half-Life's AI system including creating the squad-based AI for the human and alien military opponents.
John Crickett: Did you have any prior knowledge of any AI theory, and have you found any theory that was useful and/or interests you?
Steve Bond: The most useful thing to me while designing the Half-Life AI system was my wish list from all my years as a gamer. I thought about
everything that I felt would make the AI in my favorite games more fun and worked some of those things into our game.
John Crickett: Ok onto the AI and Valve, based on the Valve Bios I believe you are responsible for the excellent AI in Half-Life, are you also involved in Team Fortress 2?
Steve Bond: Yes, I'll be working on Team Fortress!
John Crickett: How important do you feel good navigation is?
Steve Bond: Good navigation is critical. Characters that can get around in
the levels are much more interesting than ones that can't. When you have a good navigation system in your game you can add all kinds of fun
behaviors to your characters that you wouldn't be able to otherwise. For example, the Grunts in Half-Life can use the navigation system to follow and
surround you when you try to flee or to run and hide from you if things
aren't going their way. Security Guards wouldn't be able to team up with
you and go Headcrab hunting if they weren't able to follow you! That's
one of my favorite things about our game.
John Crickett: Can you comment on the techniques used in Half-Life to allow the monsters to navigate the levels?
Steve Bond: Each level is dotted with nodes and the connections between all of the nodes form a network of paths that the monsters can move along.
Think of it kind of like invisible train tracks running through the
level. When a monster wants to move, it finds that node closest to where it is
standing and the node closest to where it wants to go and gets a path by
finding all the nodes that are connected along the way.
John Crickett: What did you find was the most difficult part of good navigation?
Steve Bond: It was really hard to get a monster that was on the move to be
able to get around unexpected objects in its path... things like pushable
items and other monsters. We didn't want our monsters to run in place or
up against the world or other monsters, so we actually made it harder on
ourselves. This was probably overall the second most difficult thing to
implement in our entire AI system. It was a problem that was worth a lot
of effort to solve, without a doubt. We were sure of that when we saw the
impact our new movement system had on the game.
John Crickett: How do the entities decide what action they should take? Is there any overall goal for a group or are they all independent?
Steve Bond: Monsters try to decide what to do based on examining a set of important things about the world, about itself, and about the enemy.
Being badly wounded, almost out of bullets, or unable to see the enemy are examples of the kinds of things the monster takes into account when
making a decision (there are about 30 of these). Group/squad decisions are made in much the same way, but the communication of the group members makes
more information available for decision making. The squad AI also distributes responsibility among members a bit, giving each individual a
slightly different role in combat. The goal of a group in combat is to destroy the enemy but an individual member's critical needs like
reloading and self-preservation (moving, hiding) will cause them to take action on their own and rejoin the group effort again when it's safe to do so.
John Crickett: The marines behave in a manner almost human (sending out Recon, retreating under fire), how have you achieved this and just how
differently can they behave?
Steve Bond:
The Grunts make their decision using the same system described above, but they are programmed with several behaviors other monsters
don't have and a good knowledge of which behavior is most helpful given the situation. The behaviors can vary based on a lot of different factors.
For instance, if a monster makes a decision to run away and can't because it is cornered, it will make a 'next-best' decision and perform a different
action. Situations that prevent the monster from doing what it really wants to do will trigger the most varied behaviors.
John Crickett: Borrowing from your bio: "of which the squad-level AI is his favourite", how was this accomplished, I think I saw flocking behaviours mentioned elsewhere, do you have an interest in Artificial Life?
Steve Bond:
Building squad-level AI was a couple of big steps beyond getting
a good AI system in place. Once the monsters in Half-Life could move and
perform well, new systems were added that allowed monsters to communicate
with one another and coordinate actions.
I have some interest in artificial life, but I haven't figured out how
much of it can be applied to game AI. I think game AI can benefit from
some things that artificial life simulations have generated, though.
Something like flocking is neat in artificial life because a person could
write code to 'teach' creatures to flock. Artificial life tends to carry
more emphasis on how a behavior is built. In games, how much fun the
behavior is and how it contributes to the game experience are far more
important than how you make it happen. I start fiddling with flocking
behaviors for our game because I thought it would be a cool-looking
environmental effect.
John Crickett: Is Half-Life written in C or C++ and what are the advantages of the chosen approach?
Steve Bond: C++ was definitely the best choice for our AI system. We created
the entire base AI system first- to control seeing, hearing, moving,
attacking, and everything else a monster needs to function. During the
course of working on a specific monster's AI code we could replace and
change any number of modules from the base AI system to give the monster
the variety of behaviors that we wanted, all without endangering the
functionality of the base AI system or affecting any other monsters.