Action Space Shaping in Deep Reinforcement Learning

04/02/2020 ∙ by Anssi Kanervisto, et al. ∙ University of Eastern Finland FHNW 0

Reinforcement learning (RL) has been successful in training agents in various learning environments, including video-games. However, such work modifies and shrinks the action space from the game's original. This is to avoid trying "pointless" actions and to ease the implementation. Currently, this is mostly done based on intuition, with little systematic research supporting the design decisions. In this work, we aim to gain insight on these action space modifications by conducting extensive experiments in video-game environments. Our results show how domain-specific removal of actions and discretization of continuous actions can be crucial for successful learning. With these insights, we hope to ease the use of RL in new environments, by clarifying what action-spaces are easy to learn.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Reinforcement learning [sutton2018reinforcement] has been successfully applied to various video-game environments to create human-level or even super-human agents [vinyals2019grandmaster, openai2019dota, ctf, vizdoom_competitions, dqn, ye2019mastering], and show promise as a general way to teach computers to play games. However, these results are accomplished with a significant amount of engineering. When using RL, there are numerous design choices to be made: how should the agent perceive the environment, what should the rewards be and when should the game terminate, just to name a few examples. One of these concerns is the action space: how does the agent act in the environment? Do we restrict the number of available actions? Should we simplify it by creating combinations of actions? How do we deal with continuous controls like mouse movement? Intuitively, learning to control a system with more buttons is harder, as the agent has to learn what each of the actions mean. Reducing the number of buttons might ease the learning but comes with the risk of limiting the agent’s performance.

Such transformations of the action space, which we call action space shaping, are prominent in reinforcement learning research and competitions, especially in those on video-games. Environments like Doom [vizdoom] and Minecraft [johnson2016malmo] have large action spaces with dozens of buttons. In related competitions all top participants modified them [milani2020minerl, vizdoom_competitions]. Action space shaping comes in the forms of removing actions, combining different actions into one action and discretizing continuous actions. The goal is to ease the learning for the agent, similar to reward shaping [ng1999policy].

Outside the well-known work on mastering Starcraft II [vinyals2019grandmaster] and Dota 2 [openai2019dota] with reinforcement learning, significant effort has been exerted in playing and mastering other modern games, such as modern first-person shooters [harmer2018imitation, ctf], Minecraft [mineRLcompetition, johnson2016malmo], popular fighting-games like Super Smash Bros [firoiu2017beating], other massive online battle arenas (MOBAs) [ye2019mastering] and driving in GTA V [gao2018reinforcement]. All of these works do action space shaping, either because of limitations of the learning environment or because of the sheer number of actions, e.g. in strategy games and MOBAs.

The effect of different action spaces is no longer a stranger to RL research. A large number of possible actions is known to lead to over-optimistic estimates of future rewards 

[thrun1993issues]. Previous research has addressed this problem by removing un-promising actions [zahavy2018learn], or by finding the closest neighbors of promising ones [dulac2015deep]. Other works extended existing methods by adding support for different action spaces [branchingdqn, gu2016continuous] or by supporting large, complex action spaces [sc2]. The work by Delalleau et al. [delalleau2019discrete] shares our focus and mindset, where authors discussed different ways of processing complex action spaces, specifically for video games. However, this and other related works have not included experiments that study specific changes to the action-spaces. We fill this gap by running experiments on various video-game environments, testing transformations successfully used in different competitions. Our core research question is do these transformations support the training of reinforcement learning agents?

By answering this question, specifically in the context of video games, we aim to reduce the number of dials to tune when applying RL to games. This is especially useful in the case of new environments, where it is unknown if RL agents are able to learn to play the game. If an agent fails to learn, it is often unclear if the issue lies in the learning algorithm, the observation space, the rewards, the environment dynamics or the action space. By studying which types of action-spaces work and which do not in various games, we hope to remove one of these possibilities, making prototyping and further research easier.

We start our work by summarizing different types of action space shaping done, recognizing common transformations and then verifying their effectiveness by empirical experiments. We start with experiments in a toy-environment, and then move on to Atari, ViZDoom, Starcraft II and Obstacle Tower environments, to cover a broad range of different environments.

Ii Action space shaping

When applying RL to a specific task, it is common to use reward shaping [ng1999policy] to create a denser or more informative reward signal and thus making learning easier. We define action space shaping in a similar manner: modifying the original action space by using transformations, with the intent to speed up the training. By original action space, we refer to the action space provided by the learning environment authors or the one defined by the game. For many computer games, this would be the buttons on a keyboard and the movement of the mouse.

