Why the AI in "F.E.A.R." is considered a reference and which game could change that
4.9.2018
Translation: machine translated
Games are getting prettier, bigger and more complex. Only one thing has hardly changed in the last ten years: enemy AI. The only hope is "The Last of Us 2". Until this is released, the 13-year-old "F.E.A.R." will continue to be the reference. AI developer Jeff Orkin explains why.
The opponents are everywhere. I am outnumbered by at least 1:15. I hide behind a crate and wait for the inevitable - namely that the enemies will gradually peek out from behind their safe covers like headless chickens or come running towards me and I can pick them off one by one. This situation applies to any number of action games. Tactics or strategy? Not a chance. Artificial intelligence rarely lives up to its name.
With every new generation of consoles, every new CPU or graphics card, I secretly hope that the leap in performance will be used to programme clever enemy AI. It's not as if there have never been intelligent opponents in games. The best-known examples include "Crysis" and "F.E.A.R.". Even though they are ten and 13 years old respectively. There it wasn't the sheer number of enemies that made me sweat, but their behaviour. Their behaviour was much more difficult to anticipate than that of the cannon fodder from "Call of Duty", for example.
"F.E.A.R." teaches fear in two ways
Jeff Orkin is the developer responsible for giving us not only the scary girl Alma but also the artificial intelligence in "FEAR". I wanted to know from him what his secret is. "The AI in 'F.E.A.R.' makes dynamic decisions based on what the player does. This gives the impression that it is intelligent. It's not pre-programmed to do the same thing mindlessly. The AI makes judgements in real time," Jeff explains to me by email. Shooters are interesting when you don't know what's going to happen next. Thanks to the AI in "F.E.A.R.", the game always plays out a little differently. "It's the personal stories that we remember and not the scripted story," Jeff is convinced.
A crucial aspect of why the AI in "F.E.A.R." feels alive is communication. When you engage in wild firefights with the replica soldiers, the masked warriors do not remain silent. They give each other instructions, comment on their search for you or call out when they want to lure you out of cover with grenades. "Communication between enemies was a huge part of the AI in 'F.E.A.R.'," says Jeff. "We wanted the AI to constantly communicate what it was thinking, what it knew and what it thought the player was doing." The F.E.A.R. team realised that it didn't matter how smart the AI was as long as the player didn't notice. To create heated moments, it is enough for the player to find out what the AI knows by verbalising it. At times, this system makes the game a little easy. But that doesn't matter, says Jeff, as long as the game remains fun and exciting. And anyone who has fought battles with the replica soldiers can attest to that.
Jeff has also implemented a system called GOAP (Goal Oriented Action Planning). This gives the AI a series of goals with possible actions it can take. Such planning systems require developers to think backwards. They have to think about goals and then select a suitable sequence from the existing actions that can fulfil these goals. Jeff describes it as "a bit like Jeopardy". Plans are approached from the bottom up. This is not intuitive at the beginning. What's more, the results can be unpredictable, which not everyone is comfortable with.
This presentation will also look at the AI in «F.E.A.R.».
The real challenge, however, is authorship, as Jeff calls it. How do you create a satisfying reaction to what the player is doing when the game hasn't even been released yet? "You have no idea what the player is doing - and players are creative. They always do things that designers and developers would never have expected." Programming AI behaviour in such a way that it can react to the unknown is extremely difficult.
"Developers and designers tend to favour solutions that are straightforward, even if they are less efficient in the long term. Top-down solutions are more intuitive. But these solutions require developers to anticipate actions during the design process. To introduce a planning system, you need a team that really believes in the idea of spontaneous adversary behaviour and is willing to relinquish some of the control."
.
Two reasons for stupid AI
Where the lack of a clever AI is most noticeable is when enemies take cover and stick their heads out at regular intervals. They might as well draw a big red cross on their foreheads. Jeff is less critical of this: "It's a design decision and I can understand it. The AI has access to all the information. You could easily programme a really difficult AI. But games wouldn't be fun if the AI was always better than you." I have to agree with him. After all, even without military expertise, I want to be able to triumph over overpowering opponents.
But there has to be a middle ground between invincible AI and absolutely mindless enemies that don't seem the least bit alive. Why are the graphics and sound getting better and better, but the AI still has the intelligence of a broken calculator? "The games industry is a victim of its own success," Jeff believes. Budgets for games and teams are so big that nobody wants to take risks or dares to experiment - there's too much money at stake. "People buy games because of the graphics. You only find out how good the AI is once you've bought the game." That's why it's difficult for big publishers to justify spending money on better AI when they can sell heaps of games without it.
A glimmer of hope
Luckily, there are exceptions. The soon-to-be-released "The Last of Us 2" will also make jaws drop graphically. However, the E3 demo showed that developer Naughty Dog has another hobbyhorse in its stable. In the post-apocalyptic zombie adventure, protagonist Ellie will have to contend with particularly clever enemies. In this respect, the first part (apart from Ellie's AI) didn't really shine and yet the game has sold millions of copies.
The fact that publisher Sony is nevertheless backing the time-consuming and certainly not cheap development of a new AI certainly has something to do with its confidence in the studio. Naughty Dog has delivered one bestseller after another in recent years. Nevertheless, it is pleasing to see that a blockbuster game is soon to be released that should once again feature a really clever AI. Unless the E3 trailer was completely fake, then I take it all back. But I don't think so. For me, what was shown was one of the most impressive demonstrations yet of what AI can be capable of.
The technology behind the enemy AI in "The Last of Us 2" has parallels to "F.E.A.R.". "We're experimenting with a new technique where the AI recognises each other's names," says Richard Cambier in an interview with the game site VG247. When they meet, they recognise each other. "This bond affects how they communicate with each other," says Cambier. Unlike in "F.E.A.R.", however, the enemies in "The Last of Us 2" rely on secret language and whistle signals so that they cannot be overheard - "unless you can decode them".
I hope more developers can take the time to programme a believable and playfully challenging AI. Even though I'm looking forward to shooting hordes of literally headless enemies again in the latest "Serious Sam", I miss the feeling from "F.E.A.R.". When I was sneaking through poorly lit rooms and was suddenly surprised by onrushing enemies, my heart would pound. I couldn't wait for them to poke their heads out. I had no idea what they were going to do next. And that's what makes a good AI for me.
Philipp Rüegg
Senior Editor
Philipp.Rueegg@digitecgalaxus.chBeing the game and gadget geek that I am, working at digitec and Galaxus makes me feel like a kid in a candy shop – but it does take its toll on my wallet. I enjoy tinkering with my PC in Tim Taylor fashion and talking about games on my podcast http://www.onemorelevel.ch. To satisfy my need for speed, I get on my full suspension mountain bike and set out to find some nice trails. My thirst for culture is quenched by deep conversations over a couple of cold ones at the mostly frustrating games of FC Winterthur.