If the Halo series’ single player can be defined by any one element, it’s its AI. The sophistication with which enemies and allies fought in the first game revolutionised the FPS on its release, eight years ago. Lead AI programmer Damián Isla has worked at Bungie since Halo 2 development began, and was at the Develop conference to talk about how his work has changed through each title. We took a moment between sessions to talk about smoke and mirrors, natural language, and the dream of the ‘You’re doing it wrong’ button.
How much of the AI technology developed for Halo survived in Halo 3?
Very little of the code is the same, but the principles are exactly the same. Under the hood it changed, mostly to deal with the increased scope. The AIs in Halo 3 are capable of doing a lot more than in Halo but their basic function and the design is exactly the same.
You’ve said that cracks were beginning to show in the original AI design by Halo 3 –what were they?
The fact that there were more actors in the environments makes it a lot harder to make a scene look coherent. It’s not hard to make only three or four marines look convincing, but when you have 15 you start to see that they aren’t working as a group. They look more like clowns than a fighting force, so we had to go back and look at the social aspects of firefights.
The other issue was that the AI can do much more: in Halo the AI were great infantry but didn’t do much more than that. Once you scale up the action, they stop seeming like thinking creatures and it’s no longer clear why they’re making their decisions. Clarity of decision-making is the fundamental thing for game AI. When an AI has 50 things it can do at any moment, it gets a lot muddier tounderstand – if a marine isn’t getting in your vehicle it had better be because there’s obviously something else he wants to do. There’s nothing worse than driving up and them doing something else.
Halo’s actually amazingly reliable for that.
I think, like a lot of things that look easy, it really isn’t. It takes a lot of work.
And Theater mode lays all that bare. Were you concerned when the decision was made to include it?
Actually, no, because Halo has always pulled less smoke and mirrors than a lot of other games. We’ve always been principled about the lifecycle of an AI; the fact that the guy spawns and lives his life, even if players don’t usually see it. Theater mode was actually welcome because you can now watch an AI until its death, and see that the decisions it makes are clear. I really enjoy playing through a level and watching it from the Covenant point of view to see how they react.
The Call Of Duty series is great at creating drama and has enjoyed big sales success, but it doesn’t feature AI on the level of Halo’s – what does that mean for your work?
I think Bungie has always been an engineering-strong company, and our AI is part of that. One thing that we haven’t focused on quite as much as other companies is that presentation and scripting aspect. We’re super, super proud of the depth of simulation in the Halo world, but we realise that we need to invest as heavily in our scripting technology and other presentation. Halo 3 does storytelling through interaction such as the battle with the Scarab, though. I don’t think Call Of Duty has made us rethink anything in particular but I think COD4 is a fantastic game. They do an excellent job of scripting those moments in a way that a player can always see them. That’s something that we can always learn from, because we’ve always had instances of players never seeing certain things at all.
Has the balance of system resources you’ve given to AI changed over time?
We’ve allotted a pretty steady 15 per cent of the CPU, which translates to about five milliseconds of processing power per frame.
But you’d like more, right?
When it comes to AI processing almost that entire allotment comes to line-of-sight tests, whether it’s testing whether my gun can see the target, or whether an AI can see the player – they’re all ray casts, and they’re incredibly expensive. In fact, on the 360 they’ve gotten more expensive: we can actually perform fewer casts than in Halo because the geometric complexity has shot up faster than the processing power. So it’s a bit of a pain for AI in that sense. For that reason I would like more processing power or, at least, the ability to do more ray casts. Actual decision-making is very quick and cheap – it’s always spatial awareness that’s expensive.
What’s the next step for the AI technology you’re working on?
That it can play more roles and interact more deeply with the player. What that means is making it more social – that is, engage in more structured interaction in the way that AI riding in the Warthog is structured. There was the well-known example in Halo 2 where your ’hog full of marines would just drive off if you got out. That’s actually not that easy a problem to solve because how does the game know you intend to come back?
My grand thesis is, what if you can say: “Wait for me”? Communication with AI has been sorely neglected; you can ask them to charge, retreat, go there, but what about a richer level of communication than just orders? Even just a ‘You’re doing it wrong’ button – literally. If we had it in Halo, a lot of problems would be solved. At the moment we have to just guess the players’ intentions based on very simple input – what are they looking how and for how long and where they’re moving. That kind of stuff is such an impoverished representation. Imagine if you had this ‘You’re doing it wrong’ button…
Could you ever use voice?
It could definitely be used, but I’m not interested in making AI understand natural language, which is an impossible task. Well, scientists will solve it in ten to 15 years, but I wouldn’t support any game developer going off to try and solve that. The technology is there if you reduce your instruction set to three or four words, but natural language? I certainly wouldn’t touch that.