The Perfect Organism: The AI of Alien: Isolation

Oct. 31, 2017
None

Image via Creative Assembly
<iframe title="The AI of Alien: Isolation | AI and Games #15" src="//www.youtube.com/embed/Nt1XmiDwxhY?enablejsapi=1&amp;origin=https%3A%2F%2Fwww.gamedeveloper.com" height="360px" width="100%" data-testid="iframe" loading="lazy" scrolling="auto" class="optanon-category-C0004 ot-vscat-C0004 " data-gtm-yt-inspected-91172384_163="true" id="711803136" data-gtm-yt-inspected-91172384_165="true" data-gtm-yt-inspected-113="true"></iframe>

This article is an edited transcript of the AI and Games YouTube video linked to above. AI and Games is a crowdfunded series on Patreon.

One of the biggest AI-driven titles of modern times, Alien: Isolation brings the terror of the xenomorph to video games. While the alien, LV-426 and many other key elements of the franchise have previously been explored, Alien: Isolation takes a different route. A horror game steeped in the aesthetic and style of Ridley Scott’s classic 1979 movie: in which the player is trapped on the Sevastopol space station with a single, intelligent, near-invincible alien. For this experience to play out as expected, the alien itself has to carry a large amount of the experience: a demanding feat for any AI in an industry in which non-player characters are either heavily scripted or suffer really short life spans.

So how did developers Creative Assembly pull it off? The short answer is through tried and tested AI techniques, designed in a manner that breaks from many traditional game-design concepts.

 

The Design of the Xenomorph

The team behind Alien: Isolation built the game around a simple premise: to survive an encounter with Ridley Scott’s original alien. Such a feat is pretty difficult to balance, given that you need a strong story to carry the player through, but also to establish pacing such that the tension varies throughout your gameplay. Neither of these are easy when you introduce a systemic AI into play: a collection of decision-making systems that react to what is happening in the game. It needs to know when it can participate in the experience and it what level it should do so. In order to do this, it required a unique design perspective.

Related:Game Design Deep Dive: The save system of Alien: Isolation

‘Psychopathic serendipity’: the alien always find itself in the right place at the right time.

As explained by Andy Bray in his talk at the 2016 nucl.ai conference, the player can’t be scared senseless all the time, otherwise they’ll just give up. The tension had to vary but also maintain an air of unpredictability in the xenomorph itself. This led to the developers seeking inspiration naturally from horror movies such as Ridley Scott’s Alien, but also adventure movies such as Jurassic Park. The resulting philosophy: ‘psychopathic serendipity’ is where the alien always find itself in the right place at the right time. Even if you’re in hiding and the monster can’t see you, and it doesn’t know your ultimate objective, it will still find a way to mess with your plans. However, the key to pulling this off was to ensure it wasn’t scripted. Co-ordinated jump scares while fruitful the first time are cheap; they won’t yield further reward in subsequent playthroughs. Instead, the player should have a sense of powerlessness, but still know that while the alien is smart, they are smarter.

Related:Fear in unpredictability: Alien: Isolation's brand of survival horror

But all of this goes against the grain of a lot of AAA games development: a world in which player empowerment is key. This means challenging a lot of design tenets that have held in pretty much every Alien game — from Alien 3 and Alien: Trilogy to Aliens: Colonial Marines. The biggest departure is that you cannot kill the alien. You can distract it and in time find ways to hurt it and scare it off, but you can’t kill it. But in another significant departure, a role reversal between antagonist and player: the alien will not only kill you frequently, but it does so with one hit. 

 

Building the Alien AI System

In order for this alien to work, Creative Assembly fell back on reliable and trusted AI techniques. Building systems that ensure the alien serves its purpose, but interestingly, also ensures it plays according to expectations.