Ii-a Reinforcement learning background

In reinforcement learning we consider agents that interact with environments at discrete time-steps by taking actions from a set of possible actions . Each step, an agent receives the current environment state from the set of all possible states and a numerical reward . The reward is given by a reward function . The goal is then to find a policy that maximizes the total sum of rewards , discounted by .

Ii-B Types of action spaces

Similar to the action spaces established in the OpenAI Gym [gym], we define the fundamental action spaces as follows:

  • Discrete. Arguably the most commonly used action space, where each action is an integer , where represents the number of actions to choose from. For example, an agent playing the game Pong can choose between either move up, move down or stay.

  • MultiDiscrete. An extension to Discrete space111Actually, Discrete is just a special case of MultiDiscrete, but we separate the two as Discrete is used so wildly., where action

    is a vector of individual discrete actions

    , each with possibly different number of choices . Arguably, this is closer to natural action spaces. for example, a keyboard is a large MultiDiscrete space, where each Discrete variable can be either down or up.

  • Continuous. Action is a real number/vector, rather than a discrete choice of many options. The amount of mouse movement [vizdoom, johnson2016malmo] or acceleration applied are Continuous actions, for example.

These action spaces can then be combined into more complex ones, where one action can consist of mixture of all of them, as described in [delalleau2019discrete]. A set of keyboard buttons and mouse control could be represented as a combination of MultiDiscrete and two Continuous actions, one continuous action per mouse movement axis, for example.

MultiDiscrete spaces are often treated as independent Discrete decisions [delalleau2019discrete, kanervisto2019torille]. Policies for Continuous spaces have been implemented in various ways, that come with different advantages and disadvantages, one of which is the bounding of possible actions to a certain range [sac, chou2017improving]. Put quite simply, support for Continuous spaces is often harder to implement correctly than for Discrete spaces.

Ii-C Action space shaping in video game environments

[b] Environment Name Original action space Transformation Transformed action space Performance Reference MineRL Multi-discrete(2, 2, 2, 2, 2, 2, 2, 2, 7, 8, 5, 8, 3), Continuous(2) DC RA CMD Discrete(36) 1 DC RA CMD Discrete(10) 1 place  [skrynnik2019hierarchical] DC RA CMD Discrete(216) 2 place  [milani2020minerl] DC RA Multi-discrete(2, 2, 3, 3, 7, 8, 5, 8, 3, 40) 3 place  [scheller2020sample] DC RA Multi-discrete(2, 2, 2, 5, 8, 3, 8, 7, 3, 3) 5 place  [milani2020minerl] Unity Obstacle Tower Challenge Multi-discrete(3, 3, 2, 3) RA CMD Discrete(12) 1 place  [nichol_2019] RA Discrete(6) 2 place 2 VizDoom (Doom) 38 binary buttons, 5 continuous RA CMD Discrete(256) 1 place (Track 2)  [DK2017] RA Discrete(6) 1 place (Track 1)  [Wu2017Doom] Atari Discrete(18) RA Discrete(4 - 18)  [dqn] StarCraft II Multi-discrete DC RA Multi-discrete  [sc2, zambaldi2018deep, vinyals2019alphastar, vinyals2019grandmaster] Dota 2 Multi-discrete DC RA Multi-discrete  [openai2019dota] GTA V (car driving only) Multi-discrete RA CMD Discrete(3)  [gao2018reinforcement] Torcs Multi-discrete RA CMD Discrete(3)  [gao2018reinforcement, a3c] DMLab (Quake 3) Multi-discrete(3, 3, 2, 2, 2), Continuous(2) RA CMD Discrete(9)  [dmlab, impala2018] Honor of Kings (MOBA) Multi-Discrete, Continuous RA CMD Multi-discrete, Continous  [ye2019mastering] Little Fighter 2 (lf2gym) Multi-Discrete(2,2,2,2,2,2,2) CMD Discrete(8)  [li2018deep]

Table I: Summary of action space shaping done in different video-game-based competitions and learning environments. By “original” space, we refer to action space originally provided by the environment designers. “Multi-discrete()” shows the number of discrete variables, and number of choices for each. DC: Discretize continuous actions, RA: Remove actions, CMD: Convert multi-discrete to discrete.

Table I summarizes action space shaping done by top-participants of different video-game competitions as well as some selected work on different environments. In this section, we give an overview of the three major categories of action space transformations found throughout these works.

