Who Am I? Lecturer in Computer Science Programme Leader for the BSc in Computer Games Programming Researcher in Artificial Intelligence Specifically, investigating the impact and phenomena exhibited by AI in video games. Teach AI in the undergraduate curriculum as well as conduct research projects.
AI and Games What Is It About? A series of talks discussing how AI impacts the design and creation of video games. Looking at research conducted by AI researchers in video games enhances the state-of-the-art. Today, we re looking at how AI has been adopted in a particular series of video games.
Today s Talk Today, we re looking at how artificial intelligence has been deployed in a particular video game series. How the AI was originally designed to achieve the basic gameplay. Also, how the AI and playtesting informed the design of the final product.
Left 4 Dead A cooperative first person shooter developed by Turtle Rock Studios and Valve Corporation. Left4Dead (2008) Left4Dead 2 (2009) Numerous DLC expansions. Massive critical acclaim. Sold over 11 million units across the franchise.
The Left 4 Dead Experience The trailer gives a nice summary of the Left4Dead experience. The Need for Co-Ordination You need to work as a team. As soon as teamwork evaporates, it all goes to hell. Unpredictable Enemies You don t know when more zombies will come to attack. Even worse, you don t know what type of zombie will come next. Panic! Often the intensity increases drastically. Cooperation helps you survive.
How This is Achieved In this talk, we are mostly interested in the director. An AI component within Left4Dead that manages the overall experience. Ensures the experience is different every time you play. What does it do and how does it do it?
Director Systems What is the purpose of a director? How is a director an AI system?
What Does the Director Do? The same thing as any director in film or theatre. Crafts the scene by working with the actors. There are two important differences when compared to film/theatre: 1. The cast are a little harder to manage. 2. The audience are active participants in the experience. If these factors cannot be controlled, the scene can become farcical. The director is responsible for managing the chaos.
How is this ai? Everything we ve seen far in this series is either: AI replacing the player. AI against the player. How is the director an AI system? The director has its own goals it needs to achieve. It makes rational decisions to achieve them. Even though these can mean death of the player.
The Director How does it work? What is it trying to do?
SETTING THE PACE The director is not really interested in killing the player, but on ensuring it is maintaining the pace of gameplay. In Left4Dead, the gameplay repeatedly moves through three key phases: Build-up. Peak. Relax These are one epoch of the experience and are repeated until the end of the level.
SETTING THE PACE The periodicity and intensity of these epochs can vary in a given match. But how does it know when to build the pace? How does it know when the pace has peaked? It measures stress levels.
Modelling Intensity and Stress The director observes how well each player performs in the game and by extension, how stressed the team is. This judgement helps the director how to act next. Having a huge impact on: When it attacks next. Where it attacks from. How it attacks. Who it attacks.
Stress Determines pace The stress level of a player and its rate of increase also tells the director how skilled the player is. Stress is modelled using a number of factors: How many zombies are attacking the player. How many zombies does the player kill within close proximity. Ammunition, health etc. If a player is pinned by a special infected, stress is set to maximum.
Setting the pace The Build-Up: The stress levels are too low. Attack the team such that we increase their stress levels. Identify particular targets to focus on. The Peak: All stress levels have exceeded some threshold. One last major attack at the team. Relax: Ease off all players. Allow them to heal/reload. Wait
Directing the phases What particular decisions are being made within the game as we move through these phases?
The Zombie Budget Left4Dead maintains a budget of whether zombies can be added to the game. It doesn t set a threshold on the total number of zombies. It limits spawning until the total zombies in scene are below a certain value. Typically there is a spawn rate whereby the director will hope to add new zombies as quickly as it can. Difficulty dependant.
Wanderers Random zombies typically on their own in the map. Spawned within proximity of the player, typically on the path. Removed if the player is too far away from them. Prone to being spawned in inaccessible areas.
Mobs Large groups of zombies that attack you en masse. Groups of 10-30 zombies. Spawned every 1-4 minutes. Never spawned in front of the player. Often to the side of the map. Or from a location not in direct line of sight.
Special Infected No more than three on the map at any one time. Only one of a given type at any one time. Minimum respawn time of 45 seconds 1 minute. Always spawn within proximity of players. Generally in front of you. Typically with intent to focus on someone in particular. Can (rarely) spawn in the safe houses.
Boss Infected Severely constrained. Can only appear in pre-defined locations. Limited number of spawns. Tanks No other zombies allowed to spawn while Tank is on the map. Will immediately head to attack players upon spawning. Witches Zombies typically do not spawn when in proximity.
Game Direction It s not just where the zombies are spawning.
Even More Direction Zombies are the primary means by which the director affects gameplay. It does have other opportunities it can exploit. These are more subtle and can change the overall structure and mood of gameplay.
Item Placement While limited, the director does have control over where items are placed in the map. Spawn positions are fixed and director decides which ones to use for certain items. Director will even swap items out at runtime depending on performance. E.g., swaps pain pills for health packs if team are really struggling.
Dynamic Maps A feature adopted in Left4Dead 2, is the idea of a map being dynamic and changing based on players performance. Changing the shape of the map. Adding obstacles. Activating car alarms. This only occurs in a handful of sequences. There is evidence in the map files that suggest there were other ideas that were experimented with and ultimately scrapped.
Varying control There are periods where the director does not control the environment at all. The game can decide to turn off the director depending on whether a certain sequence is taking place. Start of a level. Story sequence Build-up to a finale. Conversely, during finale/crescendo events, the director is less restricted in what it does. Which can lead to some rather interesting results.
Setting the Mood Outside of the AI director, there is also a sound director that dictates what sound/music is played within the game. These two systems talk to one another. The music and ambient noise changes as the AI director changes state. If you listen very carefully, you can actually predict when it s going to attack you.
The impact of directors The director presents something novel: an opportunity to create unique experiences every time you play the game. Subsequently had an impact on the industry as other games use them in interesting ways. Far Cry 3 and 4: manages animal/soldier spawns on the map. Warframe: spawns enemies, dynamically assigns challenges to teams. Rocksmith 2014: session mode has a director system that builds a band around your live guitar play.