Why aren't our enemies smarter? Gaming AI's problem of smoke and mirrors

The artificial intelligence balancing act: why smarter gaming AI isn't always better
Elizabeth is a wonderful illusion of AI, but she's not perfect

Visit any gaming forum and it'll no doubt be inundated with players complaining about the same thing: "A.I is rubbish". These days the inclusion of perfunctory artificial intelligence is pretty much a given, a tick box for ticking, but only when it goes awry do people start giving it any real attention.

Irrational Games made grand announcements about AI buddy Elizabeth prior to Bioshock Infinite's release. Ken Levine drew comparisons between her and Half Life 2's Alyx Vance, who he feels was the last great AI companion. If it's been nine years since the last great hope of AI-kind, is it stagnating or did everybody just decide to stop caring?

Elizabeth doesn't burden the player like so many ill-fated escort missions, and even actively helps, but it still didn't feel quite right. Ultimately she's a phantom who's invisible to the very enemies that she and Booker are fighting or hiding from. Is AI actually still lagging behind, do gamers just like to moan a lot, or were those games fondly remembered for being so taut actually haunted by ghost of nostalgia?

Alex Harvey, the mind behind upcoming surrealist stealth game Tangiers, believes much of the existing groundwork is sufficient for AI with the help of some smoke and mirrors. "It was around a decade ago that a fairly solid minimum viable product was established for video game AI," he tells us.

"You reach the tipping point of Halo or F.E.A.R. where quasi-squad tactics are implemented to great effect. Does AI really need to be better than F.E.A.R. to give a good gameplay experience? There's a close threshold where you're wasting your time over-complicating things, you create an intricate architecture that achieves little more than smoke and mirrors would."

Artificial expectations

That isn't to say we're 'there' in terms of what it is possible to do with AI. Far from it, in fact. But University of Lincoln games design teacher and game developer Sean Oxspring just feels the level of acceptability hasn't changed much.

"Most 'new' AI in games is just cleverly faked and nowhere near as groundbreaking as people make it out to be. Buzzwords like 'neural networks' are far less complicated than they sound - they're essentially flowcharts with multiple actions that AI agents follow based on things going on around them."

Age of Empires

Age Of Empires needed to ensure its AI appeared to be tactical

The reason for this nostalgic perception that AI was somehow better at the turn of century is tied to technological breakthroughs, many of which seemed to begin to be taken seriously at the same time. "Tactical games like Age Of Empires needed to take on board path-finding techniques like A* whilst also developing systems to make computer controlled players actually appear to play tactically," says Sean." It was starting to be taken seriously as a vital part of the game design process."

The A* search algorithm is one of the most widely used forms of pathfinding. In its simplest sense this is where all routes are calculated in a grid system via a point score, the 'lowest' score determining the shortest route. Think of it like traversing to the other side of a mountain range in Civilization, but performed hundreds of times per second by any given enemy.

Adapt, engage

While Ken Levine might prefer Alyx Vance, both Alex and Sean believe the most engaging AI experiences come through rewarding and reacting to a player's own intelligence, providing the player with a well-earned sense of agency. Sean's favourite AI comes in the form of freeware 2D shoot 'em up Warning Forever. "It's got a simple AI behind it that adapts each new boss you fight to make it harder for you. It's really interesting to watch it adapt to different peoples play styles and I love watching people playing it."

Warning Forever's stream of bosses adapt to your style of play

Warning Forever's stream of bosses adapt to your style of play

Alex feels authenticity is irrelevant if masked correctly, and recalls an encounter that really resonated with him in STALKER: Call of Pripyat. "I came across a party of Stalkers affiliated with my faction. They've just been ambushed, I step in, the valuable reinforcements that save them. Heading to a mission, I notice a little glow on top of a water tower. A little incidental detail I thought, a group setting up camp for the night in a safe location.

"In the middle of the mission and things have gone wrong. Surrounded by incoming hordes of mutants, I'm starting to run low on ammo and health. Then a group of stalkers runs to my assistance. It's a tense battle, one of them dies. I look up and recognise my new allies. They're the group that I'd saved a few days prior. A wonderful emergent moment that wouldn't have hit with such power if it was executed in a manner that was even remotely scripted."

In hindsight, it might not have been based upon past events, but the presentation is just abstracted enough that you can fill in the gaps. Whether fully authentic or not, it was a perfect execution of a life-like, engaging AI."

Despite its criticisms, at one stage Thief's enemy AI was apparently too smart, or as director Nic Cantin put it, "too realistic". Alex sees perceived dumbness of AI as not necessarily detrimental.

"With good AI, the goal isn't actually to make it smart per-se, but to make it engaging and to provide an illusion of such. If a shoot-em-up pits you against military engaging in actual small unit tactics, obviously you wouldn't last two minutes. Fending off a theatrical, clumsy flanking attempt is always going to be more fun to the average player than dealing with AI that can play chess."