Ra Remove actions

Many games include actions that are unnecessary or even harmful for the task. In Minecraft [mineRLcompetition, johnson2016malmo], the sneak action is not crucial for progressing in the game, and therefore is often removed. The action backward is also often removed [nichol_2019, milani2020minerl]. Otherwise, the agent would waste training time by constantly switching between moving forward and backward, effectively jittering in place rather than exploring the environment. Removed actions maybe set to always on, which was a popular transformation in the Minecraft MineRL competition, where always executing attack helped the agents to learn gathering resources [milani2020minerl, skrynnik2019hierarchical, scheller2020sample].

Reducing the number of actions helps with exploration, as there are less actions to try, which in return improves the sample efficiency of the training. However, this requires domain knowledge of the environment, and it may restrict agent’s capabilities.

Dc Discretize continuous actions

Many environments include Continuous actions, e.g. in the form of mouse movement or camera turning speed. These actions are often discretized, either by splitting them into a set of bins, or by defining three discrete choices: negative, zero and positive. This is especially common with camera rotation, where agents can only choose to turn the camera left/right and up/down at a fixed rate per step [skrynnik2019hierarchical, milani2020minerl, impala2018, scheller2020sample]. A downside is that this turning rate is a hyper-parameter, which requires tuning. If the rate is too high, the actions are not fine-grained, and the agent may have difficulties in aiming at a specific spot. If too small, it may slow down the learning or lead to sub-optimal behaviour as it takes more steps to aim at a specific target.

Cmd Convert multi-discrete actions to discrete

Especially in ViZDoom [vizdoom_competitions] and Minecraft [mineRLcompetition], it is common to turn MultiDiscrete actions into a single Discrete action, with all possible combinations of the MultiDiscrete actions. Since the resulting action space combinatorially explodes quickly with an increasing MultiDiscrete space, this is usually combined with removing some of the actions. This can be either dropping unnecessary actions as described above, manually selecting the allowed combinations (as done in MineRL [skrynnik2019hierarchical, milani2020minerl]) or by limiting maximum number of pressed buttons (as done in ViZDoom [DK2017, Wu2017Doom]).

This transformation is intuitively motivated by the assumption that it is easier to learn a single large policy than multiple small policies, as well as technical limitations of some of the algorithms. For example, methods like Q-learning [dqn] only work for Discrete action spaces. While a modified version of Q-learning exists for MultiDiscrete spaces [branchingdqn], this is not commonly used.

Iii Experiments

With the major action-space transformations summarized above, we move onto testing if these transformations are truly helpful for the learning process. We do this by training RL agents in a larger variety of environments and comparing the learning process between different action-spaces.

Our main tool for evaluation are learning curves, which show how well agents perform at different stages of training. These show the speed of learning (how fast curve rises), show the final performance (how high curve gets) and if the agent learns at all (if the curve rises). We will use four different games (Doom, Atari, Starcraft II and Obstacle Tower), along with a toy-environment.

Iii-a Reinforcement learning agent

We use the Proximal Policy Optimization (PPO) [ppo] algorithm for training the agents. We employ the high-quality implementations from stable-baselines [stable-baselines] and rllib [liang2018rllib], which support various action-spaces. We opt for PPO rather than other recent state-of-the-art algorithms [sac, a3c] for its simplicity, previous results in the environments used in this work and maturity of their implementations. We do not expect final insights to change between different learning algorithms, as action-space transformations are not part of the algorithm design, but part of the environment. An exception to this are the Continous actions, which have multiple ways to implement them, and come with additional parameters to tune [sac, continuous].

Unless otherwise noted, we will use the following hyper-parameters: eight parallel environments, from each of which we collect

before running four epochs of updates on the gathered data. Entropy coefficient/weight is set to

, and PPO clipping to . Network is optimized with Adam [adam] with learning rate .

Iii-B Get-To-Goal experiments

For rapid experimentation with a different action spaces and their effects on the learning performance, we implement a simple reach-the-goal environment. The environment consists of a bounded 2D area, a player and a goal. The game starts with a player and a goal at random locations and ends when the player either reaches the goal (reward ) or when environment times out (reward ). Agents receive a 2D vector pointing towards the goal, as well as their current heading as a tuple, where is the relative rotation angle. We use this environment to test DC by using discrete and continuous variants of the action space.

  • Multi-Discrete: Player can move on two axes with the four buttons Up, Down, Left and Right (MultiDiscrete).

  • Discrete: A flattened version of above, where only one of the buttons may be pressed at a time, i.e. no diagonal movement allowed (Discrete)

  • Continuous: Player specifies the exact direction of the next move, with e.g. representing straight up, straight right and straight down (Continuous)

  • Tank, Discrete/Multi-Discrete: Player has a heading and can turn left or right as well as move forward or backward. This corresponds to movement in first-person shooters, except done in 2D environment. (Discrete and MultiDiscrete versions).

