Andr É Barreto
Shaobo Hou
Diana Borsa
David Silver
Doina Precup

Fast reinforcement learning with generalized policy updates

The combination of reinforcement learning with deep learning is a promising approach to tackle important sequential decisionmaking problems that are currently intractable. One obstacle to overcome is the amount of data needed by learning systems of this type. In this article, we propose to address this issue through a divide-and-conquer approach. We argue that complex decision problems can be naturally decomposed into multiple tasks that unfold in sequence or in parallel. By associating each task with a reward function, this problem decomposition can be seamlessly accommodated within the standard reinforcement-learning formalism. The specific way we do so is through a generalization of two fundamental operations in reinforcement learning: policy improvement and policy evaluation. The generalized version of these operations allow one to leverage the solution of some tasks to speed up the solution of others. If the reward function of a task can be well approximated as a linear combination of the reward functions of tasks previously solved, we can reduce a reinforcement-learning problem to a simpler linear regression. When this is not the case, the agent can still exploit the task solutions by using them to interact with and learn about the environment. Both strategies considerably reduce the amount of data needed to solve a reinforcement-learning problem. artificial intelligence | reinforcement learning | generalized policy improvement | generalized policy evaluation | successor features R einforcement learning (RL) provides a conceptual framework to address a fundamental problem in artificial intelligence: the development of situated agents that learn how to behave while interacting with the environment  (1) . In RL, this problem is formulated as an agent-centric optimization in which the goal is to select actions to get as much reward as possible in the long run. Many problems of interest are covered by such an inclusive definition; not surprisingly, RL has been used to model robots  (2)  and animals  (3) , to simulate real (4) and artificial (5) limbs, to play board  (6)  and card  (7)  games, and to drive simulated bicycles  (8)  and radio-controlled helicopters  (9) , to cite just a few applications. Recently, the combination of RL with deep learning added several impressive achievements to the above list  (10) (11) (12) (13) . It does not seem too far-fetched, nowadays, to expect that these techniques will be part of the solution of important open problems. One obstacle to overcome on the track to make this possibility a reality is the enormous amount of data needed for an RL agent to learn to perform a task. To give an idea, in order to learn how to play one game of Atari, a simple video game console from the 1980s, an agent typically consumes an amount of data corresponding to several weeks of uninterrupted playing; it has been shown that, in some cases, humans are able to reach the same performance level in around 15 min  (14) . One reason for such a discrepancy in the use of data is that, unlike humans, RL agents usually learn to perform a task essentially from scratch. This suggests that the range of problems our agents can tackle can be significantly extended if they are endowed with the appropriate mechanisms to leverage prior knowledge. In this article we describe one such mechanism. The framework we discuss is based on the premise that an RL problem can usually be decomposed into a multitude of "tasks." The intuition is that, in complex problems, such tasks will naturally emerge as recurrent patterns in the agent-environment interaction. Tasks then lead to a useful form of prior knowledge: once the agent has solved a few, it should be able to reuse their solution to solve other tasks faster. Grasping an object, moving in a certain direction, and seeking some sensory stimulus are examples of naturally occurring behavioral building blocks that can be learned and reused. Ideally, information should be exchanged across tasks whenever useful, preferably through a mechanism that integrates seamlessly into the standard RL formalism. The way this is achieved here is to have each task be defined by a reward function. As most animal trainers would probably attest, rewards are a natural mechanism to define tasks because they can induce very distinct behaviors under otherwise identical conditions  (15, 16) . They also provide a unifying language that allows each task to be cast as an RL problem, blurring the (somewhat arbitrary) distinction between the two  (17) . Under this view, a conventional RL problem is conceptually indistinguishable from a task self-imposed by the agent by "imagining" recompenses associated with arbitrary events. The problem then becomes a stream of tasks, unfolding in sequence or in parallel, whose solutions inform each other in some way. What allows the solution of one task to speed up the solution of other tasks is a generalization of two fundamental operations underlying much of RL: policy evaluation and policy improvement. The generalized version of these procedures, jointly referred to as "generalized policy updates," extend their standard counterparts from point-based to set-based operations. This makes it possible to reuse the solution of tasks in two distinct ways. When the reward function of a task can be reasonably approximated as a linear combination of other tasks' reward functions, the RL problem can be reduced to a simpler linear regression that is solvable with only a fraction of the data. When the linearity constraint is not satisfied, the agent can still leverage the solution of tasks-in this case, by using them to interact with and learn about the environment. This can also considerably reduce the amount of data needed to solve the problem. Together, these two strategies give rise to a divide-and-conquer approach to RL that can potentially help scale our agents to problems that are currently intractable.
 RL We consider the RL framework outlined in the Introduction: an agent interacts with an environment by selecting actions to get as much reward as possible in the long run  (1) . This interaction happens at discrete time steps, and, as usual, we assume it can be modeled as a Markov decision process (MDP)  (18) . An MDP is a tuple M ≡ (S, A, p, r , γ) whose components are defined as follows. The sets S and A are the state space and action space, respectively (we will consider that A is finite to simplify the exposition, but most of the ideas extend to infinite action spaces). At every time step t, the agent finds itself in a state s ∈ S and selects an action a ∈ A. The agent then transitions to a next state s , where a new action is selected, and so on. The transitions between states can be stochastic: the dynamics of the MDP, p(•|s, a), give the next-state distribution upon taking action a in state s. In RL, we assume that the agent does not know p, and thus it must learn based on transitions sampled from the environment. A sample transition is a tuple (s, a, r , s ) where r is the reward given by the function r (s, a, s ), also unknown to the agent. As discussed, here we adopt the view that different reward functions give rise to distinct tasks. Given a task r , the agent's goal is to find a policy π : S → A, that is, a mapping from states to actions, that maximizes the value of every state-action pair, defined as Q π r (s, a) ≡ E π ∞ i=0 γ i r (St+i , At+i , St+i+1) | St = s, At = a , [1] where St and At are random variables indicating the state occupied and the action selected by the agent at time step t, E π [•] denotes expectation over the trajectories induced by π, and γ ∈ [0, 1) is the discount factor, which gives less weight to rewards received further into the future. The function Q π r (s, a) is usually referred to as the "action-value function" of policy π on task r ; sometimes, it will be convenient to also talk about the "state-value function" of π, defined as V π r (s) ≡ Q π r (s, π(s)). Given an MDP representing a task r , there exists at least one optimal policy π * r that attains the maximum possible value at all states; the associated optimal value function V * r is shared by all optimal policies  (18) . Solving a task r can thus be seen as the search for an optimal policy π * r or an approximation thereof. Since the number of possible policies grows exponentially with the size of S and A, a direct search in the space of policies is usually infeasible. One way to circumvent this difficulty is to resort to methods based on dynamic programming, which exploit the properties of MDPs to reduce the cost of searching for a policy  (19) . Policy Updates. RL algorithms based on dynamic programming build on two fundamental operations (1). Definition 1. "Policy evaluation" is the computation of Q π r , the value function of policy π on task r . Definition 2. Given a policy π and a task r , "policy improvement" is the definition of a policy π such that Q π r (s, a) ≥ Q π r (s, a) for all (s, a) ∈ S × A. [2] We call one application of policy evaluation followed by one application of policy improvement a "policy update." Given an arbitrary initial policy π, successive policy updates give rise to a sequence of improving policies that will eventually reach an optimal policy π * r  (18) . Even when policy evaluation and policy improvement are not performed exactly, it is possible to derive guarantees on the performance of the resulting policy based on the approximation errors introduced in these steps  (20, 21) . Fig.  1  illustrates the basic intuition behind policy updates. What makes policy evaluation tractable is a recursive relation between state-action values known as the Bellman equation: Q π r (s, a) = E S ∼p(•|s,a) r (s, a, S ) + γQ π r (S , π(S )) . [3] Expression (Exp.) 3 induces a system of linear equations whose solution is Q π r . This immediately suggests ways of performing policy evaluation when the MDP is known  (18) . Importantly, the Bellman equation also facilitates the computation of Q π r without knowledge of the dynamics of the MDP. In this case, one estimates the expectation on the right-hand side of Exp. 3 based on samples from p(•|s, a), leading to the well-known method of temporal differences  (22, 23) . It is also often the case that in problems of interest the state space S is too big to allow for a tabular representation of the value function, and hence Q π r is replaced by an approximation Qπ r . As for policy improvement, it is in fact simple to define a policy π that performs at least as well as, and generally better than, a given policy π. Once the value function of π on task r is known, one can compute an improved policy π as π (s) ∈ arg max a∈A Q π r (s, a). [4] In words, the action selected by policy π on state s is the one that maximizes the action-value function of policy π on that state. The fact that policy π satisfies Definition 2 is one of the fundamental results in dynamic programming and the driving force behind many algorithms used in practice  (18) . The specific way policy updates are carried out gives rise to different dynamic programming algorithms. For example, value iteration and policy iteration can be seen as the extremes of a spectrum of algorithms defined by the extent of the policy evaluation step  (19, 24) . RL algorithms based on dynamic programming can be understood as stochastic approximations of these methods or other instantiations of policy updates  (25) .
 Generalized Policy Updates From the discussion above, one can see that an important branch of the field of RL depends fundamentally on the notions of policy evaluation and policy improvement. We now discuss generalizations of these operations. Definition 3. "Generalized policy evaluation" (GPE) is the computation of the value function of a policy π on a set of tasks R.
 A B Fig.  1 . (A) Sequence of policy updates as a trajectory that alternates between the policy and value spaces and eventually converges to an optimal solution (1). (B) Detailed view of the trajectory across the value space for a state space with two states only. The shadowed rectangles associated with each value function represent the region of the value space containing the value function that will result from one application of policy improvement followed by policy evaluation (cf. Exp. 2). Definition 4. Given a set of policies Π and a task r , "generalized policy improvement" (GPI) is the definition of a policy π such that Q π r (s, a) ≥ sup π∈Π Q π r (s, a) for all (s, a) ∈ S × A. [5] GPE and GPI are strict generalizations of their standard counterparts, which are recovered when R has a single task and Π has a single policy. However, it is when R and Π are not singletons that GPE and GPI reach their full potential. In this case, they become a mechanism to quickly construct a solution for a task, as we now explain. Suppose we are interested in one of the tasks r ∈ R, and we have a set of policies Π available. The origin of these policies is not important: they may have come up as solutions for specific tasks or have been defined in any other arbitrary way. If the policies π ∈ Π are submitted to GPE, we have their value functions on the task r ∈ R. We can then apply GPI over these value functions to obtain a policy π that represents an improvement over all policies in Π. Clearly, this reasoning applies without modification to any task in R. Therefore, by applying GPE and GPI to a set of policies Π and a set of tasks R, one can compute a policy for any task in R that will in general outperform every policy in Π. Fig.  2  shows a graphical depiction of GPE and GPI. Obviously, in order for GPE and GPI to be useful in practice, we must have efficient ways of performing these operations. Consider GPE, for example. If we were to individually evaluate the policies π ∈ Π over the set of tasks r ∈ R, it is unlikely that the scheme above would result in any gains in terms of computation or consumption of data. To see why this is so, suppose again that we are interested in a particular task r . Computing the value functions of policies π ∈ Π on task r would require |Π| policy evaluations with a naive form of GPE (here, | • | denotes the cardinality of a set). Although the resulting GPI policy π would compare favorably to all policies in Π, this guarantee would be vacuous if these policies are not competent at task r . Therefore, a better allocation of resources might be to use the policy evaluations for standard policy updates, which would generate a sequence of |Π| policies with increasing performance on task r (compare Figs.  1 and 2 ). This difficulty in using generalized pol-Fig.  2 . Depiction of generalized policy updates on a state space with two states only. With GPE each policy π ∈ Π is evaluated on all tasks r ∈ R. The state-value function of policy π on task r, V π r , delimits a region in the value space where the next value function resulting from policy improvement will be (cf. Fig.  1 ). The analogous space induced by GPI corresponds to the intersection of the regions associated with the individual value functions (represented as dark gray rectangles in the figure). The smaller the space of value functions associated with GPI, the stronger the guarantees regarding the performance of the resulting policy. icy updates in practice is further aggravated if we do not have a fast way to carry out GPI. Next, we discuss efficient instantiations of GPE and GPI. Fast GPE with Successor Features. Conceptually, we can think of GPE as a function associated with a policy π that takes a task r as input and outputs a value function Q π r  (26) . Hence, a practical way of implementing GPE would be to define a suitable representation for tasks and then learn a mapping from r to value functions Q π r  (27) . This is feasible when such a mapping can be reasonably approximated by the choice of function approximator and enough examples (r , Q π r ) are available to characterize the relation underlying these pairs. Here, we will focus on a form of GPE that is based on a similar premise but leads to a form of generalization over tasks that is correct by definition. Let φ : S × A × S → R d be an arbitrary function whose output we will see as "features." Then, for any w ∈ R d , we have a task defined as rw(s, a, s ) = φ(s, a, s ) w,  [6]  where denotes the transpose of a vector. Let R φ ≡ {rw = φ w | w ∈ R d } be the set of tasks induced by all possible instantiations of w ∈ R d . We now show how to carry out an efficient form of GPE over R φ . Following Barreto et al.  (28) , we define the "successor features" (SFs) of policy π as ψ π (s, a) ≡ E π ∞ i=0 γ i φ(St+i , At+i , St+i+1) | St = s, At = a . The ith component of ψ π (s, a) gives the expected discounted sum of φi when following policy π starting from (s, a). Thus, ψ π can be seen as a d -dimensional value function in which the features φi (s, a, s ) play the role of reward functions (cf. Exp. 1). As a consequence, SFs satisfy a Bellman equation analogous to Exp. 3, which means that they can be computed using standard RL methods like temporal differences  (22) . Given the SFs of a policy π, ψ π , we can quickly evaluate π on task rw ∈ R φ by computing ψ π (s, a) w = E π ∞ i=0 γ i φ(St+i , At+i , St+i+1) w|St = s, At = a = E π ∞ i=0 γ i rw(St+i , At+i , St+i+1) | St = s, At = a = Q π rw (s, a) ≡ Q π w (s, a). [7] That is, the computation of the value function of policy π on task rw is reduced to the inner product ψ π (s, a) w. Since this is true for any task rw, SFs provide a mechanism to implement a very efficient form of GPE over the set R φ (cf. Definition 3). The question then arises as to how inclusive the set R φ is. Since R φ is fully determined by φ, the answer to this question lies in the definition of these features. Mathematically speaking, R φ is the linear space spanned by the d features φi . This view suggests ways of defining φ that result in a R φ containing all possible tasks. A simple example can be given for when both the state space S and the action space A are finite. In this case, we can recover any possible reward function by making d = |S | 2 × |A| and having each φi be an indicator function associated with the occurrence of a specific transition (s, a, s ). This is essentially Dayan's (29) concept of "successor representation" extended from S to S × A × S. The notion of covering the space of tasks can be generalized to continuous S and A if we think of φi as basis functions over the function space S × A × S → R, for we know that, under some technical conditions, one can approximate any function in this space with arbitrary accuracy by having an appropriate basis. Although these limiting cases are reassuring, more generally we want to have a number of features d |S |. This is possible if we consider that we are only interested in a subset of all possible tasks-which should in fact be a reasonable assumption in most realistic scenarios. In this case, the features φ should capture the underlying structure of the set of tasks R in which we are interested. For example, many tasks we care about could be recovered by features φ i representing entities (from concrete objects to abstract concepts) or salient events (such as the interaction between entities). In Fast RL with GPE and GPI, we give concrete examples of what the features φ may look like and also discuss possible ways of computing them directly from data. For now, it is worth mentioning that, even when φ does not span the space R, one can bound the error between the two sides of Exp. 7 based on how well the tasks of interest can be approximated using φ (proposition 1 in ref.  30 ). Fast GPI with Value-Based Action Selection. Thanks to the concept of value function, standard policy improvement can be carried out efficiently through Exp. 4. This raises the question whether the same is possible with GPI. We now answer this question in the affirmative for the case in which GPI is applied over a finite set Π. Following Barreto et al.  (28) , we propose to compute an improved policy π as π (s) ∈ argmax a∈A max π∈Π Q π r (s, a). [8] Barreto et al. have shown that Exp. 8 qualifies as a legitimate form of GPI as per Definition 4 (theorem 1 in ref.  28 ). Note that the action selected by a GPI policy π on a state s may not coincide with any of the actions selected by the policies π ∈ Π on that state. This highlights an important difference between Exp. 8 and methods that define a higher-level policy that alternates between the policies π ∈ Π (32). In SI Appendix, we show that the policy π resulting from Exp. 8 will in general outperform its analog defined over Π. As discussed, GPI reduces to standard policy improvement when Π contains a single policy. this also happens with Exp. 8 when one of the policies in Π strictly outperforms the others on task r . This means that, after one application of GPI, adding the resulting policy π to the set Π will reduce the next application of Exp. 8 to Exp. 4. Therefore, if GPI is used in a sequence of policy updates, it will collapse back to its standard counterpart after the first update. In contrast with policy improvement, which is inherently iterative, GPI is an one-off operation that yields a quick solution for a task when multiple policies have been evaluated on it. The guarantees regarding the performance of the GPI policy π can be extended to the scenario where Exp. 8 is used with approximate value functions. In this case, the lower bound in Exp. 5 decreases in proportion to the maximum approximation error in the value function approximations (theorem 1 in ref.  28) . We refer the reader to SI Appendix for an extended discussion on GPI. The Generalized Policy. Strictly speaking, in order to leverage the instantiations of GPE and GPI discussed in this article, we only need two elements: features φ : S × A × S → R d and a set of policies Π = {πi } n i=1 . Together, these components yield a set of SFs Ψ = {ψ π i } n i=1 , which provide a quick form of GPE over the set of tasks R φ induced by the features φ. Specifically, for any w ∈ R d , we can quickly evaluate policy πi on task rw(s, a, s ) = φ(s, a, s ) w by computing Q π i w (s, a) = ψ π i (s, a) w. Once we have the value functions of policies πi on task rw, {Q π i w } n i=1 , Exp. 8 can be used to obtain a GPI policy π that will in general outperform the policies πi on rw. Observe that the same scheme can be used if we have approximate SFs ψπ i ≈ ψ π i , which will be the case in most realistic scenarios. Since the resulting value functions will also be approximations, Qπ i w ≈ Q π i w , we are back to the approximate version of GPI discussed in Fast GPI with Value-Based Action Selection. Given a set of SFs Ψ, approximate or otherwise, any w ∈ R d gives rise to a policy through GPE (Exp. 7) and GPI (Exp. 8). We can thus think of generalized updates as implementing a policy πΨ(s; w) whose behavior is modulated by w. We will call πΨ a "generalized policy." Fig.  3  provides a schematic view of the computation of πΨ through GPE and GPI. Since each component of w weighs one of the features φi (s, a, s ), changing them can intuitively be seen as setting the agent's current "preferences." For example, the vector w = [0, 1, −2] indicates that the agent is indifferent to feature φ1 and wants to seek feature φ2 while avoiding feature φ3 with twice the impetus. Specific instantiations of πΨ can behave in ways that are very different from its constituent policies π ∈ Π. We can draw a parallel with nature if we think of features as concepts like water or food and note how much the desire for these items can affect an animal's behavior. Analogies aside, this sort Fig.  3 . representation of how the generalized policy πΨ is implemented through GPE and GPI. Given a state s ∈ S, the first step is to compute, for each a ∈ A, the values of the n SFs: {ψ π i (s, a)} n i=1 . Note that ψ π i can be arbitrary nonlinear functions of their inputs, possibly represented by complex approximators like deep neural networks  (30, 31) . The SFs can be laid out as an n × |A| × d tensor in which the entry (i, a, j) is ψ π i j (s, a). Given this layout, GPE reduces to the multiplication of the SF tensor with a vector w ∈ R d , the result of which is an n × |A| matrix whose (i, a) entry is Q π i (s, a). GPI then consists in finding the maximum element of this matrix and returning the associated action a. This whole process can be seen as the implementation of a policy πΨ(s; w) whose behavior is parameterized by a vector of preferences w. of arithmetic over features provides a rich interface for the agent to interact with the environment at a higher level of abstraction in which decisions correspond to preferences encoded as a vector w. Next, we discuss how this can be leveraged to speed up the solution of an RL task.
 Fast RL with GPE and GPI We now describe how to build and use the adaptable policy πΨ implemented by GPE and GPI. To make the discussion more concrete, we consider a simple RL environment depicted in Fig.  4 . The environment consists of a 10 × 10 grid with four actions available: A = {up, down, left, right}. The agent occupies one of the grid cells, and there are also 10 objects spread across the grid. Each object belongs to one of two types. At each time step t, the agent receives an image showing its position and the position and type of each object. Based on this information, the agent selects an action a ∈ A, which moves it one cell along the desired direction. The agent can pick up an object by moving to the cell occupied by it; in this case, it gets a reward defined by the type of the object. A new object then pops up in the grid, with both its type and location sampled uniformly at random (more details are in SI Appendix). This simple environment can be seen as a prototypical member of the class of problems in which GPE and GPI could be useful. This becomes clear if we think of objects as instances of (potentially abstract) concepts, here symbolized by their types, and note that the navigation dynamics are a proxy for any sort of dynamics that mediate the interaction of the agent with the world. In addition, despite its small size, the number of possible configurations of the grid is actually quite large, of the order of 10 15 . This precludes an exact representation of value functions and illustrates the need for approximations that inevitably arises in many realistic scenarios. By changing the rewards associated with each object type, one can create different tasks. We will consider that the agent wants to build a set of SFs Ψ that give rise to a generalized policy πΨ(s; w) that can adapt to different tasks through the vector of preferences w. This can be either because the agent does not know in advance the task it will face or because it will face more than one task. Defining a Basis for Behavior. In order to build the SFs Ψ, the agent must define two things: features φ and a set of policies Π. Since φ should be associated with rewarding events, we define each feature φi as an indicator function signaling whether an object of type i has been picked up by the agent (i.e., φ ∈ R 2 ). To be precise, we have that φi (s, a, s ) = 1 if the transition from state s to state s is associated with the agent picking up an object of type i, and φi (s, a, s ) = 0 otherwise. These features induce a set R φ where task rw ∈ R φ is characterized by how desirable or undesirable each type of object is. Now that we have defined φ, we turn to the question of how to determine an appropriate set of policies Π. We will restrict the policies in Π to be solutions to tasks rw ∈ R φ . We start with what is perhaps the simplest choice in this case: a set Π12 = {π1, π2} whose two elements are solutions to the tasks w1 = [1, 0] and w2 = [0, 1] (henceforth, we will drop the transpose superscript to avoid clutter). Note that the goal in tasks w1 and w2 is to pick up objects of one type while ignoring objects of the other type. We are now ready to compute the SFs Ψ induced by our choices of φ and Π. In our experiments, we used an algorithm analogous to Q-learning to compute approximate SFs ψπ 1 and ψπ 2 (pseudocode in SI Appendix). We represented the SFs using multilayer perceptrons with two hidden layers  (33) . The set of SFs Ψ yields a generalized policy π Ψ(s ; w) parameterized by w. We now evaluate π Ψ on the task whose goal is to pick up objects of the first type while avoiding objects of the second type. Using φ defined above, this task can be represented as rw 3 (s, a, s ) = φ(s, a, s ) w3, with w3 = [1, −1]. We thus evaluate the generalized policy instantiated as π Ψ(s ; w3). Results are shown in Fig.  5A . As a reference, we also show the learning curve of Q-learning (23) using the same architecture to directly approximate Q π w 3 . GPE and GPI allow one to compute an instantaneous solution for a new task, without any learning on the task itself, that is competitive with the policies found by Q-learning when using around 6 × 10 4 sample transitions. The performance of the policy π Ψ synthesized by GPE and GPI corresponds to more than 70% of the performance eventually achieved by Q-learning after processing 10 6 transitions. This is quite an impressive result when we note that π Ψ managed to avoid objects of the second type even though its constituents policies π1 and π2 were never trained to actively avoid objects. We used a total of 10 6 sample transitions to learn both SFs ψπ 1 and ψπ 2 , which is the same amount of data used by Qlearning to achieve its final performance. The advantage of doing the former is that, once we have the SFs, we can use GPE and GPI to instantaneously compute a solution for any task in R φ . However, how well do GPE and GPI actually perform on R φ ? To answer this question, we ran a second round of experiments to assess the generalization of π Ψ over the entire set R φ . Since this evaluation clearly depends on the set of policies used, we consider two other sets in addition to Π12 = {π1, π2}. The new sets are Π34 = {π3, π4} and Π5 = {π5}, where the policies πi are solutions to the tasks w3 = [1, −1], w4 = [−1, 1], and w5 =  [1, 1] . We repeated the previous experiment with each policy set and evaluated the resulting policies π Ψ over 19 tasks w evenly spread over the nonnegative quadrants of the unit circle (tasks in the negative quadrant are uninteresting because all of the agent must do is to avoid hitting objects). Results are shown in Fig.  6A . As expected, the generalization ability of GPE and GPI depends on the set of policies used. Perhaps more surprising is how well the generalized policy π Ψ induced by some of these sets perform across the entire space of tasks R φ , sometimes matching the best performance of Q-learning when solving each task individually. These experiments show that a proper choice of base policies Π can lead to good generalization over the entire set of tasks R φ . In general, though, it is unclear how to define an appropriate Π. Fortunately, we can refer to our theoretical understanding of GPE and GPI to have some guidance. First, we know from the discussion above that the larger the number of policies in Π the stronger the guarantees regarding the performance of the resulting policy π Ψ (Exp. 5). In addition to that, Barreto et al. have shown that it is possible to guarantee a minimum performance level for π Ψ on task w based on mini w − wi , where • is some norm and wi are the tasks associated with the policies πi ∈ Π used for GPE and GPI (theorem 2 in ref.  28 ). Together, these two insights suggest that, as we increase the size of Π, the performance of the resulting policy π Ψ should improve across R φ , especially on tasks that are close to the tasks wi . To test this hypothesis empirically, we repeated the previous experiment, but now, instead of comparing disjoint policy sets, we compared a sequence of sets formed by adding one by one the policies π2, π5, π1, and π3, in this order, to the initial set {π4}. The results, in Fig.  6B , confirm the trend implied by the theory. Task Inference. So far, we have assumed that the agent knows the vector w that describes the task of interest. Although this can be the case in some scenarios, ideally we would be able to apply GPE and GPI even when w is not provided. In this section and in Preferences as Actions, we describe two possible ways for the agent to learn w. Given a task r , we are looking for a w ∈ R d that leads to good performance of the generalized policy πΨ(s; w). We could in principle approach this problem as an optimization over w ∈ R d whose objective is to maximize the value of πΨ(s; w) across (a subset of) the state space. It turns out that we can exploit the structure underlying SFs to efficiently determine w without ever looking at the value of πΨ. Suppose we have a set of m sample transitions from a given task, {(si , ai , r i , s i )} m i=1 . Then, based on Exp. 6, we can infer w by solving the following minimization: min w m i=1 |φ(si , ai , s i ) w − r i | p , [9] where p ≥ 1 (one may also want to consider the inclusion of a regularization term, see ref.  33) . Observe that, once we have a solution w for the problem above, we can plug it in Exp. 7 and use GPE and GPI as we did before-that is, we have just turned an RL task into an easier linear regression problem. To illustrate the potential of this approach, we revisited the task w3 = [1, −1] tackled above, but now, instead of assuming we knew w3, we solved the problem in Exp. 9 using p = 2. We collected sample transitions using a policy π that picks actions
 A B Fig.  6 . Results on the space of tasks R φ induced by a two-dimensional φ. The sets of policies Π used in A are disjoint; in B these sets overlap. The evaluation of an algorithm on a task is represented as a vector whose direction indicates the task w and whose magnitude gives the average sum of rewards over 10 runs with 250 trials each. Q-learning learned each task individually, from scratch; the dotted curves correspond to its performance after having processed 5 × 10 4 , 1 × 10 5 , 2 × 10 5 , 5 × 10 5 , and 1 × 10 6 sample transitions. Our method only learned the policies in the sets Π and then generalized across all others tasks through GPE and GPI. The SFs used for GPE and GPI consumed 5 × 10 5 sample transitions to be trained each. uniformly at random and used the gradient descent method to refine an approximation w ≈ w online (SI Appendix). Results are shown in Fig.  5  A and B. The performance of the generalized policy π Ψ(s ; w3) using the correct w3 was recovered after around 800 sample transitions only. To put this number into perspective, recall that Q-learning needs around 60,000 transitions, or 75 times as much data, to achieve the same performance level. The number of transitions needed to learn w can be reduced further if we use the closed-form solution for the least-squares problem. The problem described in Exp. 9 can be solved even if the rewards are the only information available about a given task. Other interesting possibilities arise when the observations provided by the environment can be used to infer w, such as, for example, visual or auditory cues indicating the current task. In this case, it might be possible for the agent to determine w even before having observed a single nonzero reward  (30) . So far, we have used handcrafted features φ. It turns out that Exp. 9 can be generalized to also allow φ to be inferred from data. Given sample transitions from k tasks, {(sij , aij , r ij , s ij )} with p ≥ 1. Note that the features φ can be arbitrary nonlinear functions of their inputs. As discussed by Barreto et al.  (30) , if we make c = k we can solve a simplified version of the problem above in which wj do not show up. More generally, the problem in Exp. 10 can be solved as a multitask regression  (34) . In Fig.  5B , we show the performance of π Ψ(s ; w) when using learned features φ. These results were obtained as follows. First, we used the random policy π to collect data from tasks w1, w2, w4, and w5 and applied the stochastic gradient descent algorithm to solve Exp. 10 with p = 2. We then discarded the resulting approximations wi appearing in Exp. 10 and solved Exp. 9 exactly as before but now using φ instead of φ. As with SFs, in order to represent the features, we used multilayer perceptrons with two hidden layers (SI Appendix). The results in Fig.  5B  also show the effect of varying the dimension of the learned features on the performance of πΨ(s; w) (other illustrations are in refs.  28 and 30) . Preferences as Actions. In this section, we consider the scenario where, given features φ and a set of policies Π, there is no vector w that leads to acceptable performance of πΨ(s; w). To illustrate this situation, we use our environment with a slight twist: now, on picking up an object of a certain type, the agent gets a positive reward only if the number of objects of this type is greater or equal to the number of objects of the other type. Otherwise, the agent gets a negative reward. One can represent this problem using the previously defined features φ by switching between two instantiations of w:  [1, −1]  when the first type of object is more abundant and [−1, 1] otherwise. This means that the appropriate value for w is now state-dependent. To handle this situation, we introduce a function mapping states to preferences, ω : S → W, with W ⊆ R d , and redefine the generalized policy as πΨ(s; ω(s)). The RL problem then becomes to find a ω that correctly modulates πΨ  (32, 35) . We can look at the computation of πΨ(s; ω(s)) as a twostage process: first, the agent computes a vector of preferences w = ω(s); then, using GPE and GPI, it determines the action to be executed in state s as a = πΨ(s; w). Under this view, ω(s) becomes an indirect way of selecting an action in s, which allows us to think of it as a policy defined in the space W. We have thus replaced the original problem of finding a policy π : S → A with the problem of finding a policy ω : S → W. To illustrate the benefits of applying this transformation to the problem, we will use the task described above in which the agent must pick up the type of object that is more abundant. We will tackle this problem by reusing the SFs Ψ induced by the two policies in Π12. Given Ψ, the problem comes down to finding a mapping ω : S → W that leads to good performance of π Ψ(s ; ω(s)). We define W = {−1, 0, 1} 2 and use Q-learning to learn ω. We compare the performance of π Ψ(s ; ω(s)) with two baselines: GPE and GPI using a fixed w, π Ψ(s ; w), and the standard version of Q-learning that learns a policy π(s) over primitive actions. The results, shown in Fig.  7 , illustrate how π Ψ(s ; ω(s)) can significantly outperform the baselines. It is easy to understand why this is the case when we compare π Ψ(s ; ω(s)) with π Ψ(s ; w), for the experiment was designed to render the latter unsuitable. However, why is it that replacing the fourdimensional space A with the nine-dimensional space W leads to better performance? The reason is that ω(s) can be easier to than π(s). As discussed, the vectors w represent the agent's current preferences for types of objects. Since, in general, such preferences should only change when an object is picked up, after selecting a specific w, the agent can hold on to it until it bumps into an object. That is, it is possible to define a good policy ω that maps multiple consecutive states s to the same w. In contrast, it will normally not be possible to execute a single primitive action a ∈ A between the collection of two consecutive objects. This means that the same policy can have a simpler representation as a mapping S → W than as a mapping S → A, making ω easier to learn with certain types of function approximators like neural networks  (33) . Note that other choices of φ may induce other forms of regularities in ω-smoothness being an obvious example. Interestingly, the fact that the agent may be able to adhere to the same w for many time steps allows for a temporally extended policy πΨ(s; ω(s)) that is only permitted to change preferences at certain points in time, reducing even further the amount of data needed to learn the task  (31) . As a final remark, we note that the ability to chain a sequence of preference vectors w changes the nature of the problem of computing an appropriate set of features φ. When the agent has to adhere to a single w, the features φi must span the space of rewards defining the tasks of interest. When the agent is allowed Fig.  7 . Average sum of rewards on the task whose goal is to pick up objects of the type that is more abundant. GPE and GPI used Π 12 as the base policies and the corresponding SFs consumed 5 × 10 5 transitions to be trained each. The results reflect the best performance of each algorithm over multiple parameter configurations (SI Appendix). Shadowed regions are one standard error over 100 runs. to learn a policy ω over preferences w, this linearity assumption is no longer necessary. Similarly, the use of a fixed w requires that the set of available SFs leads to a competent policy for all tasks w we may care about. Here, this requirement is alleviated, since, by changing w, the agent may be able to compensate for eventual imperfections on the induced GPI policies  (31) . Lifelong Learning. We have looked at the different subproblems involved in the use of GPE and GPI. For didactic purposes, we have discussed these problems in isolation, but it is instructive to consider how they can jointly emerge in a real application. One scenario where the problems above would naturally arise is "lifelong learning," in which the interaction of the agent with the environment unfolds over a long period  (36) . Since we expect some patterns to repeat during such an interaction, it is natural to break it in tasks that share some common structure. In terms of the concepts discussed in this article, this common structure would be φ, which can be handcrafted based on prior knowledge about the problem or learned through Exp. 10 at the beginning of the agent's lifetime. Based on the features φ, the agent can compute and store the SFs ψπ associated with the solutions π of the tasks encountered along the way. When facing a new task r , the agent can use the vector of preferences w to quickly adapt the generalized policy π Ψ. We have discussed two ways to do so. In the first one, the agent computes an approximation w through Exp. 9, which immediately yields a solution π Ψ(s ; w). The second possibility is to learn a mapping ω(s) : S → W and use it to have a per-state modulation of the generalized policy, π Ψ(s ; ω(s)). Regardless of how the agent computes w, it can then choose to hold on to π Ψ or use it as a initial solution for the task to be refined by a standard RL algorithm. Either way, the agent can also compute the SFs of the resulting policy, which can in turn be added to the library of SFs Ψ, improving even further its ability to tackle future tasks  (28, 30) .
 Conclusion We have generalized two fundamental operations in RL, policy improvement and policy evaluation, from single to multiple operands (tasks and policies, respectively). The resulting operations, GPE and GPI, can be used to speed up the solution of an RL problem. We showed possible ways to efficiently implement GPE and GPI and discussed how their combination leads to a generalized policy πΨ(s; w) whose behavior is modulated by a vector of preferences w. Two ways of learning w were considered. In the simplest case, w is the solution of a linear regression problem. This reduces an RL task to a much simpler problem that can be solved using only a fraction of the data. This strategy depends on two conditions: 1) the reward function of the tasks of interest are approximately linear in the features φ used for GPE and 2) the set of policies Π used for GPI lead to good performance of πΨ on the tasks of interest. When these assumptions do not hold, one can still resort to GPE and GPI by looking at the preferences w as actions. This strategy can also improve sample efficiency if the mapping from states to preferences is simpler to learn than the corresponding policy. Many extensions of the basic framework presented in this article are possible. As mentioned, Barreto et al.  (31)  have proposed a way of implementing a generalized policy πΨ that explicitly leverages temporal abstraction by treating preferences w as abstract actions that persist for multiple time steps. Borsa et al.  (37)  introduced a generalized form of SFs that has a representation z ∈ Z of a policy πz as one of its inputs: ψ(s, a, z) = ψ πz (s, a). In principle, this allows one to apply GPI over arbitrary, potentially infinite, sets Π (for example, by replacing the maximization in Exp. 8 with sup z∈Z ψ(s, a, z) w).  Hunt et al. (38)  extended SFs to entropy-regularized RL, and, in doing so, they proposed solutions for many challenges that come up when applying GPE and GPI in continuous action spaces. More recently, Hansen et al.  (39)  proposed an approach that allows the features φ to be learned from data in the absence of a reward signal. Other extensions are possible, including different instantiations of GPE and GPI. All of these extensions expand the framework built upon GPE and GPI. Together, they provide a conceptual toolbox that allows one to decompose an RL problem into tasks whose solutions inform each other. This results in a divide-and-conquer approach to RL, which, combined with deep learning, has the potential to scale up our agents to problems currently out of reach. Data Availability. The source code used to generate all of the data associated with this article has been deposited in GitHub (https://github.com/deepmind/deepmind-research/tree/ master/option keyboard/gpe gpi experiments). Fig. 4 . 4 Fig. 4. Depiction of the environment used in the experiments. The shape of the objects (square or triangle) represents their type; the agent is depicted as a circle. We also show the first 10 steps taken by 3 policies, π 1 , π 2 , and π 3 , that would perform optimally on tasks w 1 = [1, 0], w 2 = [0, 1], and w 3 = [1, −1] for any discount factor γ ≥ 0.5.
 Fig. 5 . 5 Fig. 5. Average sum of rewards on task w 3 = [1, −1]. GPE and GPI used Π 12 = {π 1 , π 2 } as the base policies and the corresponding SFs consumed 5 × 10 5 sample transitions to be trained each. B is a zoomed-in version of A showing the early performance of GPE and GPI under different setups. The results reflect the best performance of each algorithm over multiple parameter configurations (SI Appendix). Shadowed regions are one standard error over 100 runs.
 j = 1, 2, . . . , k , we can formulate the problem as the search for a function φ :S × A × S → R c and k vectors wi ∈ R c satisfying min sij , aij , s ij ) wj − r ij | p , [10]
			 | www.pnas.org/cgi/doi/10.1073/pnas.1907370117 Barreto et al. Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 Barreto et al. PNAS | December 1, 2020 | vol. 117 | no. 48 | 30081 Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 | www.pnas.org/cgi/doi/10.1073/pnas.1907370117 Barreto et al. Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 PNAS | December 1, 2020 | vol. 117 | no. 48 | 30083 Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 | www.pnas.org/cgi/doi/10.1073/pnas.1907370117 Barreto et al. Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 PNAS | December 1, 2020 | vol. 117 | no. 48 | 30085 Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 | www.pnas.org/cgi/doi/10.1073/pnas.1907370117 Barreto et al. Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.
			 PNAS | December 1, 2020 | vol. 117 | no. 48 | 30087 Downloaded from https://www.pnas.org by 205.240.4.254 on March 23, 2022 from IP address 205.240.4.254.

