The artificial intelligence in Alien: Isolation, released in 2014, has been widely recognized for the various elements that were combined to create the terrifying Xenomorph that hunted the player through the game. Illusions created by the game developers to illustrate a predator that genuinely hunted the player. The methods used to achieve this overall behavior were not necessarily complex, but executed in a way that made the experience flow and feel truly terrifying.
The AI of Alien: Isolation essentially developed into, what Becoming Human calls,
"A 'psychopathic serendipity': in which the alien always finds itself in the right place at the right time. Even if you're 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."
The element that truly makes this experience feel terrifying was to create every element in a style that didn't feel scripted. There were still elements that would alter the alien's behavior, of course, but it was important that none of them took any immersion away from the experience.
An important note is that the alien is also an entity that you cannot combat. If you are detected, you would have to escape it (which is quite difficult) in order to progress. The Xenomorph would eliminate the player on contact and the player could not kill it. This is important for the game dynamics and really emphasizes these elements of the player staying hidden because of the removal of offensive strategy.
Searching
“This thing isn’t moving towards a specific location in an optimal fashion; it’s searching, it’s hunting.” - Becoming Human
The pathfinding style of the Xenomorph is one that creates unpredictability and a challenge for the player. Unlike enemies in games such as Horizon: Zero Dawn where the AI has a set and predetermined path, the Xenomorph essentially goes wherever it wants to. There are definitely factors that can influence where the AI decides to hunt, ex: sounds and sensory signals, but the default searching phase is not definite.
Essentially, the developers chose points within an area that were considered common/easy hiding locations for the player. Points were also generated dynamically in different environments. These points were given to the AI and with that, the alien would search these points- unless another element took the alien's attention. While searching, the AI would visit each location in a non-optimal order. Whatever points were most visible is where the alien would hunt first, even if it was the furthest away. It would visit each node eventually- but it was also possible to go back and "double check" a node as well.
Balance was definitely a factor in the hunting styles of the alien. For example- there are also designated points where the AI will not search in order to avoid catching the player in an unfair situation.
A location for the alien to visit would have a classification as either a Search Location or a Spot Location. Search locations were for the alien to visit and then continue hunting- while Spot locations are where the alien will stop to look around and pause before moving on.
Project Process
I mimicked the search behaviors of the alien by creating a simple map in Unity and designating nodes for the alien to visit. It's an incredibly straightforward map for the purpose of this project. It mainly includes polygons for the player to hide behind that the alien cannot see through.
Applying a Unity Navmesh to the map established what was usable/unusable terrain for the alien when navigating. The Navmesh also advised the alien of its boundaries in order to not get stuck in the objects.
After the mesh was established, I placed the nodes and fed them into the AI's list of locations to visit. The alien would generate a random number within the length of the list. This number would be the index for the location in the list that it would next visit. I was unable to include the element of visiting every node in a non-optimal order, but there is not a set path in this project.
This resulted in what appears to be the alien double-checking areas, having no set path, and an unpredictable pattern from the hunter.
Ideally I would be able to include the implementation of the AI visiting the nodes in a non-optimal order, but that was unfortunately out of scope for this project. Sensory alerts can also influence the search location choice, but I will dive into that- as well as the alien "learning" abilities- later.
Field of View
The Xenomorph had both a forward-facing field of view, as well as a small one that faced behind it- creating the "Eyes on the back of its head" effect for the players. There were advanced elements such as lighting, duration, and access that also influenced how the AI would react to the player entering the line of sight.
The AI actually did have a lighting advantage over the player. It could see better in the dark and thus, if a player thought they were hiding in the shadows- it was very possible they would still be seen and caught. They could also utilize tools such as the air purity controls to create smoke and reduce the Xenomorph's detection.
In the diagram below from Gamasutra, the alien essentially has 3 different view perspectives. The purple cone is the default field of view that the alien uses when searching, the red cone is what the alien uses when it is searching specific locations or objects, and the green cone is the broad cone to prevent the ability to hide inches away from the Xenomorph to avoid detection.
The alien cannot detect a player hiding behind an object that is in these zones. If the alien's view of the player is not obstructed, however, then the alien will still not spot them immediately. The longer the player is in that cone, the higher the visual sensor becomes and once it reaches a certain level- the alien can definitely see the player and hunts.
As for looking backwards- 2Game describes it as,
“It has eyes on the back of its head. Not literally though, but it can see you if you try and walk too close behind it.”
The Xenomorph is given a small zone behind it to detect any players following them. The main reason for this is, like the broad green cone, they don't want players to be able to closely follow the Xenomorph to stay out of the sensors. If the player gets too close to the alien on any side, it will still see them and act accordingly.
Project Process
I decided to use Gizmos in Unity to visualize the alien's FOV. This element ended up pretty simplified in the end, as the visual sensor was also out of scope. In the end, the alien in the model has various Gizmos that portray different ranges for the front FOV, as well as the back FOV.
The lines in this image are:
Yellow Sphere- forward FOV radius
Blue Sphere - backward FOV radius
Blue Lines - forward FOV maximum and minimum angles
Cyan Lines - backward FOV maximum and minimum angles
Black Line - line going forward, showing where alien is facing
Red Line - line to show whether the alien can see the player
The player cannot see these lines, of course. This is only visible in the editor when the FOV script is open in the inspector. The alien is able to see the player when they are within the radius, as well as the max and min FOV angles. The red line does not tell the alien where the player is, it is only used for debugging by using a Raycast to see if the alien's view is obstructed.
In regards to the backwards FOV, the alien will detect if the player is following them and with this, will turn around to pursue them. The alien is still a bit slow to turn around, but it does pursue the player (cube).
Behavior Tree
“As you, the player, learn new ways of avoiding danger, so does the Xenomorph learn new ways to create it.” - 2Game
A common piece of feedback from players is that the Xenomorph "learns" from the player, finding new and efficient ways to beat them. This is a great addition to the horror aspect of the system- as well as creating new problems for the player to handle as the game progresses to keep it engaging.
This effect is achieved through a behavior tree. The Xenomorph begins the game with most behaviors locked and as the player performs specific actions- the behaviors then unlock and the alien gains more knowledge of how to hunt. Becoming Human writes that there are approximately 30 top-level nodes that will direct to subsections to specify how the Xenomorph should behave in specific situations. There are over 100 nodes overall.
Another important aspect in regards to balance is that there are not any behaviors that are developed from events that lead to the player's death. This prevents any unfair advantages for the Xenomorph- as the player is supposed to die a lot to make progress. It would create problems if the alien was getting smarter with every failure from the player.
This also allows the alien to keep up the challenge as the player gets better at the game.
Project Process
I made extremely simple behaviors to unlock for the demonstration of the concept. Things such as places you visit frequently and actions you repeat will affect the AI's decisions and behavior.
The abilities added in this model are:
If you visit a location often, the alien is more likely to visit there
If you repeatedly follow the alien, the backwards FOV will expand
If you continuously get spotted and then hide, the alien becomes faster
These are not reflective of ones in the game, they are just small concepts to get the idea across. The qualifications for each behavior are simple as well, but it still provides the illusion that the AI is "learning."
For the location behaviors, it becomes active when a player visits a location more than twice. The locations each have a trigger. In order for it to count as a "visit," the player has to stay in the trigger for more than 1 second, as well as they must leave the trigger and re-enter for it to count as a separate visit. Every time the player activates the behaviors, it increases the odds even more.
To increase the odds, there is a separate "advanced" list of locations. This list will add all search nodes at the start- giving equal odds to each element. When the player increases the odds of a search node- another instance of that location is added to the list. So if we had a list of 6 possible locations, this would increase the probability to choose it from 1/6 to 2/7. This also is a continuous possibility- it is possible to keep increasing the odds as you continue to visit that location.
The behavior for following the alien is really simple. There is a timer for 1 second and a counter for how many times the player is there. If the player is caught hiding there twice, the behavior unlocks and the radius for the alien's backward FOV will increase by .5 units. This is continuous as well and it continues to grow as the player repeats this pattern.
This concept is essentially the same for being seen, but outrunning the alien. If the player is caught in the FOV, but escaping before they get caught- the alien becomes faster. This is also just a timer for how long the player is in the FOV. It starts at 1.5s, but that timer increases every time this ability is achieved- making it take 1s longer each time they are caught. This is so the alien can't get too fast unreasonably quickly.
Each time the player unlocks a behavior- a diamond across the top of the screen will turn green. Each diamond represents an ability and this feature is also for debugging purposes.
This is meant to behave as a general idea of what this system is and how it functions- the behavior tree for the alien has much more detailed triggers and behaviors, of course.
Of all of the elements of the Alien: Isolation AI, there are 2 that I specifically couldn't add because of scope. I do hope to expand and add these to the model, but for this project, I can still explain them.
Sensory
“But critically, the creature needs these senses to be working together in order to attack the player.” - Gamasutra
The Sensory system allowed the AI to adapt to the player's actions in a much more personal way. The Xenomorph, in addition to its sight, had a sense for sound and would notice things- like if the player knocked something over.
Sound was the most involved sense- there were multiple actions that would summon the Xenomorph. The main ones are if the player uses their flashlight, the sound of walking/running, the motion tracker, and gunfire. The actions had different intensities as well- for example, the motion tracker would be heard if the player was within 1.5 meters of the player, while gunfire could summon the Xenomorph from the next room.
This system would be a more complex implementation- which I just didn't have time for. It definitely adds another layer to the hide-and-seek adventure in this game. The tools that grab the Xenomorph's attention- like the motion tracker- are also extremely important to the player's game and abilities, adding extra spice to the gameplay by putting a potential cost on their use.
The Xenomorph also seems even more deadly. If it can't see you, that doesn't mean it doesn't know you are there.
"The alien cannot see me right now, but its other senses are still active and it knows there's something nearby. Hence it's still a highly credible threat." - Gamasutra
The Director
The director is the all-seeing element that instructs the AI. In Alien: Isolation, the Xenomorph actually doesn't know where you are at all times. The director is the one that has the information for both the player and the Xenomorph's locations. It is also the controller of what is called the Menace Gauge. This is a system to keep track of how much pressure is bring put on the player. If the tension on the player gets too high, the director will instruct the Xenomorph away- somewhere to a different room or into the vents. Be warned though- this does not mean that it is safe. The Xenomorph still knows where you will be going and can act accordingly.
There are 3 factors that will change the menace gauge:
If the player can see the Xenomorph
How quickly the Xenomorph could get to the player
How close the Xenomorph is on the motion tracker- but this is influenced by obstacles
The 3rd factor is specific- in that if the Xenomorph is nearby, but on the other side of the wall, then the menace gauge will not increase as quickly.
"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." - Becoming Human
The game is supposed to be scary- but an impossible game where you get stuck is not enjoyable. This is the main function of the director- to allow the player to have some space to make progress. It keeps the game balanced between fear and challenge vs strategy and progress.
"While the alien is smart, they are smarter." - Becoming Human
Application
This AI model and the way it's built seem to be best suited for horror games or stealth games. Creating an entity that gives a true impression of hunting the player takes a lot of power and time- it should be one of the key elements of the game. Other games like Left 4 Dead have also used similar systems- specifically the menace gauge.
Games with environments like Prey are perfect for this eerie hide-and-seek behavior. It really does serve more as a model for a predator finding the player- it has so many elements to it that set the scene for horror, suspense, and stress. First-person games would be optimized for this system- the effect wouldn't be as immersive as intended if the player is able to see from a third-person view. The feeling of hiding and hoping you don't get caught feels so real when you get to see what the character sees.
Overall, this expensive system of AI should be used in games that need the unpredictability and tension in the game, and they need to be on a platform that can keep up with the demanding processing of these systems working together. Otherwise- AI as complex as this would be too taxing for the purpose that it is serving. Running all of the AI for the Xenomorph alone is enough to disqualify it from any platforms with low processing power- like mobile devices. This system really does need to be a major pillar for its technical expenses to be worth it.
For More Information
Becoming Human's The Perfect Organism - The AI of Alien: Isolation provides a fantastic overview of what the AI does and why this really is advanced AI. It goes very in-depth with the Director, as well as the alien's behavior trees and movement.
2Game's article How does the Xenomorph work in Alien: Isolation doesn't go as in-depth, but it has a lot of insight that was not mentioned on a lot of other sites- like metrics, relation to in-game experiences, and it briefly explains the psychology of some of the elements- why are they so scary and why do they work so well?
Gamasura's Revisiting the AI of Alien: Isolation includes incredible detail about the technology of the systems, as well as supplying visual depictions of the different systems. It goes much more in-depth on how things, such as the FOV, work and approaches them from a game developer mindset.
GitHub link to view the model of this project
Σχόλια