To achieve this, the game requires two distinct behaviour management systems: the ‘macro’ or director-AI and the ‘micro’ or alien-AI. The director observes the player throughout the game, always knowing your location. Meanwhile the alien-AI is driven by a series of sensors and behaviours that allow it to hunt the player down. The director’s job is to point the alien in the direction of the player periodically, to give it a hint as to where it should be looking. Despite this, the alien is never allowed to cheat: while the director always knows where you are, the alien has to figure it out for itself. You can fool it, you can surprise it and you can escape it.

Related:Revisiting the AI of Alien: Isolation

The Director

The director is responsible for managing what is known as the ‘menace gauge’: a metric that allowed the system to understand how much it was pressuring the player. This is rather similar to an approach made in Left 4 Dead in which a stress gauge was used to prioritise enemy attacks. However in this case, menace would come not from attacking the player, but being in their proximity and the perceived increase in tension.

As such, the system would periodically wish to invoke menace upon the player and tell the alien to head to a particular location. While the alien is near the player, the menace gauge would increase depending on specific factors:

  • Whether the creature is within a short walking distance of the player.

  • Whether the player has actual line of sight on the alien.

  • Whether the alien was close on the motion tracker, but could also reach the player quickly.

The last item is particularly important, as the alien could technically be close on the motion tracker but in another room. As such, the menace won’t increase at the same rate given the threat is minimal.

‘Menace’ comes not from attacking the player, but being in their proximity and the perceived increase in tension.

Naturally once this menace metric has peak level, the director backs off and sends the alien elsewhere: either into neighbouring areas or up into the air vents. The general principle being that when the alien is closer, the game is scarier, but we need to give players a break after a while. Not only to ensure they stop freaking out, but to enable them to achieve some progress in the game.

This whole process is managed via a Utility AI or job system — previously used in the likes of BioShock: Infinite for the companion character Elizabeth — which dictates the task to complete, the location the alien should visit and the priority with which it should do so. The priority dictates to the alien whether it should finish what it is doing now, immediately move towards doing this action (and blend the required animations) or just outright interrupt everything and execute right now!

The job system allows the alien to operate in two main states of active and passive. The active state or 'front stage' mode, is when the alien is told to sweep areas of the map or search specific locations after a certain noise or trigger occurred. Meanwhile the passive or backstage mode occurs once menace levels peak for too long and it falls back into the air vents. But of course, it would then head for air vents up ahead it thinks you’re going to move towards.

The Alien Itself

The aliens behaviour is reliant upon behaviour trees: a technique we’ve previously highlighted in our video on the AI of Halo. The monster has over 100 nodes hidden within its behaviour tree system, with the top level of around 30 nodes responsible for selecting what type of behaviour it was about to execute. These top level nodes would then have the alien execute within large sub-sections of the tree responsible for specific sub-behaviours relating to specific tasks.

To add to this, certain parts of the behaviour tree are — on starting the game — locked off. The system gradually unlocks these behaviours in the tree as certain conditions are met throughout the game. This ensures that the longer you play, that the alien starts to exhibit new traits that keep you on edge. In a sense, it gives the impression that the alien is beginning to learn from experience, given the players behaviour is triggering the conditions that unlock it. Though as Andy Bray was keen to point out: none of these conditions come from events that lead to a players death. Otherwise the AI may develop an unfair advantage: given you might never figure out what you're doing wrong that is resulting in a gain for the alien. One concession however, is there are triggers in the final build of the game that unlock behaviours at specific points in your campaign if they haven’t already, that way the creature can keep pace with the player as they get better at the game.

When given a specific job to complete from the director, the alien is reliant upon a fast and efficient pathfinding system, with heuristics based on particular sensors the alien has. The alien can 'sense' player footsteps when walking or running, gunshots, and even the motion tracker when the player is around 1.5 meters away. Lastly, while it does not have sensors in the tail, it does have short-range ray traces that look behind it - eyes in the back of its head - with the intention of ensuring that players do not avoid detection by walking closely behind it.

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>