pigAboutGames

Artificial intelligence in games

01/16/2023

"This game has great AI..." –last words out of someone's mouth before a pig slaps them with a slipper

Sweating despite the best efforts of a cooling vest in the cramped cockpit of my Zeus, I have to admit that my mind is not on the task at hand. I should be focused on the mission: the Capellan factory we're supposed to wreck at nav Alpha, the pair of heavies patrolling the region mentioned in the briefing, the safety of my lance-mates... Instead, the only thing I can think about is Major Mullen.

When he agreed to sign up with us, it seemed like such a lucky break. Here he was – elite of the elite, with a sterling reputation earned in some of the Inner Sphere's most noteworthy battles. A walking, talking legend that had scrapped with the preeminent 'mechwarriors of our time and come away whistling... I paid his outlandish salary, put him in the best quarters on the ship – even gave him exclusive use of the finest 'mech we had (a rare, Lostech Nightstar we were lucky enough to salvage). With him on board, it seemed like my fledgling outfit was finally stepping into the spotlight; like we were about to accomplish great things...

alt text

Only now – staring at Mullen's Nightstar as it continued to plod into an unyielding pile of scrap for the third minute straight – I wasn't so sure I'd made the right call after all... He sounded fine on the comms, acknowledging every order, but then – why keep walking into something that obviously wouldn't budge? Why not walk around it? Had the strain of all those hardfought battles finally caught up with the legendary 'mechwarrior?

Did Major Mullen have a stroke?

If you've been playing games for any length of time, you've seen this phenomenon ad nauseam: there you are – fully invested in an immersive world with a nuanced story, relatable characters, inspiring soundtrack and beautiful graphics – when the bubble bursts because Darth Revan gets his Sith Lord snout stuck in a wall; Subject Zero, unfathomably, leaves cover in favor of lethal gunfire; or – indeed – a veteran 'mechwarrior has trouble with the concept of stomping around an obstacle. No — we're not just talking about bad pathfinding here. We're talking about the Lack of Artificial Intelligence in Games.

Lack, because – while the field of artificial intelligence exists – what it has thus far accomplished has more to do with single-use instances of deep learning than actual intelligence (you know: recommending your next Amazon purchase, misinterpreting what you say to Siri or wrecking Teslas on "autopilot"); and even those fledgling steps have not now, nor have they ever been, incorporated into a game.

Artificial intelligence is just that – an intelligence: a self-governing system able to (and I quote) "acquire, understand and use knowledge". It's complex, resource-intensive and a wee bit above the pay grade of your average computer game dev. Programmers who deal with machine learning and neural networks tend to go where the big paychecks roam and as game development is usually on a limited budget (even by big studio standards) the chances of a triple-A studio snagging someone who could go make six figures a year at Google are slim to none (this assuming said bright spark would even be interested in making games to begin with).

What games employ to simulate intelligence is algorithms: sets of finite if-then scenarios that dictate an object's response to circumstances. And while some games employ fairly advanced ones (like F.E.A.R.'s teamwork-oriented Replicas, S.T.A.L.K.E.R.'s pack behavior mutants, or Black & White's creatures with a weakness for Pavlovian conditioning), finite instructions is all they are. If, hypothetically, a game existed with true AI and you introduced a new element into it, the AI could learn to work around it. Do the same in your everyday, algorithm-driven game, however, and the game would simply ignore the new addition (though possibly in a very funny way that would make a big splash on YouTube).

And while algorithms have grown increasingly more complex over the years, coming up with new ones is highly resource-intensive, in terms of time and money. That's why, typically, you will see one big breakthrough (like, say, 2012's XCOM: Enemy Unknown) followed by a smattering of games from smaller devs employing the same engine and algorithms tweaked to their specifications (your Shadowrun Returns, Hard Wests, Mutant: Year Zeros and Phantom Doctrines).

The only reason the term "artificial intelligence" exists in the gaming world at all is because it sounds impressive – and impressive-sounding things sell (and marketing is evil – though that should go without saying). I mean, what would you rather buy? A shooter that "has enemies who respond to a limited number of scenarios" or one that "employs lifelike opponents powered by state-of-the-art AI"?

Actually, if you stop to think about it, using real artificial intelligence in a computer game would be a bigger headache than it's worth. Intelligence is discerning and – to an extent – unpredictable. Short of limiting the scope of its actions, how would you go about making an independent element behave in the way that you wanted? And if you had to limit its scope, anyway, why would you not use a simple algorithm that worked exactly as you'd expect instead?

Personally, I revel at the idea of a developer releasing a game with AI opponents who misbehave. Imagine the giggles if a player had to spend all their time chasing a bot who just wants to run away and hide and shows no interest in fighting? Or an obstinate gatekeeper who won't let you pass because, just then, he decided irritating PCs was hilarious? Or an opponent who is so adept at a game that nobody can beat them? I'm not saying I'd like to play a game like that, but — I'd definitely enjoy watching someone do it.

But that's all in a possible, distant tomorrow. What we have today are games that, at their core, operate on conditional programming which has been around since the 60s: if this happens, do that; if that happens, do this; else, keep walking in place with your head pressed against a wall. It's a limited system that only accounts for as many scenarios as its programmers are able to anticipate...

So the next time your own, computer-controlled teammate rams you off the track, a Sectoid jumps into a fire, or a renowned starship captain rams his vessel into a dock, remember: it has nothing to do with intelligence.

They're all just following orders...

Pig Recommends:

  • smacking marketing and advertising execs with whatever's at hand (a rolled-up newspaper, a fuzzy slipper, a substantial enough vegetable) at every opportunity, while saying – in a stern, disapproving voice – "bad money-grubbing exec!"; c'mon — if enough people do it, it's bound to have an effect;