Playing FPS Games with Deep Reinforcement Learning
Paper · 2017 · Guillaume Lample and Devendra Singh Chaplot
Summary
In Doom, turning a corner can change almost everything a player sees without changing what lies just out of sight. A computer player has to make decisions from that moving view. It also has to learn which decisions helped when a reward may arrive well after the movement or shot that made it possible. Playing FPS Games with Deep Reinforcement Learning asks how to learn these skills for deathmatch, where a player must find opponents, fight them, and keep enough health and ammunition to continue. The authors use a recurrent network, which carries information from earlier observations into the current decision, and give its visual layers a direct way to learn about opponents.
Their initial recurrent learner managed simpler tasks but tended to shoot indiscriminately in deathmatch. Penalizing ammunition use gave the authors two unsatisfactory outcomes. A light penalty left the behavior largely intact, while a heavy penalty discouraged shooting altogether. The authors suspected that the learner was failing to recognize enemies. They trained it to predict whether an enemy was visible as well as to estimate the value of its actions. Doom supplied a visibility label for each training image. Both objectives shaped the same visual layers, and during evaluation the agent made its own prediction from the image. After 65 hours of training on limited deathmatch, the best kill-to-death ratio reported for the action network without the auxiliary task was below 2.0, while the version trained with it reached a maximum above 4.0.
The authors also trained a separate controller for navigation. Its practice environment contained no opponents, and its rewards encouraged it to move through the map and collect supplies. During a match, that controller takes over when the visual network detects no enemy or when the agent has exhausted its ammunition. With navigation enabled, the agent collected more items and achieved higher kill-to-death ratios in both the familiar-map experiment and the full deathmatch experiments, which included maps withheld from training.
The authors report that the resulting agent outperformed Doom’s built-in opponents and the human participants in their comparisons. The human tests used the familiar limited-deathmatch map, both in separate games against bots and in direct contests with the agent. The held-out maps show that the system could operate on some new layouts within Doom. Those maps also had fewer of the elevation changes that the controller found difficult. Taken together, the experiments show how visual supervision and separate practice for different parts of a game can help a learner cope with delayed rewards and a restricted view.
Deep dive: Playing FPS Games with Deep Reinforcement Learning
Playing FPS Games with Deep Reinforcement Learning explains how a Doom agent learns to detect enemies, fight, and navigate from screen images. · about 37 minutes to read
The problem and its context
The state of the game and the view from the player
A game engine can represent where players are, where supplies lie, and how the spaces around them connect. The image drawn for a player reveals only a portion of that situation. A nearby opponent may be behind the player or beyond a wall. Supplies may be around a corner the player has already passed. The authors call this partial observability. A screen image is an observation, while the state is the underlying situation that gives rise to it. Several different states can produce much the same observation.
This matters when the right response depends on how the player got there. Imagine that the player turns and sees an empty stretch of wall. The image can look the same whether the player has just turned away from an opponent or has been exploring an empty part of the map. Recent experience gives the empty view a different meaning in each case. An agent whose decisions depend on the current image alone has to respond to both cases on the same visual evidence. An agent with memory can carry forward a distinction between them, to the extent that the earlier images contained enough information to learn it.
The authors introduce Doom’s limited viewing angle as a concrete example. They describe a field of view of 90° in their background discussion and explain later that a wider display arrangement can expose more of the scene. Changing the display helps the player see more at once, but turning still changes what is visible. The difficulty comes from looking out into the game from a particular position and direction. Even a clear image can be a poor description of what happened a moment ago or what will become visible with the next movement.
The paper initially draws a broad contrast with earlier successes in deep reinforcement learning and then qualifies it in the technical background. Atari games can conceal variables as well. The authors’ practical point is that a current screen frequently provides enough information to choose effective actions in those games. They view first-person play as a setting where the gaps occur often and matter directly to movement and interaction. That is also the basis of their connection to robotics. The similarity they emphasize is the need to act from a local view of a surrounding space.
Why a deathmatch reward is difficult to learn from
In deathmatch, kills increase the score and suicides reduce it. Many of the activities that make a kill possible produce no immediate change in that score. A player may find a useful weapon, follow a route into another part of the map, spot an opponent, and adjust its aim before anything happens that the scoring system counts. A learner observing the final reward has to discover which earlier choices helped.
The rocket launcher makes the delay especially easy to see. The player can release a projectile and take another action before the projectile reaches anything. A successful hit may depend on how the player moved and turned before firing as well as on when the shot was taken. A shot fired casually can sometimes be rewarded by chance. The reward signals the eventual outcome, leaving the learner to distinguish a reproducible action sequence from a lucky one. A deathmatch consequently puts a demand on learning from experience even when the game engine can score each outcome exactly.
Perception and resource management make that same problem harder in different ways. The apparent size and angle of an enemy can change with distance and the player’s orientation. The background can change as the player goes through different rooms or maps. Meanwhile, having recognized an opponent may be of little use to a player who has run out of ammunition. Finding supplies can take the player away from any immediate opportunity to score, yet it can improve the prospects of scoring later. The game mixes these demands within the same stream of decisions.
The authors also discuss a strategy that changes how apparent success should be interpreted. An agent can stay in a small area and wait for opponents to come into view. This behavior, called camping, can help it avoid deaths without requiring it to become adept at exploring or collecting items. A kill-to-death ratio can look favorable in such a case. The possibility matters to the research question because the authors want to know whether the agent has acquired several complementary behaviors, including the ability to move through the environment and find resources.
What the authors build on
Reinforcement learning is a form of machine learning in which an agent learns a rule for acting through interaction and reward. The rule is called a policy. The paper’s foundation is deep Q-learning, which uses a neural network to estimate the future return associated with a choice. A network trained in this way can select the action with the highest estimate without needing an example of the correct action for every screen. The authors cite Atari play as an important demonstration of this approach and discuss Go as another example of the progress in learned decision-making.
The introduction also places the work beside earlier research on robot control and control problems based on physics. These examples establish the range of applications that motivated the paper. The authors additionally cite an application of learned control to object recognition. In that case, the choice concerns where to direct visual attention, as studied in Multiple Object Recognition with Visual Attention.
A more direct precedent is Hausknecht and Stone’s deep recurrent Q-network. The recurrent part updates an internal state every time it receives an observation. An estimate for the current decision can therefore depend on information already accumulated in that state. Earlier work applied this approach to Atari games. The Doom paper also points to Foerster and colleagues’ use of recurrent networks in a setting where agents communicate to solve riddles. Together these examples motivate the use of an internal state when information needed for a decision is spread across observations.
The authors credit earlier shooter research by McPartland and Gallagher and by Tastan and Sukthankar with separating navigation from combat. Those approaches used information from the game engine. The paper also cites driving work in TORCS in which a recurrent network learned from pixels, and earlier ViZDoom experiments using a basic deep Q-network in simpler Doom scenarios. The ViZDoom work examined how the spacing between decisions affects performance when the selected action repeats across game frames. These precedents supplied several ingredients for the new study. The question in deathmatch was how to combine a visual representation, a memory of recent events, and specialized behavior when immediate input and occasional score changes supply different parts of the learning signal.
The method, step by step
From a screen image to a decision
The authors begin with a deep recurrent Q-network, abbreviated DRQN. A visual front end turns a frame into a set of features, which are numerical responses to patterns in the image. A recurrent component uses those features to update its memory and estimate the value of each possible action. In the simpler scenarios described by the authors, that arrangement can learn to turn and attack. In deathmatch, the baseline often fires while waiting for a chance encounter. The authors’ attempt to correct it through an ammunition penalty motivates a change in what the visual front end learns.
They give the front end a second job during training. Alongside estimating future rewards, the network learns to answer a question about the immediate image. Is an enemy visible? Doom can supply that answer automatically. The new objective reaches the same image-processing layers used by the recurrent controller, so a training image can help shape those layers even when the associated action earns little useful reward. This changes the input to the recurrent component through the features learned by the visual layers.
The resulting action network can recognize situations in which the agent may have an opportunity to fight. The authors use its visibility prediction to decide who controls the next action. A separate navigation network takes over if the detector finds no enemy or if there is no ammunition. The flow below describes how the components work together during play. Training each component involves a different set of feedback signals, described further below.
How the Doom agent chooses an action
The steps in order.
Define what a choice is worth
The reward at a given moment is only part of the outcome of a choice. A turn may yield no reward of its own yet bring something into view that the agent can act on later. The paper describes the value of future outcomes through the discounted return. Discounting gives a reward less weight as its distance from the decision increases.
Rₜ = ∑(t′ = t to T) γ^(t′ − t) rₜ′
Rₜ is the return from time t onward. The summation sign ∑ means to add a term for every time index t′ starting at t and ending at T, when the game terminates. Each rₜ′ is the reward at the indexed time. The discount factor γ lies in the interval [0, 1]. The power t′ − t measures the distance from the current time and determines the weight of that term. In this setup, the return is a running objective for learning, whereas a frag tally describes a game outcome.
The Q-function assigns a value to taking a given action from a given state and then continuing under a policy. A particular action can be useful under one policy and yield little under another. For example, turning toward a supply may improve future return if the policy then collects it and uses it in a later encounter. The definition includes those consequences through the return.
Q^π(s, a) = E[Rₜ | sₜ = s, aₜ = a]
Q^π denotes the value function for policy π. The entry s is a state and a is an action. E denotes an expectation over what can follow. The vertical bar introduces the conditions for that expectation. They fix the starting state sₜ and action aₜ at time t to s and a, respectively. Rₜ is the discounted sum defined above. Continuing under π determines how later decisions enter the expectation.
An optimal value asks what the best continuation could achieve, given the same starting action. Comparing those optimal values would let an agent choose the action with the best expected prospects from the current state.
Q*(s, a) = max(π) E[Rₜ | sₜ = s, aₜ = a] = max(π) Q^π(s, a)
Q* is the optimal action-value function. Each max(π) takes the maximum over policies π. The expectation E holds the initial state sₜ at s and the first action aₜ at a, then considers future outcomes through Rₜ. The second equality expresses the same operation using Q^π, the value already defined for each policy. This is an ideal quantity. The game supplies transitions and rewards from which to estimate it.
Q_θ(s, a) ≈ Q*(s, a)
Q_θ is the value estimated by a network whose adjustable parameters are denoted by θ. For a state s and candidate action a, training aims to bring this estimate near the optimal value Q*. The symbol ≈ indicates that the network is used as an approximation. In the recurrent design, what the network knows about the state will come from the image and its remembered context.
Turn experience into a learning target
The paper uses the Bellman optimality equation to connect the value of the current action to the values of later actions. It describes a useful recursive relationship. If the best values at the next state were already known, a learner could combine them with the immediate reward to establish the value of the choice that led there.
Q*(s, a) = E[r + γ max(a′) Q*(s′, a′) | s, a]
On the left, Q*(s, a) is the optimal value for taking action a in state s. On the right, r is the immediate reward and s′ is the successor state. The operation max(a′) picks the largest optimal value over possible successor actions a′. The factor γ discounts that future value. E averages across rewards and successor states conditional on s and a, written to the right of the vertical bar.
Training substitutes the network’s available prediction for the unknown optimal future value. A stored transition says what action was taken, what reward followed, and what the agent saw at the next step. The next input can be evaluated by the network to produce an estimate for the most promising continuation. Using an estimate of a later value to teach an earlier one is how this update can carry learning beyond experiences with an immediate reward.
yₜ = r + γ max(a′) Q_θₜ(s′, a′)
The target for the update at time t is yₜ. It adds the observed reward r to the continuation estimate discounted by γ. Q_θₜ denotes the network with its parameters θₜ at that training step. The maximum is taken over successor actions a′ available at state s′. The paper holds the resulting yₜ fixed when changing the prediction for the current state and action.
Lₜ(θₜ) = E(s, a, r, s′)[(yₜ − Q_θₜ(s, a))²]
Lₜ is the loss at time t, evaluated at the parameter setting θₜ. The expectation E is over transitions comprising state s, taken action a, reward r, and successor state s′. Within a transition, the quantity being squared is the difference between target yₜ and the estimate Q_θₜ for the action actually taken in s. Squaring penalizes errors in either direction and puts greater weight on larger discrepancies.
The paper writes the following expression for the gradient. With a fixed target, the right-hand side has the sign of a descent update. The derivative of the displayed squared loss itself has the opposite sign and includes an overall constant factor. That distinction matters when reading the equations as an account of how the prediction is moved toward its target.
∇_θₜ Lₜ(θₜ) = E(s, a, r, s′)[(yₜ − Q_θ(s, a)) ∇_θₜ Q_θₜ(s, a)]
The operator ∇_θₜ denotes differentiation with respect to the current parameters θₜ, and Lₜ is the loss. The expectation E covers the transition variables s, a, r, and s′. The paper writes the prediction in the residual as Q_θ(s, a) and the differentiated prediction as Q_θₜ(s, a). For the update both refer to the action-value network at the current parameter setting. The residual is the target yₜ minus that prediction, and the differentiated prediction describes how adjusting the parameters would change the estimated value of a in s.
∇_θₜ Lₜ(θₜ) ≈ (yₜ − Q_θ(s, a)) ∇_θₜ Q_θₜ(s, a)
The approximation sign ≈ here replaces the average over possible experiences with the expression for a sampled experience. The loss Lₜ, gradient operator ∇_θₜ, target yₜ, estimates Q_θ and Q_θₜ, state s, and action a have the same roles as in the preceding expression. The return target can be above or below the current prediction, so the sample can push that estimate in either direction. The experimental procedure applies updates using minibatches of stored experiences.
Make the decision depend on a history
A deep Q-network, or DQN, provides the value estimator in the background description. That description starts with a state s as the network input. For the Doom agent the network has a visual observation, and information carried from the previous step can compensate for some of what is missing. A recurrent network creates that information as part of processing the stream of images. The resulting internal quantity is called the hidden state.
Q(oₜ, hₜ₋₁, aₜ)
Q is the action-value estimate, oₜ is the observation at time t, and hₜ₋₁ is the hidden state carried over from the previous time. The candidate action at t is aₜ. The estimate can depend on a previous glimpse of an enemy even when the current image gives no fresh evidence about that enemy. The extent to which earlier evidence affects the decision depends on what the network has learned to encode.
hₜ = LSTM(hₜ₋₁, oₜ)
LSTM stands for long short-term memory, the kind of recurrent network used here. The equation describes an update from the preceding hidden state hₜ₋₁ and the observation oₜ to the current hidden state hₜ. In the implemented architecture, the observation reaches the LSTM through the visual front end. The compact background notation writes the observation directly as an argument. Repeated updates across successive observations allow information to persist when it helps the network estimate future outcomes.
Q(hₜ, aₜ)
After the update, Q gives the estimated value for action aₜ based on the new hidden state hₜ. That state already incorporates information from the current observation and what the LSTM retained from earlier ones. The recurrence supplies a learned summary of experience. Its contents are determined by training, and the state of the full game remains only partially observed.
Train the visual layers to answer a direct question
The authors modified Doom through the ViZDoom environment so that frames could come with Boolean labels describing visible entities. A label says whether a particular kind of entity appears in that image. The interface could return such information about enemies and about objects including weapons, health packs, and ammunition. The reported system uses enemy presence. A frame showing an enemy receives a positive label regardless of whether the agent ultimately shoots, misses, or takes a different action.
The frame first goes through two convolutional layers. A convolutional layer applies learned filters across locations in an image or in the output of the preceding layer. The result can represent an image pattern wherever it appears on the screen. At the output of the second layer the computation branches. One path flattens the visual representation into a vector and sends it to the LSTM, which supplies the information for the action-value scores. The other path sends the representation through fully connected layers of sizes 512 and k. Here k is the number of game features to predict. The last layer represents those features, with enemy presence supplying the target used in the experiments.
The visibility branch is trained using cross-entropy, a loss that increases when the prediction gives low probability to the class indicated by the label. The action branch uses the recurrent Q-learning objective. The architecture combines the losses during training. The paper describes the combination in words and leaves its relative weighting unspecified in the equations. Both learning signals affect the convolutional parameters because both branches consume their output. An improvement driven by the classification task can therefore change the representation on which the recurrent action estimates depend.
The engine’s visibility label is a training target. The LSTM receives convolutional features throughout training and play. During evaluation, the separate output of the visibility branch supplies the agent’s estimate of whether it sees an enemy. An instructive detail is the difference in what the branches are asked to do. The detector answers a question about what is in the frame now. The LSTM can use the same visual features along with earlier evidence to decide which action has promising consequences. The detector can teach the shared filters to respond to cues that are useful across those different time horizons.
Prepare a navigation specialist
The navigation network is a DQN trained separately from the action network. Its training map contains no enemies, so its experience focuses on moving and encountering items. The available navigation actions are to go forward, turn left, or turn right. A smaller action set means the network has fewer alternatives to learn about across the situations it visits. The authors also point out that the specialists can be trained independently and in parallel.
The action network still processes the observation at each evaluation step. If it detects an enemy and ammunition is available, it selects the game action. If its prediction indicates no enemy, the navigation network supplies the action. That network also takes over when the agent has no ammunition, even if an enemy is visible. The dispatch rule makes sense in terms of what each network practiced. The navigation specialist can keep moving in search of supplies, and the action specialist handles encounters in which the agent can fight.
The architecture gives enemy detection two roles. During training it guides the visual representation used to estimate action values. During play its prediction helps decide which controller gets to act. A missed detection can therefore matter even if the recurrent component would otherwise have produced reasonable action values. Similarly, the navigation network influences which parts of the map the action network will encounter next. Training the specialists separately still leaves them interacting through the sequence of situations created during a match.
Provide intermediate rewards
The authors call their changes to the learning reward reward shaping. A frag-based signal alone would leave few replay entries with a non-zero reward, and a large share of the choices leading up to those rewards would have occurred several steps earlier. The action network gets positive feedback for kills and negative feedback for suicides, with additional rewards or penalties for events that occur along the way.
Picking up health, a weapon, or ammunition earns a positive reward. Losing health earns a negative reward, whether the loss results from an attack or from walking on lava. Shooting or otherwise losing ammunition incurs a penalty. The same shot can therefore have an immediate ammunition cost and a later benefit if it kills an opponent. The role of the value estimate is to take those consequences together over time. The earlier trials with different ammunition penalties illustrate why the behavior still depends on learning when a shot is likely to help.
Navigation has its own reward because its practice environment isolates a different task. The network earns a reward for obtaining an item and a penalty for walking on lava. It also earns a small positive amount proportional to the distance it traveled since the previous step. The authors introduced this signal to encourage progress through the map, since the network could otherwise spend much of its time turning in place or in circles. The travel reward provides feedback between item pickups. It complements the reward for actually collecting something along the route.
Reuse experience while preserving temporal context
The agent stores experiences in replay memory. In the ordinary state-based description, each entry records a transition. Visual learning uses the corresponding observations of the game.
(sₜ, aₜ, rₜ, sₜ₊₁)
The tuple records the state sₜ at time t, the action aₜ taken from that state, the reward rₜ, and the succeeding state sₜ₊₁. In Doom, the agent’s visual observation stands in for direct knowledge of the state. Keeping past experiences makes it possible to train on events sampled from different parts of play. This reduces the dependence on any one run of consecutive frames and lets the learner reuse an event after the original interaction has ended.
For the recurrent network, the sample has to provide a history as well as a transition. The authors draw a sequence of n observations from replay. They start the recurrent computation for that sequence with a reinitialized hidden state. This gives the first observations in the sample an artificial beginning. In the original interaction the agent may have seen earlier frames that provided useful context. The first action-value estimates in replay are consequently based on a shorter history than estimates made during play.
The method uses an initial portion of each sequence to build up the hidden state. These observations pass through the recurrent network, but prediction errors for the actions at those early positions are excluded from the updates. Errors at later positions are used for learning. The last observation is needed to obtain the successor estimate for the last updated action. This arrangement uses the continuity of the sample where the recurrent network needs it while avoiding a loss on the estimates most directly affected by the reset.
o₁, …, oₕ | oₕ₊₁, …, oₙ₋₁ | oₙ
Each o with a subscript is an observation at that position in the sampled sequence. The length is n and the initial history length is h. The first vertical bar marks the start of the positions whose action-value errors contribute to training. The second separates those positions from oₙ, which supplies the next observation for the final target at oₙ₋₁. The ellipses indicate the intervening observations in sequence order.
The paper illustrates the procedure with h = 4 and n = 8. The first four observations establish context, and the actions at positions 5, 6 and 7 contribute errors. The observation at the end supplies the next input for the action at position 7. The experimental setting also uses a minimum history of 4 and applies updates at 5 positions. The illustration establishes the roles of the positions, while the experimental settings specify how many action estimates actually receive updates in the runs.
Updates have to preserve a workable amount of variation across replay samples. Using many successive decisions from the same passage of play could put almost identical observations into the training update. In the opposite direction, using very few positions could make a sequence provide little learning signal after the initial context has been built. The authors choose the update count empirically and compare alternatives using the limited deathmatch learning curves.
Set the timing, input, and exploration schedule
Frame skipping controls how frequently the agent obtains a new screen and chooses a new action. In the paper’s notation the agent receives an image every k + 1 frames, where k here counts skipped frames. It repeats the chosen action across the skipped frames. With more skipping, the learner can advance through play with fewer evaluations of the network. With a turn held for too long, it can pass the orientation it was trying to reach. The authors choose k = 4 as the best compromise they found between training speed and the precision needed for play.
The display configuration affects what is available to the agent before any image is resized. The authors associate a 4/3 display setting with a 90 degree field of view and a 16/9 setting with a 108 degree field of view. They use the latter setting, rendering images at 440x225 and resizing them to 108x60. The wide view gives the visual network more of the scene around the direction of travel. The smaller working image limits what it has to process. In their development trials the authors found grayscale faster, but color gave better performance and was retained for the experiments.
During training, the policy sometimes chooses randomly so that experience includes more than the actions the network currently favors. The authors use the following probabilities for what is called ε-greedy action selection.
P(random choice) = ε, P(choice by highest estimated value) = 1 − ε
P denotes the probability of using the indicated selection rule. The exploration probability ε is the chance of choosing randomly. The complementary probability 1 − ε selects by the network’s current action-value ranking. These are probabilities for the choice procedure. A random draw can still happen to select an action that the value ranking favors. The probability ε decreases linearly from 1 to 0.1 over the first million training steps and then stays at 0.1.
All networks use RMSProp to adjust their parameters, with minibatches of size 32. Weight updates occur every 4 steps. On average, the authors say that each experience is sampled 8 times during training. Replay retains the one million most recent frames, and the discount factor γ is set to 0.99. The experience for this procedure is generated by playing through ViZDoom. Its interface lets the agent issue a command and receive input in step with the game, and the engine modifications make the visual training labels available alongside the images. The authors identify Arnold as the agent built around the action and navigation architecture and make its code available under that name.
Experiments and results
The familiar map and the held-out maps
The authors adapt their two deathmatch tasks from the Visual Doom AI Competition. In limited deathmatch, training and evaluation take place on the same map. The rocket launcher is the only available weapon, with health packs and ammunition to collect. The authors use this task for quicker comparisons of design choices because it takes less time to train than full deathmatch. A change in learning can be studied there without also requiring the agent to handle a new layout at evaluation.
Full deathmatch uses 10 training maps and 3 test maps. The agent initially has a pistol and can acquire other weapons, ammunition, and health by moving through the environment. The authors also vary textures during training and report better generalization with that choice. The held-out split tests whether the trained behavior works on layouts outside the training set. It also makes resource acquisition more consequential. A player that spends a match relying on the starting pistol faces a different prospect from one that picks up other weapons.
The principal comparisons use Doom’s built-in bots as opponents. In the navigation experiment, the authors evaluate the agent with and without the navigation network for 15 minutes on each map. For full deathmatch, results are averaged across the 10 training maps and, separately, across the 3 test maps. The distinction between those aggregates matters because the maps vary in structure and supplies. The limited task has its own map and equipment rules, so it offers a separate comparison of the controllers under its particular conditions.
What the scores measure
The paper uses frags for the game score. A frag tally rises with a kill and falls with a suicide. The evaluation also uses K/D, the kill-to-death ratio. This relates successful encounters to the frequency with which the player dies. Suicides enter the denominator as deaths. With an explosive weapon, a shot fired close to the player can therefore harm both the frag tally and K/D. A policy that fires often can look effective by kill count alone while paying a substantial price in self-inflicted deaths.
Kills also have a purpose as a separate measure. A ratio can favor a player who rarely leaves a safe location, particularly if that player dies infrequently. Kill counts help show how frequently an agent accomplishes the objective during the match. Counts of pickups are pertinent to whether the agent reaches supplies, while deaths and suicides help explain how its ratio arose. The counts and the ratio together allow the authors to discuss the behavior producing a result, such as obtaining health frequently enough to survive longer on the familiar map.
Learning to see enemies
The action-network experiment on limited deathmatch compares a recurrent network trained with enemy presence labels to one trained without them. After 65 hours of training, the authors give a bound for the strongest K/D observed in each condition. It is below 2.0 for the network without the feature objective. With that objective, the maximum is above 4.0. These are best scores reached during training. The comparison establishes a separation in observed performance within that training period, with the values reported as inequalities.
The visual objective also supplies a measure that can be examined early in a run. The authors report that enemy-detection accuracy reaches 90% in a few hours in the successful recurrent configuration. Training the full controller can take up to a week. A decision about the visual layers can therefore draw on a result obtained well before the control policy has finished developing. The dropout comparison is the numerical example in the paper. Dropout suppresses some network activations during training, and the authors compare how accurately the auxiliary branch detects enemies with that training setting enabled or disabled.
Action-network enemy detection in the limited-deathmatch study by dropout setting
Training with dropout yields the higher converged enemy-detection accuracy.
The numbers
| System or setting | accuracy % |
|---|---|
| Without dropout | 70 |
| With dropout (this paper) | 90 |
The percentages describe correct enemy-presence predictions in the authors’ comparison of training configurations. The limited-deathmatch plots report a separate outcome for the action network, its K/D during learning, and also favor the use of dropout. The authors use the two results together. The detection figure tells them that the visual representation supports the immediate classification task. The game result tells them that the stronger visual configuration also helped in the larger task of acting on the observations.
What navigation adds to the match
The navigation comparison favors the combined controller in both tasks. With navigation, the agent picks up more objects and achieves a higher K/D ratio. On the limited map the authors report more than three times as many pickups. They describe the map as small and crowded with bots, so exploration makes a relatively modest difference to the chance of encountering an opponent. The pickups still matter for survival. Access to health packs gives the player opportunities to recover, which the authors link to fewer deaths and a better ratio.
The reported effect on K/D is larger in full deathmatch. The authors attribute that difference to the importance of acquiring a better weapon and ammunition when the player begins with a pistol. Navigation can improve the conditions under which the action network faces its next opponent. The pickup count gives this explanation observable support since it measures an immediate output of the specialist’s behavior. The results establish the direction of the score changes and the reported pickup improvement on the limited map. The authors describe the full-deathmatch score gains in comparative terms.
The agent performs better on the held-out maps than on the training maps in the full-deathmatch evaluation. The authors point to a structural difference between the sets. The test maps have fewer stairs and fewer changes of level. Those features are difficult for an agent that was never trained to adjust its vertical view. The result gives evidence that the architecture works on the specific held-out maps, including their different appearances and layouts. The difference in geometry also helps explain why the new maps could yield the better scores.
Comparisons involving human players
There are two human comparison protocols, both on the limited-deathmatch map. In the one called single player, the humans and the agent play separate games against 10 built-in bots. Each game lasts three minutes. The common opposition supplies a basis for comparing their performance under the same type of task. In the multiplayer protocol a human plays against the agent in the same game, for five minutes. The human scores for both scenarios are averages over 20 players.
The authors report that the agent outperforms the human group in both scenarios. They also draw attention to the human suicide rate, which they describe as particularly high. Under the limited task’s weapon rules, inaccurate shooting at short range can hurt the player. The authors interpret the suicide result as a sign that the available reaction time makes accurate aiming difficult. The two protocols provide evidence about performance against bots in separate sessions and in direct play against the agent, each on the familiar map and with its own time limit.
The competition gives another measure of how the complete architecture performed. The authors report that Arnold placed second in both tracks of the Visual Doom AI Competition and achieved the highest K/D ratio. Placement and K/D describe different outcomes. The finish is its standing in the competition, while the ratio measures kills relative to deaths. The paper reports both alongside its own evaluation against the built-in opponents and the human participants.
What the ablations show
The way the visual objective reaches the controller matters
The comparison with ordinary recurrent Q-learning removes the enemy-presence objective from training. Both versions have action values informed by recurrent state. With the extra objective, the visual layers also have a direct criterion for distinguishing images in which an opponent is visible. Performance improves markedly under that change. The baseline’s firing behavior and the unsuccessful trials of ammunition penalties make the result easier to interpret. A penalty supplies information about the cost of a shot. The label supplies different information about an image that could make a shot worth taking.
The authors also tried making game-feature predictions in a separate network and passing the predictions into the LSTM. That alternative failed to improve on the initial recurrent baseline. This comparison concerns where the training signal acts. In the successful arrangement, classification changes the same visual filters that are used for estimating action values. In the separate arrangement, the recurrent controller gains an additional prediction, while the original visual path loses the benefit of learning from the label. The outcome supports the authors’ explanation that joint training of the shared filters is important in their setup.
There is a distinction between the semantic content of the auxiliary output and the information available in the layers that produce it. The output concerns presence. Features useful for predicting presence may also respond to where an enemy appears, since the filters operate across the image. The authors suggest that the LSTM receives information about enemy position as well as visibility through those features. The experiments measure visibility accuracy and game performance. Their connection supports the proposed account of the representation, while precise localization remains an inference about what the shared layers learned.
Single-frame prediction fits the recurrent architecture
The paper describes an attempt to use the auxiliary task with a conventional DQN that takes a stack of frames. Here the target still asks whether an enemy appears in the newest frame. An enemy may be visible in an earlier frame in the stack and absent from the latest one. The network must answer from a visual representation of the entire stack and distinguish the frame the label refers to. In the recurrent version the visual branch has a single image to classify, with earlier information carried through the LSTM for action selection.
In the stacked-frame trials the authors report that enemy-detection accuracy never went above 70%, even with dropout. This is a separate result from the 70% reached without dropout in the experiment on the recurrent network. The numbers concern distinct changes. The stacked-frame trial varies the way time enters the visual network, while the dropout experiment varies a training technique. The authors present the stacked-frame result as evidence that their shared-layer approach fits naturally with current-frame input and separate recurrent processing of history.
The dropout curves then show that even with this alignment, learning useful features depends on the training configuration. The stronger convergence result for visibility prediction and the improvement in K/D give the authors a practical reason to monitor both. A quick rise in the auxiliary accuracy can identify a promising visual configuration. The action-network curve gives the relevant evidence for whether it helped in play. The comparisons show agreement between those signals for the tested choices, with detection accuracy measuring an earlier and more limited skill.
The navigation comparison tests a complete specialist
Turning off the navigation network makes it possible to ask whether the combat component can manage the whole match by itself. Turning navigation on brings in a controller with its own actions, an item-oriented reward, and prior experience on a map without enemies. The stronger item collection with navigation is evidence that this combination changes the agent’s movement and resource use. That result is especially informative because the initial unsplit approaches had shown a tendency to stay in a small area.
The comparison also gives a way to interpret the different K/D outcomes across tasks. The navigation policy can give a player access to health in the limited scenario, where opponents are relatively easy to find. In the full scenario it can help the agent get beyond its initial equipment. The authors’ account is that the same specialist improves different conditions of a fight depending on the map and available objects. The ablation evaluates the contribution of the specialist as a whole. The source of any gain within that package could include the restricted action set, the shaped reward, or the practice environment.
Replay and other training choices
The replay curves vary the number of positions at which the recurrent network gets an action-value update. The authors report difficulty converging with too few updates. Too many updates involve more nearby frames, weakening the diversity that replay is meant to provide. The result supports a middle ground in the amount of each sequence used for learning. It also clarifies what kind of history the network gets in training. Early frames are used to populate the hidden state because even a suitable update count would be of limited help if every prediction were made from a newly reset memory.
Several additional comparisons guide the final configuration. The authors describe slower but more effective learning with color input than with grayscale. Their choice of frame skipping reflects a tradeoff between more rapid training and finer control of turns. They report that texture variation helps with generalization, and that a reward for distance traveled makes the navigation agent explore more readily. These observations have a different evidential role from the paired results for dropout or the with-and-without-navigation comparison. They explain decisions made during development, with their effect sizes left open.
Limitations
Limits identified by the authors
The authors explicitly caution against comparing scores between the limited and full deathmatch tasks. The maps vary in size and in the resources available, so the conditions for collecting an object or encountering an opponent change. The within-task comparisons, such as adding navigation on the same maps, give the clearest basis for attributing a score change to the agent. Separate averages over full-deathmatch training and test sets describe how the system performed on those particular sets.
The vertical viewing restriction also has a direct effect on the results. The agent was never trained to look up or down, and the authors identify stairs and differences in elevation as difficulties. They note that these features are less common in the held-out maps. The split therefore combines unfamiliarity with a shift in the prevalence of geometry that the agent finds hard. Better scores on the test set can coexist with real challenges from unfamiliar layouts, and the authors account for the ordering in terms of the layouts they chose.
The paper also recognizes that several measurements and settings involve tradeoffs. K/D can favor caution or staying in one place, so the authors include kills, pickups, and other counts. Frame skipping speeds up training but can carry a turn past the target. Sampling contiguous experience gives recurrence a usable history while increasing correlation when too many neighboring states contribute errors. In each case the paper identifies a practical limit and selects a working configuration for these Doom experiments.
Bounds on what the experiments establish
A careful reading distinguishes what the visual system learns from what information the researchers have during training. Enemy presence is supervised by an instrumented engine. The final detector must use pixels to reproduce that judgment, and the controller also checks whether ammunition is available when choosing a specialist. The account of the switch specifies the ammunition condition without explaining a separate visual recognition procedure for it. The experiment establishes the use of learned visual enemy detection in action selection. Its training result depends on access to an environment that can supply reliable labels for the target it studies.
The engine could also label other visible entities, but enemy presence is the feature tested in the reported architecture. Whether additional supervision for weapons, health, or ammunition would help remains open. The accuracy for enemy detection is given as a percentage, with the composition of the evaluation frames and the separate rates for misses and false alarms left unspecified. Those errors could have different consequences for play. A missed enemy can leave control with navigation, while an unwarranted detection can send control to the action network when the player would otherwise explore. The percentage summarizes detection performance without quantifying those consequences individually.
The memory component likewise gives the controller the capacity to use earlier observations. How much the strategy depends on a particular remembered event is a different question. The replay comparisons examine how training responds to a change in the update procedure. The paper offers no corresponding measurement of what the LSTM retains over particular intervals during play. A favorable K/D can establish the practical value of the configuration in the scenario, while leaving the content and duration of its memory mostly unexplained.
The experimental evidence for the principal design changes also comes in different forms. Reported K/D maxima show what each action-network condition reached in the observed training period. They leave typical performance across independent runs and variability around that performance undetermined. Enemy-detection accuracy gives the authors a useful intermediate result, with the strength of its relationship to later K/D beyond the reported comparisons still open. The navigation comparison supports the package of an independent controller and its training setup. The individual contributions of navigation rewards, the restricted action choices, and enemy-free training remain bundled.
Reward shaping presents a related question about the objective. The action network receives feedback about health, supplies, and ammunition in addition to events that change the frag score. Those events help it learn from otherwise uneventful parts of the match. Their influence on the final policy depends on the incentives they create together. The experiments establish that the configured agent performed well with them in place. They leave open how different weightings would change the behavior and which terms are essential. Likewise, the authors describe independent training as amenable to parallel execution, with the architecture supporting that possibility even though its saving in training time is left unquantified.
The held-out evaluation concerns Doom maps, game rules, and actions. It establishes transfer within the tested environment. Questions about a different game or interaction with physical surroundings remain beyond its scope. The human results are bounded in a similar way. They concern the people who played under the paper’s familiar-map protocols. A reader can use the time limits, bot opposition, and shared map to understand those comparisons. The paper leaves the participants’ experience and the sensitivity of the result to other maps and weapon settings open. The authors’ finding is best understood as an outcome under those specified conditions.
What came after
The paper identifies a continuation in Arnold, which uses the action and navigation architecture in the Visual Doom AI Competition. Its competition results put the complete controller in a setting where the specialist handoff has to function throughout a match. Enemy detection can improve the representation available to the action network, but the competition entry also has to move into situations where that representation is useful. Arnold connects the architecture studied through the limited-deathmatch learning curves to whole-agent play.
The citing works point to related research questions. Learning to Navigate in Complex Environments takes navigation as its subject. In the Doom system, navigation is a distinct control problem with its own action space and rewards, trained under conditions that isolate exploration and collection. That makes navigation the point of contact between the two papers. The citation and title establish that connection, while leaving the later paper’s treatment of the Doom controller, its item rewards, and its switching rule unspecified.
The subject of Reinforcement Learning with Unsupervised Auxiliary Tasks is closer to the other major design choice. Both works concern additional objectives within reinforcement learning. The Doom paper’s objective asks for a supervised judgment about the image, with the target delivered by the game engine. The citing paper’s title identifies unsupervised auxiliary tasks as its focus. That distinction locates a question left open by the Doom study, namely how additional objectives can help when the learning signal comes in a different form. The citation establishes a relationship between the works, with the specific auxiliary objectives or transfers of technique left unspecified.
A third citation connects the paper to Reinforcement Learning through Asynchronous Advantage Actor-Critic on a GPU. Its title identifies a GPU-based implementation of an asynchronous actor-critic approach. The Doom paper uses Q-learning, and the parallelism it discusses comes from the ability to train its specialists independently. The citation thus reaches research on a different route to organizing reinforcement-learning computation. It does not establish that the GPU work adopted enemy prediction, the replay procedure, or the separation between action and navigation.
All three citing works are listed as 2016, while Playing FPS Games with Deep Reinforcement Learning is dated 2017. Those dates and citation relationships give a firmer basis for describing the overlap in subject than for assigning a sequence of technical inheritance. The authors themselves suggest combining their architecture with dueling networks or prioritized replay. In the terms of their own method, those combinations would concern how action values are estimated or which experiences are sampled from memory. Their proposal leaves the performance of either combination for a further experiment.
Cite
Cite as Guillaume Lample and Devendra Singh Chaplot. 2017. Playing FPS Games with Deep Reinforcement Learning. Proceedings of the AAAI Conference on Artificial Intelligence.
@inproceedings{lample2017playing,
title = {{Playing FPS Games with Deep Reinforcement Learning}},
author = {Guillaume Lample and Devendra Singh Chaplot},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
year = {2017},
doi = {10.1609/aaai.v31i1.10827},
eprint = {1609.05521},
archivePrefix = {arXiv},
url = {https://doi.org/10.1609/aaai.v31i1.10827}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/lample-2017-playing-fps-games-deep-reinforcement/
References
- Ba, J.; Mnih, V.; and Kavukcuoglu, K. 2014. Multiple object recognition with visual attention. arXiv preprint arXiv:1412.7755. our card
- Bellemare, M. G.; Naddaf, Y.; Veness, J.; and Bowling, M. 2012. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research. our card
- Chaplot, D. S., and Lample, G. 2017. Arnold: An autonomous agent to play fps games. In Thirty-First AAAI Conference on Artificial Intelligence. OpenAlex ↗ · Scholar ↗
- Foerster, J. N.; Assael, Y. M.; de Freitas, N.; and Whiteson, S. 2016. Learning to communicate to solve riddles with deep distributed recurrent q-networks. arXiv preprint arXiv:1602.02672. OpenAlex ↗ · Scholar ↗
- Gaskett, C.; Wettergreen, D.; and Zelinsky, A. 1999. Q-learning in continuous state and action spaces. In Australasian Joint Conference on Artificial Intelligence, 417–428. Springer. OpenAlex ↗ · Scholar ↗
- Hausknecht, M., and Stone, P. 2015. Deep recurrent q-learning for partially observable mdps. arXiv preprint arXiv:1507.06527. OpenAlex ↗ · Scholar ↗
- Heess, N.; Wayne, G.; Silver, D.; Lillicrap, T.; Erez, T.; and Tassa, Y. 2015. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, 2944–2952. OpenAlex ↗ · Scholar ↗
- Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735–1780. OpenAlex ↗ · Scholar ↗
- Kempka, M.; Wydmuch, M.; Runc, G.; Toczek, J.; and Jaśkowski, W. 2016. Vizdoom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097. OpenAlex ↗ · Scholar ↗
- Koutník, J.; Cuccu, G.; Schmidhuber, J.; and Gomez, F. 2013. Evolving large-scale neural networks for vision-based reinforcement learning. In Proceedings of the 15th annual conference on Genetic and evolutionary computation, 1061–1068. ACM. OpenAlex ↗ · Scholar ↗
- Levine, S.; Finn, C.; Darrell, T.; and Abbeel, P. 2016. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research 17(39):1–40. OpenAlex ↗ · Scholar ↗
- Lin, L.-J. 1993. Reinforcement learning for robots using neural networks. Technical report, DTIC Document. OpenAlex ↗ · Scholar ↗
- McPartland, M., and Gallagher, M. 2008. Learning to be a bot: Reinforcement learning in shooter games. In AIIDE. OpenAlex ↗ · Scholar ↗
- Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; and Riedmiller, M. 2013. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602. OpenAlex ↗ · Scholar ↗
- Ng, A. Y. 2003. Shaping and policy search in reinforcement learning. Ph.D. Dissertation, University of California, Berkeley. OpenAlex ↗ · Scholar ↗
- Schaul, T.; Quan, J.; Antonoglou, I.; and Silver, D. 2015. Prioritized experience replay. arXiv preprint arXiv:1511.05952. OpenAlex ↗ · Scholar ↗
- Silver, D.; Huang, A.; Maddison, C. J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; et al. 2016. Mastering the game of go with deep neural networks and tree search. Nature 529(7587):484–489. OpenAlex ↗ · Scholar ↗
- Tastan, B., and Sukthankar, G. R. 2011. Learning policies for first person shooter games using inverse reinforcement learning. In AIIDE. Citeseer. OpenAlex ↗ · Scholar ↗
- Van Hasselt, H.; Guez, A.; and Silver, D. 2015. Deep reinforcement learning with double q-learning. CoRR, abs/1509.06461. our card
- Wang, Z.; de Freitas, N.; and Lanctot, M. 2015. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581. OpenAlex ↗ · Scholar ↗