To study RA and CMD, we train agents with different number of actions available in Discrete and MultiDiscrete spaces. Each action moves the player into a different direction, equally spaced on a unit circle (Extra actions). We also run experiments with additional no-op actions, which do not do anything, to simulate e.g. the USE action in Doom, which only works in specific scenarios (Bogus actions). We also test the effect of backward and strafe actions, which are often removed in FPS games, by enabling/disabling them in tank-like action spaces. All experiments are run with stable-baselines [stable-baselines].

Figure 1:

Learning curves in Get-To-Goal environment, with various action spaces (left), and various buttons available in tank-like controls (right). Averaged over ten repetitions, with shaded region representing the standard deviation.

Figure 2: Results of an increasing number of actions in Get-To-Goal environment. With Extra actions, each action moves the player to a different direction, while in Bogus actions the extra actions do nothing. Averaged over ten repetitions.

Figure 1 (left) shows the results with different action-spaces. Learning with tank-like controls is slower than with the non-tank controls and learning with Continuous spaces is the slowest. It should be noted that with rllib [liang2018rllib] we observed similar results, except Continuous learned faster than tank-like controls. This indicates that policies for Continuous actions are sensitive to the implementation, with the discrete options being robust to this.

Figure 1 (right) shows results with tank-like controls, with and without backward and strafe actions. In both action-spaces, agents learn slower the more actions they have available. This demonstrates how removing actions can be detrimental to the performance (RA). It is evident, that agents learn faster on MultiDiscrete spaces than on the Discrete alternatives. Figure 2 shows how MultiDiscrete spaces are more robust to additional actions. These results demonstrate that there are situtaions where RL agents can profit from MultiDiscrete compared to Discrete spaces (CMD).

Iii-C Atari experiments

With Atari games, we test RA and CMD transformations. Atari games have been a standard benchmark for DRL algorithms [dqn, ppo, a3c], where their action space is defined as a Discrete action space. By default, the action space consists of only the necessary actions to play the game (minimal). We compare these minimal actions against the full action space, and a multi-discrete action space, where joystick and fire-button are additional buttons with and options respectively.

We use six games, selected for varying number of actions in the minimal action space. All games have actions in the full space, while Space Invaders and Q*bert have six, MsPacman and Enduro have nice and Breakout has four actions for minimal space. Gravitar uses all actions, and thus do not have minimal spaces. We use the v4 versions of the environments (e.g. GravitarNoFrameskip-v4), which are easier to learn. We use the PPO hyper-parameters from stable-baselines rl-zoo [rl-zoo].

Figure 3: Results with six Atari games, using minimal, full and multi-discrete actions. Averaged over five training seeds. Minimal action-set only includes actions that are available in that specific game. Multi-discrete uses all possible actions, but by separating joystick and fire-button into two different discrete variables. Gravitar does not have a minimal action space.

Figure 3 shows the resulting learning curves. On average, there is no clear difference between the different action-spaces over all games, with MsPacman being an exception. Here the multi-discrete agent achieved almost one-quarter higher score than other action spaces. Interestingly, in Enduro, both action spaces using all buttons out-perform the minimal space, despite the fact that full space does not offer any new actions for agent to use. With these results, removing actions (RM) can limit the performance, but overall does not change results. Same applies to converting multi-discrete into discrete (CMD), although in one of the games it did obtain higher performance.

Iii-D Doom experiments