Abstract: were supported by a generous gift from The Dame Jillian and Dr. Arthur M. Sackler Foundation for the Arts, Sciences, & Humanities, in memory of Dame Sackler's husband, Arthur M. Sackler. The complete program and video recordings of most presentations are available on the NAS website at http://www.nasonline.org/science-of-deeplearning.y


Shahar Avin
Ross Gruetzemacher
Raymond J Harbert
James Fox

Exploring AI Futures Through Role Play

Introduction Artificial intelligence (AI) has an enormous potential to have a radical effect on our future, and we all have a vested interest in trying to ensure that AI is beneficial for humanity. However, there is currently no consensus in the AI research community on what the long-term impacts of AI, potentially including general artificial intelligence, will be, or the length of time over which such changes will take place. Moreover, there are many nearand mid-term concerns that have the potential for transformative societal change  [5, 14] . The vast uncertainty around AI futures, especially ones that involve transformative societal changes, has precipitated the creation of an AI strategy research community that seeks to ensure the development of AI for the social good  [8] . In collaboration with researchers in this community, we have developed an AI futures role-play game, which we present here, to complement the research being done and to disseminate key questions and findings to individuals and organizations engaged with, or seeking to engage with, AI strategy and policy. A role-play game involves a collection of people assuming roles to enact a situation in a realistic manner so as to predict a possible future if certain strategies are employed. Role-plays have a track record of high forecasting, strategic and educational utility in a wide variety of fields, including business  [15, 21] , medicine  [18] , politics  [16]  and education  [6, 21] . In the domain of AI strategy, we believe that role-plays can illuminate plausible futures, identify critical decision points, educate, raise awareness, highlight gaps in research knowledge and promote shared visions for beneficial AI. In this paper we first review the wargaming literature to show where role-plays have been successfully used in other domains, before next looking at why role-plays offer particular benefits within the AI strategy space. We then describe the current structure of the game (still under active development), and we highlight some of the lessons learned from the 30 game events to date. We conclude with a discussion of the benefits and shortcomings of this AI role-play game, our plans for further development and dissemination, and a call for others to try roleplay as a methodology for exploring AI futures. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author. AIES  '20, February 7-8, 2020 , New York, NY, USA © 2020 Copyright is held by the owner/author(s). ACM ISBN 978-1-4503-7110-0/20/02. https://doi.org/10.1145/3375627.3375817 2 Literature Review "Serious" role-plays are most well known in their military form, wargames, where they have been used, since their Prussian development in the late 18th century, to teach military strategy in a safe but dynamic manner. Wilkinson  [24]  championed the introduction of wargames into the British army in the late 1800's and claimed that "probably no form of military study is more useful if properly conducted". Original wargames had two militaries (teams of players) fighting over some well-defined territory (the board). More recently, emerging technologies and distributed warfare necessitated wargames to shift focus from territory and troop movement to also include the diplomacy of international relations  [22, 23] , nuclear conflict escalation  [20]  and cyber operations  [1] . The potential of role-plays to provide exploration and training in uncertain and high stakes situations has been recognized in other fields. In business role-plays, for example, the conflict arises between a company and its competitors vying for market share and profit. Hamel and Prahalad  [15]  explain the popularity of role-plays in business as due to their ability to develop foresight, an essential skill for competitive survival: "an organization which does not develop a picture of the future, which does not develop foresight, is most likely not involved in the future." In education  [6, 21] , medicine  [18]  and politics  [16] , role-plays are used for formulating strategy, developing foresight, crisis response preparation, and for training and recruitment exercises. Nevertheless, despite their proven utility in a variety of different fields, role-plays have so far not been used in AI futures studies  [3] .
 When are role plays suitable? Parson  [19]  claims that role-plays are most appropriate for situations involving high enough stakes to merit substantial investment in knowledge about decision-making, but whose complexity imposes limits on the usefulness of standard decision-making procedures. Parson  [19]  gives three suitability conditions for role-plays: 1. Key outcomes depend on the interacting decisions of multiple agents. 2. Decision choice sets are ambiguous or poorly known. 3. Large numbers of complex organizations may be required to work together. The existence of multiple interacting complex agents compounded with a huge set of possible decisions creates an enormous potential scenario space. It is too difficult for one expert alone to think beyond linear views of reality, but roleplays allow non-linear effects to be explored. For instance, one can look for convergent outcomes arising from different strategies or identify the decisions pivotal in shaping the scenario's end state. Armstrong  [2]  compares and contrasts different forecasting techniques and adds that a role-play needs: 4. Large changes expected. 5. Conflict between the decision makers. If only small changes are expected, forecasters can extrapolate from current or historical examples. However, large technological step-changes -such as the discovery of electricity or the invention of the world wide web -entirely transform history's trajectory and are much harder to predict. This observation has been captured in Roy Amara's law  [17] : "we tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run." Finally, conflict generates oppositional friction which catalyzes the generation of creative ideas. Without the competitive nature of an adversarial interaction, it is hard to generate the surprising edge-case scenarios which are exactly the ones hoped to be reached by role-plays.
 Do They Work? There is empirical evidence substantiating role-playing's greater forecasting accuracy over unaided judgements in certain situations. Green, Graefe and Armstrong  [11]  showed that both experts and novices were terrible at forecasting conflict decisions if they were simply asked to "put yourself in the other person's shoes". This is because, regardless of expertise, it is too difficult to individually think through the interactions of competing characters with divergent goals in complex situations. However, if the subjects adopted the roles of the protagonists in the conflicts and interacted with each other, their group decisions predicted the actual decisions with much greater accuracy -the greater realism afforded by role-playing enabled superior forecasts to be made. Role-plays can also mitigate against myopia by helping overcome various different psychological biases. Cyert, March and Starbuck  [7]  found that subjects presented with the same data produced significantly different forecasts depending on which role they were told to act out and Babcock et al.  [4]  evidenced the tendency of role-players to make biased judgements and interpret the briefing material differently according to the role they were assigned. This explains why roleplaying benefits from larger groups and greater diversity. Duke and Geurts  [10]  found that role-playing activities in a political setting can mitigate the danger of 'groupthink', where only readily politically feasible or easy-to-implement strategies are discussed. It is not guaranteed that every role-play will provide novel insights and any insights that do arise might not be relevant or applicable. However, even end-game states that have ostensibly departed significantly from common sense are worth exploring. DeWeerd  [9]  found that when predicting the future, readers tended to reject all predictions which didn't match their own and yet were willing to accept at the hand of history what they would instantly reject if predicted in advance by someone else (examples of "unthinkable" outcomes may include the result of the Brexit referendum, the election of Donald Trump, or the attack on Pearl Harbor). Edge-case scenarios are a key virtue of role-plays since they throw up black-swan eventsunprecedented and low probability, but high impact events which are invisible to canonical forecasting techniques.
 Methods The first task when planning a game is to identify the objective (i.e. training, educational, exploring futures or a mix of these). The project to date has explored two different methodological approaches to the game, with slightly different objectives: unstructured and semi-structured games. In both cases, the aim of the game was to allow players to experience from a firstperson perspective significant changes that could be brought by the development and deployment of AI technologies, and to have players face strategically challenging decisions from a position of power, be it governmental, corporate, military, societal or other.
 Unstructured role-play For the first two years of the project, we explored various forms of unstructured role-play. Players were drawn from a variety of different backgrounds with varying AI and geopolitical expertise. The players choose their own roles and took unconstrained actions, limited only by the time available and their own creativity. Resolution of actions thus depended heavily on the "world model" of the game's facilitator, which we aimed to address through regular engagement with the AI research literature and the AI strategy research field. The overall aim of these role-plays was to trial out the methodology, and to give players a space in which to explore strategic questions that they found interesting. Whenever it was possible, early discussions with the players or a coordinator helped to determine the initial frame for the scenario and roles adopted by the players. If this was not possible, these would be chosen by the facilitator or in collaboration with the players at the beginning of the game. We experimented with different ways to brief the players, including the facilitator meeting with each player ahead of the session (for 15-30 minutes each) to discuss the strategic questions they are interested in and to flesh out the role for that player. In an alternative approach, the facilitator would tell players the available roles and provide the general framing of the game, before asking the players to do their own background reading on those roles. Which organizations and roles will matter for the future of AI is an open research question: as time goes by, the number of identified stakeholders only increases, from governments to corporations, militaries to NGOs, artists, environmentalists, criminals and citizens, AI will shape, and be shaped by, a vast number of stakeholders. Nonetheless, the power distribution amongst these actors is not equal, and in varying the organizations and roles in the unstructured role-play we were able to explore different narratives that emerge when different groups and types of power are at play. Over 30 games we trialed many different roles. These broadly clustered around: During the game, the participants would "assume" their chosen/assigned role and take actions according to their model of that actor. Participants are instructed to deliberately try to bring about a world that is in line with the goals of the role they are playing, but they should be mindful of real-world constraints. This is because the more closely the simulation captures essential behavioral features of the real system, the more likely insights are to be relevant. On the other hand, a key strength of role-plays is in exploring edge-case scenarios. Thus, as a general rule of thumb, actions should be realistic but not overly conservative. For example, one in ten actions should be an action that the participant assigns 10% likelihood of being taken. Participants are encouraged to "flesh out" the world model by adding details that complement the details provided by the facilitator.  Government organizations During previous games, participants tried out a wide range of actions, including: Games typically involve 4-8 turns, with each turn representing one or two years, thus covering a period of 4-16 years, with the starting point set in the foreseeable future (as near as 2020 or as far as 2028). The game proceeds by alternating between negotiation phases, private action phases, public actions phases, and "world updates" from the facilitator. Outcomes of actions are determined by the facilitator, sometimes assisted by a random number generator, and relayed either to teams directly or in the "world updates" at the beginning of the next turn. Figure  1  depicts the final state of the world for a recent game held in Cambridge. Immediately at the end of the scenario role-play there is a debrief where any hidden state of the world is revealed, and participants evaluate how well their assigned role performed relative to their goal. Participants are asked to reflect on the final state of the world, on actions or developments that they found surprising, and to record any disagreements with how actions were chosen or resolved. This phase of gleaning participants' insights is crucial for challenging the facilitator's own subjective biases or knowledge gaps whilst bolstering the participants' internalization of what they have learned. 
 Semi-structured role-play Based on our experience with unstructured role-play, we started developing a semi-structured game that involves a predefined game system for AI R&D, and a pre-defined set of organizations and characters, to create an experience that explores several questions we have found to be particularly pertinent, including: To explore these questions, we designed an eight-player game with the following roles: We also created organization sheets and character sheets with key information to familiarize players with their roles. As in the unstructured game, players were asked to spend each turn negotiating with each other before deciding upon a set of private and public actions. However, we made AI R&D actions structured around a technology tree (Figure  2 ) and a set of products and capabilities (Figure  3 ).
 State of the World: The unemployment rate is now 17.1%. However, people are content for the most part because of social services such as Universal Basic Income. Multiple sources have confirmed to the New York Times that AGI has been developed. Sources range in assessing the system's safety, from 25% to 75% confidence. China is preparing to establish a small city on Mars. The first 10,000 citizens will arrive during 2035.
 Paper Presentation AIES '20, February 7-8, 2020, New York, NY, USA Each turn, the different organizations have a limited amount of AI "talent" they can allocate towards pursuing technological advancement (research) or products and capabilities (development). This can be pursued in public or in private. R&D success is determined by dice rolls, with one dice per "talent" allocated to a project. The players' action can affect the distribution of "talent" in the "world". This resource management mechanic was added to explore conditions of competition and scarcity in the input to AI R&D. This is one such factor that generates an adversarial tension which drives players to seek more creative solutions. Another mechanic we added to the game was "world chaos", a catch-all parameter for global instability, whereby we capture various negative externalities of AI, including the potential of AI "hype" to distract states from addressing issues such as inequality or climate change.
 Preliminary Results The unstructured game format has allowed the exploration of many different scenarios, but consequently it is difficult to identify patterns in the scenarios played. Overall, participant satisfaction appears high, with most players indicating their interest in playing again, and many interested in reading more about different organizations, roles, actions or strategic analyses. The following range of topics have come up in at least one of the scenarios that emerged from unstructured role-play (this list is not exhaustive): It would often be the case that five or more of the above topics would be touched upon in a single game.  The semi-structured game is more constrained, and therefore provides a better opportunity to detect patterns of gameplay and decision-making. While the number of games played with the new system to date is small, and the game system is still under active development, a few patterns are beginning to emerge. First, and perhaps not surprisingly, the familiarity of players with the roles assigned to them varies greatly -while many have at least some idea of what the President of the United States cares about or what they can do, that is not the case for tech CEOs or heads of AI labs; while a good facilitator can use the game to provide some basic information about the role and some of the decisions they face (as they relate to AI), the game is more useful for all participants when the players start the game with more background knowledge, both about AI and about the contexts in which decisions about AI are made. Second, the rapid growth of options that comes with the proliferation of available AI capabilities can be overwhelming to players, who respond to the large number of available R&D avenues by either choosing randomly, picking quickly a "good enough" target, or aiming for a specific long-term technology. While this is to some extent an artefact of the game mechanics, we think it may capture a real issue, especially if AI progress lends itself to faster AI R&D and if progress remains stochastic and uncertain. Third, cooperation between actors on AI safety and (some) restriction on destabilizing uses of AI seem to both be robustly beneficial, and often necessary, for all players to achieve a good outcome. Such agreements are easier to establish if players are biased towards pro-social strategies, or when cooperation begins early in the game and is maintained and expanded, or when players recognize a common threat (e.g. an unsafe or destabilizing technology nearing completion or after a major accident). Competitive behavior, including adversarial actions (espionage, sabotage, poaching, tariffs), can sometimes be excused when a common threat emerges and the need for cooperation becomes apparent. Fourth, in almost all games players will continue pursuing ever-more-advanced technologies and capabilities, with all the resources they can afford to spend on R&D, even if the potential value of these advances is unclear, and even when earlier advances have proven to be destabilizing or risky. Fifth, while the game has a built-in system for AI R&D, some players are happy to innovate "around" this system, proposing new products or establishing new organizations during the game. Finally, different sets of possible coalitions and alliances are explored and can prove stable, including between government and corporate entities within a state, between governments, between organizations, and between sub-roles within organizations (e.g. between heads of AI labs).
 Discussion and Conclusions The AI role-play game described here presents an innovative methodology for studying and teaching the impacts of AI. It can educate, raise awareness and help illuminate the positive and negative effects of certain developments, strategic decisions, and Paper Presentation AIES '20, February 7-8, 2020, New York, NY, USA inter-stakeholder interactions thereby potentially improving the outcomes of deploying current and future AI technologies. The versatility of the technique, including its ability to be adapted to different problems throughout organizations to address the near-, mid-and long-term impacts of AI, is well-suited to the large variety of challenges encountered in the development and deployment of AI technologies across all aspects of human life. Many of the other benefits of role-play games discussed in the literature review are also applicable. The games we have conducted to date, and especially the semi-structured games, focused on a set of questions and insights that we find particularly salient. These include the interaction between near-, mid-and long-term risks, challenges of cooperation and competition between powerful actors across states of public/private lines, trade-offs between public and private research and between research and product development, and the experience of making potentially transformative decisions from a first-person (powerful) perspective under conditions of uncertainty and time pressure. The feedback from players to date suggests that these aspects of the game indeed appear salient to players, and lead to greater engagement with these questions. Based on players' feedback, and from design constraints of the game itself, we also note several shortcomings and limitations we have not yet been able to address. For example, in our focus on strategic decision making, we have focused on roleplay from the perspective of powerful actors, rather than actors with marginalized standpoints, or more detached viewpoints that highlight systemic and emergent drivers; the literature suggests that role-plays and games can be adapted for these perspectives, and have been powerful in building empathy or systems thinking when done well, and this is a potential direction for expansion. Another limitation is the sped-up timeline, that imagines dramatic, and occasionally transformative, technological shifts within an almost-foreseeable political horizon. This reflects our limited ability to conduct a realistic role-play that takes place in the political reality of 2050 or 2100, but it does mean we adopt an assumption of fairly rapid technology progress, which is in no way certain -experts significantly disagree about timelines to transformative AI capabilities and impacts  [12, 13] . This design decision was made in part to play to the strength of role-plays, which shine in exploring large and uncertain effects, partly to create a more engaging and dramatic setting, and partly because if transformative impacts happen in a matter of decades, it becomes of paramount importance to prepare decision-makers to handle the decisions they will need to face. We also stress the communication of this bias in every game debrief, but we see how this sped-up timeline may be less appealing to some, and are exploring versions of the game that focus on less dramatic changes while exploring in greater nuance short-and mediumterm impacts of technologies that are already making real research progress. Moving forward, we will continue to develop the game to increase realism, reflect new strategic research questions as they emerge, and cover more scenarios of interest to a broader set of stakeholders. We aim to expand the context of the game, through different unstructured and semi-structured scenarios and mechanics, to cover an increasing range of actors, actions, technologies and impacts of AI. This necessitates staying in constant contact and mutual feedback with the developing fields of AI futures and AI strategy as the impacts of AI become more apparent in every corner of life. In addition, we hope to continue to develop the educational potential of the game into something that can be used to raise awareness and train a variety of audiences and publics, including younger members of the public, through the development of a digital platform and a digital version of the game. Readers interested in exploring the game are invited to register their interest,  1  and those who wish to join the development of the game are encouraged to contact the authors. By allowing stakeholders to explore alternative AI futures, prepare for surprises and uncertainty, and learn from "simulated" mistakes, we hope that the methodology we propose will help win the race between the capability of the technologies we develop and our wisdom in deploying and governing them. For these reasons we see the method's impact on the use of AI for social good as being far reaching and we invite members of the community to join us in exploring the future of AI through role-play. Figure 1 : 1 Figure 1: Final state of the world from a recent unstructured game. The game involved three players playing the roles of presidents for the USA, PRC and EU. Technological progress and impacts of players' actions were determined by the facilitator.
  How do the geopolitical relations between the two leading AI powers, US and China, affect the kinds of technologies developed and the way they are deployed?  How do state-corporate relationships play out as AI technologies become more advanced and allow for a greater generation and consolidation of wealth?  How do states make decisions about the deployment of AI capabilities in strategic domains such as military and social control?  How do corporations balance the pursuit of risky basic research that could lead to transformative capabilities with nearer term, profit generating products and services?  How, and to what extent, are states willing to "pick up the tab" for negative externalities created by their corporate champions?  What factors contribute to a decision to make a research project private/secret, or conversely to publish results and share capabilities? How do actors respond when they suspect other actors of pursuing advanced research in secret?  How do decisions and impacts relating to near-term AI technologies affect the landscape in which decisions are made about mid-term AI technologies, and similarly how do those affect the setting for decisions about long-term AI?
  PRC government: president and minister of national defense  US government: president and secretary of defense  Tencent: CEO and head of AI lab  Alphabet: CEO and head of AI lab
 Figure 2 : 2 Figure 2: AI Technology Tree used in the game. Each box represents a technology that can be pursued by the players, with associated products and capabilities. Technologies advance from left to right, with progress on earlier technologies required before later technologies are "unlocked".
 Figure 3 : 3 Figure 3: An example of AI products a player can develop in the game. The required technology and the effect on game parameters are listed at the bottom of the card.
 Non-governmental actors, including academia, independent research organizations, advocacy groups and think tanks.  Supra-national actors, e.g. the EU or the UN. and roles in different countries, including the executive, the military, diplomatic services, health, and government R&D functions.  Corporate actors in different geographies and sectors, including tech (based on business models we see around the world, e.g. advertising, e-commerce or tech infrastructure), robotics, weapons, health. 
			 To register your interest in participation, please fill out the form at https://sites.google.com/view/intelligence-rising/home.

Abstract: We present an innovative methodology for studying and teaching the impacts of AI through a role-play game. The game serves two primary purposes: 1) training AI developers and AI policy professionals to reflect on and prepare for future social and ethical challenges related to AI and 2) exploring possible futures involving AI technology development, deployment, social impacts, and governance. While the game currently focuses on the inter-relations between short-, mid-and longterm impacts of AI, it has potential to be adapted for a broad range of scenarios, exploring in greater depths issues of AI policy research and affording training within organizations. The game presented here has undergone two years of development and has been tested through over 30 events involving between 3 and 70 participants. The game is under active development, but preliminary findings suggest that role-play is a promising methodology for both exploring AI futures and training individuals and organizations in thinking about, and reflecting on, the impacts of AI and strategic mistakes that can be avoided today.