With Doom (1993), we test all of the transformations (DC, RA and CMD). We use the environment provided by ViZDoom interface [vizdoom], with three different scenarios: Get-To-Goal, Health gathering supreme (HGS) and Deathmatch. The first is an implementation of the toy task described earlier, in the form of a first-person shooter scenario, where the agent is tasked to reach a goal object in a room. The player receives a reward of if it reaches the goal, otherwise, including at the timeout-termination after frames (one minute of game-time). HGS and Deathmatch are Doom scenarios, where the player has to gather medkits in a maze to survive (HGS) and fight against randomly spawning enemies (Deathmatch). We modify the Deathmatch scenario to give a reward per kill. We also make enemies weaker so they die from one shot. Otherwise, the scenario is too difficult to learn by a PPO agent in the given time. We test four sets of buttons (RA):

  • Bare-Minimum. The only allowed buttons are moving forward, turning left and attack (Deathmatch). These are the bare-minimum number of buttons to complete tasks.

  • Minimal. Same as Bare-Minimum, but with an option to turn right. This was a common configuration in e.g. the MineRL competition [milani2020minerl].

  • Backward. Same as Minimal, but with the additional option of moving backward.

  • Strafe. Same as Backward, but with the additional options of moving left and right. This corresponds to the original movement controls of Doom.

For each set of buttons, we test five different action spaces: The original MultiDiscrete space, where pressing each button down is its own discrete choice, three levels of discretization (CMD) and continuous mouse control (DC). Discretization is done by creating all possible combinations of pressed down buttons, with varying levels of buttons pressed down (, or all). For continuous actions, mouse actions correspond to a MultiDiscrete action space, where turning left and right has been replaced with a mouse control (a scalar, representing how much we should turn left or right). This action space is not combined with the bare-minimum button-set.

Observations consist of grayscale (GetToGoal and HGS) or RGB (Deathmatch) image of size , along with any game-variables enabled in the scenario. Each action is repeated for four frames. All experiments except mouse are run using stable-baselines, as only rllib supports mixed action-spaces. Other results are same between rllib and stable-baselines.

Figure 4: Results with the ViZDoom environment, with three environments (rows) and four sets of buttons (columns). Number of available actions increases from left to right. Curves are averaged over ten repetitions.

Figure 4 shows the results. Multi-discrete action space performs as well as discretized versions. Using discrete actions with only one button down is the least reliable out of discrete spaces, as it is not able to reliably solve the easiest environment (CMD). Using continuous actions prevents learning in all but the simplest environment (DC). Increasing number of available actions improves the results in more difficult scenarios (RA).

Iii-E Obstacle Tower experiments

Obstacle Tower [juliani2019obstacle] is a 3D platformer game with randomly generated levels, designed for reinforcement learning research. Its original action space is defined as a MultiDiscrete space, with options to move forward/backward and left/right, turn left/right and jump. We use this environment to test CMD and RA transformations, by disabling strafing, moving backward or forcing moving forward. Similar to Doom experiments, Discrete space is obtained by creating all possible combinations of the MultiDiscrete actions. Observations are processed using the retro setting of the environment ( RGB images). We use concurrent environments, set entropy coefficient to and collect steps per environment per update. These parameters were selected based on the previous experiments with Obstacle Tower environment.

Figure 5: Results in the Obstacle Tower environment, various button sets and both Discrete and MultiDiscrete action spaces. Always Forward includes actions for turning and jumping. Minimal lets agent to choose when to move forward. Curves are averaged over three seeds.

Figure 5 shows the results. There is no significant difference between Discrete and MultiDiscrete spaces (CMD). The only major difference is with backward action: all experiments that allow moving backward have slower learning than the rest. This supports the intuition to remove unnecessary actions, and especially when the action can negate other actions during random exploration RA.

Iii-F StarCraft II experiments

StarCraft II is a complex multi-player real-time strategy game and a challenging domain for RL algorithms. Particularly interesting for our work is the vast size of the action space. For environment interaction we use the StarCraft II learning environment (SC2LE) [sc2] that provides a parametric action space, with base actions and action parameters. Base actions describe an intended action such as move screen or build barracks. Action parameters such as screen coordinates or unit id modify these base actions. There are hundreds of base actions and depending on the base action and screen resolution up to millions or even billions of possible parameter combinations.

In this work, we investigate action space shaping for real-time strategy games like StarCraft II on the example of four out of the seven mini-games provided by SC2LE:

  • CollectMinerlShards (CMS) is a simple navigation task, where the player controls two Marines and must collect randomly scattered mineral shards as quickly as possible.

  • In DefeatRoaches (DR), the player controls a small army of Marines and must defeat a small Roach army.

  • The goal of CollecMineralsAndGas (CMAG) is to build up a working economy and collect as much minerals and vespene gas as possible.

  • BuildMarines (BM) is targeted at establishing a unit production with the goal of building as many Marines as possible.

To study RA on these mini-games, we test the effects of Masked and Minimal transformations. We also evaluate auto regressive policies (AR), which do not transform the action space but are of interest when dealing with large parametric action spaces:

  • Masked

    In StarCraft II, at any given time, only a subset of all actions is available. To prevent agents from selecting unavailable actions and to ease the learning, base action policies are often masked by setting the probabilities of unavailable action to zero 

    [sc2, zambaldi2018deep]. We run experiments with agents that are either equipped with action masking or not. Regarding latter, selecting an unavailable action results in a no-op action.

  • Minimal Not all actions are required to play the selected mini-games optimally. We evaluate the impact of removing unnecessary actions from the action space. For each mini-game, we define a minimal set of base actions required for optimal control.

  • AR The choice of optimal action parameters depends on the choices of base action and other action parameters. This is usually addressed by introducing an order of dependency and condition action parameter policies accordingly in an auto-regressive manner [sc2, zambaldi2018deep, vinyals2019grandmaster]. To study the effect of auto-regressive policies, we run experiments where we condition action parameter policies on the sampled base action. Following [zambaldi2018deep], we embed sampled base actions into a 16-dimensional continuous space and feed them as additional input to each of the action parameter policy heads.

For training, we employed IMPALA [impala2018], a distributed off-policy actor critic method. We chose IMPALA over PPO for its scalability to large number of actors and since its strong performance on the SC2LE mini-games [zambaldi2018deep]. We use ControlAgent architecture and hyper-parameters described in [zambaldi2018deep], except with fixed learning rate and entropy coefficient .

Figure 6: Results on StarCraft II mini games. Full includes all possible actions, Masked uses action-masking to remove unavailable actions and Minimal extends on this by removing all but necessary actions. We include experiments with autoregressive policies (AR), as they are commonly used with Starcraft II environment.

The experiments are summarized in Figure 6. Masking unavailable actions (Masked) turned out to be crucial for learning on BM and significantly improved performance on CMAG. For CMS and DR we did not see any improvement with masked polices. It is evident that agents trained on CMS and DR did not profit from minimal action spaces (Minimal). In contrast, on CMAG and BM, minimal action spaces improved the performance even for random policies at the beginning of training. Agents trained on CMAG showed much quicker training progress and required less samples to achieve the final performance. On BM, we see how RA could lead to significantly improvement in final performance of RL agents. With auto-regressive policies (AR), we did not observe significant improvement. We see the main reason for this in the fact that, within the limited number of samples, the agents learned only simple, sub-optimal behaviour, where they choose between few actions with distinct parameters. We believe that for the learning of stronger policies that utilize a larger set of actions, auto-regressive policies can be beneficial.

Iv Discussion and conclusions

Overall, our results support the use of the action space transformations listed in Section II-C, with the exception being converting MultiDiscrete to Discrete spaces (CMD). Removing actions (RA) can lower the overall performance (Doom), but it can be an important step to make environments learnable by RL agents (SC2, Obstacle Tower). Continuous actions are harder to learn than discrete actions (Get-To-Goal) and can also prevent learning all-together (ViZDoom). Discretizing them (DC) improves performance notably.

As for the MultiDiscrete spaces, we did not find notable difference between results with the MultiDiscrete and Discrete variants. Experiments on the Get-To-Goal task show how MultiDiscrete spaces scale well with an increasing number of actions, while Discrete do not. In all other environments (ViZDoom, Obstacle Tower, Atari) we observe no significant difference between the two.

In this work, we have formalised the concept of action space shaping and summarized its application in previous RL research on video-game environments. We found three major transformations used throughout such work: removing actions, discretizing continuous actions and discretizing multi-discrete actions. We ran an extensive evaluation of these transformations and their implications on five environments, which range from simple navigation tasks up to complex 3d first-person shooters and real-time strategy games.

Answering the question presented in introduction, do these transformations help RL training, removing actions and discretizing continuous actions can be crucial for the learning process. Converting multi-discrete to discrete action spaces has no clear positive effect and can suffer from poor scaling in cases with large action spaces. Our guide for shaping an action space for a new environment is thus as follows:

Start with removing all but the necessary actions and discretize all continuous actions. Avoid turning multi-discrete actions into a single discrete action and limit the number of choices per discrete action. If the agent is able to learn, start adding removed actions for improved performance, if necessary.

In the future, we would like to extend this work with a more pin-pointed approach on what exactly makes the learning easier, both in theory (e.g. exploration vs. number of actions) and in practice (e.g. what kind of actions in games are bad for reinforcement learning). A simpler extension would be to repeat these experiments with more complex games like Minecraft, that have a large variety of mechanics and actions.