{'fraction_non_alphanumeric': 0.04709660591438166, 'fraction_numerical': 0.013824133546346712, 'mean_word_length': 4.444000709975151, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learning Abstract Models for Strategic Exploration and Fast Reward Transfer

Model-based reinforcement learning (RL) is appealing because (i) it enables planning and thus more strategic exploration, and (ii) by decoupling dynamics from rewards, it enables fast transfer to new reward functions. However, learning an accurate Markov Decision Process (MDP) over high-dimensional states (e.g., raw pixels) is extremely challenging because it requires function approximation, which leads to compounding errors. Instead, to avoid compounding errors, we propose learning an abstract MDP over abstract states: low-dimensional coarse representations of the state (e.g., capturing agent position, ignoring other objects). We assume access to an abstraction function that maps the concrete states to abstract states. In our approach, we construct an abstract MDP, which grows through strategic exploration via planning. Similar to hierarchical RL approaches, the abstract actions of the abstract MDP are backed by learned subpolicies that navigate between abstract states. Our approach achieves strong results on three of the hardest Arcade Learning Environment games (Montezuma's Revenge, Pitfall!, and Private Eye), including superhuman performance on Pitfall! without demonstrations. After training on one task, we can reuse the learned abstract MDP for new reward functions, achieving higher reward in 1000x fewer samples than model-free methods trained from scratch.


Introduction
Model-based reinforcement learning (RL) offers two advantages: First, one can plan under a dynamics model, which produces a strategic exporation policy (Brafman & Tennenholtz, 2002), which is crucial for high-dimensional, sparse reward settings. Second, if we want to solve multiple tasks (e.g., loading or unloading the dishwasher) that share the same dynamics (e.g., physics) but differ only in the reward function, the dynamics learned from a single task can be ported directly to other tasks without additional learning (Laroche & Barlier, 2017). However, learning accurate models in high-dimensional state spaces is extremely challenging. As one must resort to function approximation, any errors in the model compound (Talvitie, 2014;2015) across multiple timesteps when one tries to use the model for planning, resulting in wildly inaccurate long-term predictions (Oh et al., 2015;Finn et al., 2016;Chiappa et al., 2017).
Inspired by state abstraction from hierarchical reinforcement learning (Sutton et al., 1999;Dietterich, 2000b;Andre & Russell, 2002) we propose a method, which we call Abstract Exploration (ABSPLORE), for learning an abstract MDP which avoids compounding errors using a manager and worker. We assume access to an abstraction function (Li et al., 2006;Singh et al., 1995;Dietterich, 1998), which maps a high-dimensional concrete state (e.g. all pixels on the screen) to a low-dimensional abstract state (e.g. the position of the agent). We aim to learn an (abstract) Markov Decision Process (MDP) (Section 2) over this abstract state space as follows: A manager maintains an abstract MDP over a subset of all possible abstract states which we call the known set, which is grown over time (Section 3). The crucial property we enforce is that this abstract MDP is highly accurate and near deterministic on the known set, so we can revisit novel state regions via planning while avoiding compounding errors.
Concurrently, we learn a worker policy that the manager uses to transition between abstract states (Section 4). The worker policy operates on concrete states; its goal is to hide the messy details of the real world from the manager (e.g., jumping over monsters) so that the manager has a much simpler planning problem (e.g., traversing between two locations). In our approach, the worker keeps an inventory of arXiv:2007.05896v1 [cs.LG] 12 Jul 2020 Figure 1: Illustration of the abstract MDP on MON-TEZUMA'S REVENGE. We have superimposed a white grid on top of the original game. At any given time, the agent is in one of the grid cells -each grid cell is an abstract state. In this example, the agent starts at the top of a ladder (yellow dot). The worker then navigates transitions (abstract actions) between abstract states (green arrows) to follow a plan made by the manager (red dots). skills (i.e., options (Sutton et al., 1999)), each of which is a neural network subpolicy; the worker assigns an appropriate skill for each transition between abstract states. In this way, the worker does not "forget" (Kirkpatrick et al., 2017), and we ensure monotonic progress in learning the abstract MDP.
We evaluate the strategic exploration of ABSPLORE on the Arcade Learning Environment (ALE) (Bellemare et al., 2013) games with the sparsest rewards: MONTEZUMA'S REVENGE, PITFALL!, and PRIVATE EYE. In PITFALL!, ABSPLORE achieves the superhuman performance without demonstrations. It also achieves strong results on MON-TEZUMA'S REVENGE and PRIVATE EYE, although it is not directly comparable many prior approaches, because it uses additional RAM state information in its abstraction function. Additionally, ABSPLORE can use the learned dynamics of the abstract MDP to transfer to new reward functions without re-training. When evaluated on new reward functions never seen during training, ABSPLORE achieves over 3x the reward in 1000x fewer samples than model-free methods explicitly trained on the new rewards from scratch.

Abstract Markov Decision Processes
We assume the world is an unknown episodic finite-horizon MDP with (concrete) states x ∈ X and actions a ∈ A. We further assume we have a simple predefined state abstraction function mapping concrete states x to abstract states s = φ(x). In MONTEZUMA'S REVENGE, for instance, a concrete state contains the pixels on the screen, while the corresponding abstract state contains the agent's position and inventory (Figure 1). We assume that reward only depends on the abstract states: taking any action transitioning from concrete state x to x leads to reward R(φ(x), φ(x )). planning and fast transfer to tasks with shared dynamics, but learning an accurate model over high-dimensional state spaces is challenging. To avoid compounding errors from function approximation, we propose to construct an abstract MDP over the abstract states defined by φ, which serves as a low-dimensional representation of the world (we refer to the original MDP, the world, as the concrete MDP). Concretely, the abstract MDP consists of:

Model-based approaches promise strategic exploration via
• Known set S: a set of abstract states, that can be reached (reliably) by executing abstract actions from the start state.
• Abstract actions G: abstract actions go(s, s ) ∈ G, which will be backed by a worker policy that output sequences of concrete actions.
Our proposed approach, ABSPLORE, learns the abstract MDP as follows: A manager maintains the known set and estimates of the dynamicsP and rewardsR (Section 3) with the key property thatP andR are accurate on the S and G (the current abstract MDP), so the manager can plan accurately using the abstract MDP over significant time horizons without suffering from compounding errors. Concurrently, we learn a worker policy π(a | x, (s, s )) which backs the abstract actions of the abstract MDP (Section 4). The worker deals with the messy details of the concrete states and actions, outputting concrete actions a conditioned on the concrete state x to implement the abstract Score all candidates and select highest priority candidate c 4: (c ∈ C is either a transition (s, s ) or an abstract state s) 5: Compute a plan go(s0, s1), go(s1, s2), · · · , go(sT −1, sT = s) with model 6: for t = 1 to T do 7: Call worker to execute go(st−1, st) 8: end for 9: if c is a transition (s, s ) to learn then 10: reward, success ← LEARNWORKER(s, s ) 11: Update dynamics modelP (s, s ) ← success rate of past Ntransition attempts 12: Update rewards modelR(s, s ) ← reward 13: else 14: # c is an abstract state s to explore 15: transitions ← DISCOVERTRANSITIONS() 16: Add transitions to C 17: end if 18: end while action go(s, s ), allowing the manager to operate purely on abstract states and abstract actions; the action go(s, s ) is exactly calling the worker at a concrete state x with φ(x) = s on (s, s ).
The manager obtains a set of candidate transitions C = {(s, s ) : navigating from s to s is possible} to grow the abstract MDP via randomized exploration at the fringes of the known set ( Figure 2a). Then, the worker trains on the candidate transitions (s, s ) from C until it can reliably traverse from s to s , at which point it adds the action go(s, s ) to the action set G (Figure 2b). The worker maintains an invariant that the action set G only contains reliable actions: actions go(s, s ) such that P (s | go(s, s ), s) ≥ 1 − δ. This enables the manager to easily revisit the fringes of the known set for discovering new candidate transitions. To ensure actions in G do not later become unreliable from further updating the worker (forgetting), violating the invariant, the worker learns a separate skill (neural subpolicy) for each action, reusing skills when possible.

Learning the Abstract MDP
The manager grows the abstract MDP by adding new actions to G. It does this in three main steps: (i) it discovers new candidate transition (s, s ) between nearby abstract states s and s by randomly exploring around novel states in the known set N ⊂ S (Section 3.1); (ii) it calls the worker on a candidate transition (s, s ) ∈ C to learn the abstract action go(s, s ): i.e., drive the worker's success rate P (s |go(s, s ), s) toward 1; and (iii) it updates the dynamics modelP (s, s ) 2 , representing the success rate of abstract 2 For simplicity, the worker estimatesP (s, s ) instead of action go(s, s ), and rewards modelR(s, s ) (Algorithm 1).
The manager alternates between (i) and (ii) by maintaining a prioritized list of exploration goals (Section 3.2), where each goal is either to discover new transitions around a novel state s ∈ N or call the worker to learn a candidate transition starting in the known set: (s, s ) ∈ C with s ∈ S. On each episode, the manager selects the highestpriority goal (e.g., the candidate transition (s, s )) (lines 2 -4), and navigates to the relevant abstract state (e.g., s) via planning with its dynamics model (e.g., the plan go(s 0 , s 1 ), · · · , go(s T −1 , s T = s)) (lines 5 -8). Then it executes the selected exploration goal (e.g., the worker trains on (s, s )) (line 10). Finally, the manager updates its model as follows: It estimatesP (s, s ) as the success rate of the worker's past N transition attempts to traverse (s, s ) (line 11), and updatesR(s, s ) as the reward accumulated from the first successful worker traversal of (s, s ) (line 12).

Discovering New Transitions
Unlike the typical model-based RL setting, where the actions are known, learning the abstract MDP requires simultaneously learning actions for its action set G. Thus, the manager must discover candidate transition (s, s ) ∈ C for the worker to learn as actions go(s, s ).
To discover new candidate transitions, the manager revisits a novel abstract state s ∈ N (selected according Section 3.2), where novel states are those that have been visited few times: N = {s ∈ S : n(s) < N visit }. Then it follows a simple policy π d (a t |x 0:t , a 0:t−1 ) for T d timesteps and records the transitions it observes (Algorithm 3). The policy π d outputs randomized concrete actions a t conditioned on the past concrete states x 0:t and past concrete actions a 0:t−1 , where φ(x 0 ) = s. During those T d timesteps, the manager adds the observed transitions (φ(x 0 ), φ(x 1 )), · · · (φ(x T −1 ), φ(x T )), to C. Additionally, due to imperfections in the abstraction function, certain candidate transitions may be difficult or impossible for the worker to learn. To avoid getting stuck, the manager also adds "long-distance" transitions to C: (s, s ) pairs for which the manager did not directly transition from s to s , but indirectly did so through a sequence of intermediate states (s 0 = s, s 1 , · · · , s T = s ). Letting d(s, s ) be the length of the shortest such path, the manager adds all transitions (s, s ) with d(s, s ) ≤ d max to C.
Navigating to new states often requires repeating the same action multiple times (e.g., going down the hallway requires going right many times), so we bias our exploration policy toward repeated actions. At each timestep, π d uniformly samples a concrete action and a number between 1 and T repeat , and repeats the action the sampled number of times.

Choosing an Exploration Goal
The manager grows the abstract MDP by alternating between executing exploration goals of two types: (i) discover new transitions around a novel abstract state s ∈ N and (ii) call the worker to learn a candidate transition starting in the known set: (s, s ) ∈ C with s ∈ S (it must start in the known set, so that the manager can navigate to the start by planning). To choose which goal it executes each episode, the manager scores all goals with a priority function and chooses the goal with the highest priority. Our theoretical results (Section 5) hold for any priority function that eventually chooses all exploration goals. In practice, we prioritize novel abstract states by their visit count, prioritizing the abstract states that have been visited fewer times, yielding the priority function f n (s) = −n(s).
We prioritize the candidate transitions that are easy to learn (for fast growth of the abstract MDP) and bottleneck candidate transitions, transitions that, when learned, enable learning further transitions. Candidate transitions that are shorter and are already successfully being traversed by the worker tend to be easier. Hence, we estimate how easy a candidate transition is with: where n succ is the number of times the worker has successfully traversed (s, s ) and n f ail is the number of times the worker has failed in traversing (s, s ). A candidate (s, s ) transition is a bottleneck if learning it is the only way to reach new abstract states: i.e., there is another abstract state s with (s , s ) ∈ C and no other candidate transitions end in s . Altogether, we prioritize a candidate transition as f c (s, s ) = λ 1 n succ (s, s ) − n f ail (s, s ) − d(s, s ) 2 + I b (s, s )λ 2 + λ 3 , where I b (s, s ) is an indicator that is 1 if (s, s ) is a bottleneck and λ 3 is a constant to weight candidate transitions differently from novel abstract states. Additionally, to prioritize goals with high reward, we define f n (s) = f n (s) + R(s 0 , s) and f c (s, s ) = f c (s, s ) + R(s 0 , s), where R(s 0 , s) is the reward received by planning to go from the initial abstract state s 0 to s. Then, the manager alternates switches between f and f .

Learning the Worker Policy
The worker handles the messy details of concrete states and concrete actions so that the manager can plan over the much simpler abstract state space. It accomplishes this by learning the subtask of reliably traversing transitions (s, s ) from the manager's candidate transitions C, thus forming actions go(s, s ) in the action set G of the abstract MDP. The worker helps maintain two key properties: First, to enable the manager to easily visit any abstract state in the known set, the worker maintains the invariant that all actions go(s, s ) ∈ G are reliable (i.e., P (s | go(s, s ), s) ≥ 1 − δ). Second, it learns transitions in a way that preserves the Markov property of the abstract MDP.
Algorithm 2 LEARNWORKER(s, s , x 0 ) Require: a transition (s, s ) to learn, called at concrete state x0 with φ(x0) = s 1: Set worker horizon H = d(s, s ) × Hworker 2: Choose a0 ∼ π w (x0, (s, s )) = π I(s,s ) (x0, s ) 3: for t = 1 to H do 4: Observe concrete state xt, extrinsic reward r E t 5: Compute worker intrinsic reward r I t = R (s,s ) (xt|s ) 6: Update worker on (xt−1, at−1, r I t , xt) 7: Choose at ∼ π w (xt, (s, s )) = π I(s,s ) (xt, s ) 8: end for 9: Compute success = I[r I 1 + · · · + r I H ≥ Rhold] 10: ifP (s, s ) ≥ 1 − δ then 11: Freeze worker's skill π I(s,s ) 12: Add go(s, s ) to abstract MDP 13: end if 14: Return extrinsic reward r E 1 + · · · + r E H , success While it possible to learn a single policy for all transitions, it is tricky to ensure that all actions stay reliable, since learning new transitions can have deleterious effects on previously learned transitions. Instead, the worker maintains an inventory of skills (Section 4.1), where each transition is learned by a single skill, sharing the same skill amongst many transitions when possible. The worker uses these skills to form the action set of the abstract MDP following Algorithm 2: When the manager calls the worker on a transition (s, s ), the worker selects the appropriate skill from the skill inventory and begins an episode of the subtask of traversing s to s (Section 4.2) (lines 1 -8). During the skill episode, the skill receives intrinsic rewards, successfully completes the subtask if it navigates to s and meets the worker's holding heuristic, a heuristic for maintaining the Markov property by ensuring that the worker has not navigated to a concrete state requiring time information unobserved in the abstract state (line 9). The worker adds the action go(s, s ) to the abstract MDP once it learns to reliably traverse (s, s ) (e.g., P (s, s ) ≥ 1 − δ) (lines 10 -13).

Skill Repository
The worker's skill inventory I indexes skills so that the skill at index I(s, s ) reliably traverses transition (s, s ). Each skill is a goal-conditioned subpolicy π I(s,s ) (a|x, s ), which produces concrete actions a conditioned on the current concrete state x and the goal abstract state s . When the worker traverses a transition (s, s ), it calls on the corresponding skill until the transition is traversed: i.e., π w (a|x, (s, s )) = π I(s,s ) (a|x, s ).
When learning a new transition (s, s ), the worker first tries to reuse its already learned skills from the skill inventory. For each skill π i in the skill inventory, it measures the success rate of π i on the new transition (s, s ) over N transition attempts. If the success rate exceeds the reliability threshold 1 − δ for any skill π i , it updates the skill repository to reuse the skill: I(s, s ) ← π i . Otherwise, if no already learned skill can reliably traverse the new transition, the worker creates a new skill and trains it to navigate the transition by optimizing intrinsic rewards (Section 4.2).

Worker Subtask
Given a candidate transition (s, s ), the worker's subtask is to navigate from abstract state s to abstract state s , forming the actions in the abstract MDP. Each episode of this subtask consists of d(s, s ) × H worker timesteps (longer transitions need more timesteps to traverse), where the reward at each timestep is R (s,s ) (x t ) = 1 if the skill has successfully reached the end of the transition (φ(x t ) = s ) and 0 otherwise. These episodes additionally terminate if the main episode terminates or if the manager receives negative environment reward.
When solving these subtasks, the worker must be careful not to violate the Markov property. In particular, the concrete state may contain critical time information unobserved in the abstract state. For example, consider the task of jumping over a dangerous hole, consisting of three abstract states: s 1 (the cliff before the hole), s 2 (the air above the hole), and s 3 (the solid ground on the other side of the hole). The worker might incorrectly assume that it can reliably traverse from s 1 to s 2 by simply walking off the cliff. But adding this as a reliable transition to the abstract MDP causes a problem: there is now no way to successfully traverse from s 2 to s 3 due to missing timing information in the abstract state (i.e., the worker will soon fall), violating the Markov property.
On navigating a transition (s, s ), the worker avoids this problem by navigating to s and then checking for missing timing information with the holding heuristic. The idea is that if critical timing information is missing, that timing information would eventually cause the abstract state to change (e.g., in the example, the worker would eventually hit the bottom and die). Consequently, if the worker can stay in s for many timesteps, then the timing must not be important. This corresponds to only declaring the episode as a success if the worker accumulates at least R hold reward (equivalent to being in s for R hold timesteps).
Any RL algorithm can be used to train the skills to perform this subtask. We choose to represent each skill as a Dueling DDQN (van Hasselt et al., 2016;Wang et al., 2016). For faster training, the skills use self-imitation (Oh et al., 2018) to more quickly learn from previous successful episodes, and count-based exploration similar to (Bellemare et al., 2016) to more quickly initially discover skill reward. Since the skill inventory can contain many skills, we save parameters by occasionally using pixel-blind skills. Appendix A.3 fully describes our skill training and architecture.

Formal Analysis
We analyze the sample complexity (Kakade et al., 2003) of ABSPLORE, the number of samples required to, with high probability, learn a policy achieving near-optimal reward. Standard tabular setting results (e.g., MBIE-EB (Strehl & Littman, 2008)) guarantee learning a near-optimal policy, but require a number of timesteps polynomial in the size of the state space, which is vacuous in the deep RL setting, with exponentially large state spaces (e.g., > 10 100 states).
In contrast, assuming that our neural network policy class is rich enough to represent all necessary skills, with high probability, our approach can learn a near-optimal policy on a subclass of MDPs in time and space polynomial in the size of the abstract MDP (details in Appendix F). The key intuition is that instead of learning a single long-horizon task, ABSPLORE learns many short-horizon subtasks of navigating from one abstract state to another. This is critical, as many deep RL algorithms (e.g. -greedy) require a number of samples exponential in the time horizon to solve a task.

Experiments
Following ( and do not require sophisticated exploration. We use the default ALE setup (Appendix A) and end the episode when the agent loses a life. We report rewards from periodic evaluations every 4000 episodes, where the manager plans for optimal reward in the currently constructed abstract MDP. We average our approach over 4 seeds and report 1 standard deviation error bars in the training curves. Our experiments use the same set of hyperparameters (Appendix A.1) across all three games, where the hyperparameters were exclusively and minimally tuned on MONTEZUMA'S REVENGE.
To decouple learning an abstraction from effectively leveraging abstraction, we use the RAM state (available through the ALE simulator) to extract the bucketed location of the agent and the agent's inventory for our abstraction function. Roughly, this distinguishes states where the agent is in different locations or has picked up different items, but doesn't distinguish states where other details differ (e.g. monster positions or obstacle configurations). Notably, the abstract state function does not specify what each part of the abstract state means, and the agent does not know the entire abstract state space beforehand. We describe the exact abstract states in Appendix A.2. Section 6.5 also presents a promising direction for automatically learning the abstraction.

Transfer to New Reward Functions
A key benefit of learning a dynamics model is that it can facilitate transfer to other reward functions (tasks). If a new abstract reward function is directly provided, ABSPLORE can perform 0-shot transfer, by computing a good policy with the learned dynamics and new rewards. We show here that even if the new reward function is unknown, by leveraging the learned abstract MDP dynamics model, ABSPLORE can quickly transfer to reward functions that were not seen during training. It does this by revisiting the abstract MDP's transitions to update the rewards model with the newly observed reward, and then computing a policy that achieves high reward under the new reward function via planning.
To evaluate this, we first train ABSPLORE on the standard reward function in MONTEZUMA'S REVENGE. Then, we transfer to 3 new reward functions: (e.g., kill spider, which requires the agent to navigate through 5 rooms to pick up and save a sword for the spider in room 13.) We compare with SmartHash ( However, ABSPLORE can still perform well even if these conditions are not met, highlighting the ability of modelbased algorithms like ours to quickly transfer to new tasks in the same domain. We describe the details in Appendix D.2.

Strategic Exploration
MONTEZUMA'S REVENGE, PITFALL!, and PRIVATE EYE have extremely sparse rewards (often hundreds of timesteps elapse between rewards) and thus require strategic exploration to solve. We compare ABSPLORE with two main baselines: • AbsHash: a direct adaptation of SmartHash, which uses the same RAM information as ABSPLORE to perform count-based exploration on abstract states (see (Tang et al., 2017) for details).
• The non-demonstration state-of-the-art approaches when these experiments were conducted: in MON-TEZUMA'S REVENGE, we compare with RND (Burda et al., 2018); in PITFALL!, we compare with SOORL (Keramati et al., 2018), which is the first nondemonstration approach to achieve positive reward on PITFALL!, but requires extensive engineering (much stronger than RAM state info) to identify and extract objects; in PRIVATE EYE, we compare with DQN-PixelCNN (Ostrovski et al., 2017). Notably, AB-SPLORE is not directly comparable to these approaches: RND and DQN-PixelCNN do not use RAM information, while SOORL uses even stronger information, but we chose the best prior approaches regardless of the prior knowledge they use. We also note that methods achieving even higher rewards, e.g., GoExplore (Ecoffet et al., 2019) and Atari57 (Badia et al., 2020) have been released since 2018, when these experiments were conducted. Figure 3 shows the main results. ABSPLORE far outperforms AbsHash, which suggests that ABSPLORE more effectively leverages abstraction than prior approaches, and that RAM state does not trivialize the task. ABSPLORE is the (concurrent) first non-demonstration approach to achieve superhuman performance on PITFALL!, achieving a final average reward of 9959.6 after 8B frames of training, compared to average human performance: 6464 (Pohlen et al., 2018). It achieves more than double the reward of SOORL, which achieves a maximum reward of 4000 over 100 seeds and a mean reward of 80.52, and even significantly outperforms Ape-X DQfD (Pohlen et al., 2018), which uses high-scoring expert demonstrations during training to achieve a final mean reward of 3997.5. In MONTEZUMA'S REVENGE, after 2B training frames, ABSPLORE achieves comparable but slightly lower average rewards than RND, although ABSPLORE continues to improve even late into training and shortly exceeds the rewards achieved by RND. In Appendix D.3, we present more results on the ability of AB-SPLORE to continue to learn without plateauing. In PRIVATE EYE, ABSPLORE achieves a mean reward of 32211.5, more than double the reward of DQN-PixelCNN, which achieves 15806.5. Our approach performs even better (60247 at 200M frames), approaching human performance, when a single hyperparameter is changed (Appendix D.4).
To summarize, ABSPLORE successfully uses the abstract MDP for strategic exploration. In the three sparsestreward ALE games, ABSPLORE achieves competitive results, although not directly comparable with RND and DQN-PixelCNN, which do not use access to the RAM info used by ABSPLORE. After we ran our experiments, GoExplore (Ecoffet et al., 2019), a concurrent approach, using similar prior knowledge as RAM info, reported even higher reward: about 15x more on MONTEZUMA'S REVENGE and 6x more on PITFALL!; the main benefit of ABSPLORE over GoExplore is its ability to transfer to new tasks and its ability to learn the abstract MDP.

Robustness to Stochasticity
We additionally evaluate the performance of our approach on the recommended (Machado et al., 2017) form of ALE stochasticity (sticky actions 25% of the time) on PRIVATE EYE (selected because it requires the fewest frames for training). Figure 4 compares the performance of our method on the stochastic version of PRIVATE EYE with the performance of our method on the deterministic version of PRI-VATE EYE. Performance degrades slightly on the stochastic version, because the worker's skills become harder to learn. However, both versions outperform the prior state-of-theart DQN-PixelCNN, and the worker is able to successfully abstract away stochasticity from the manager in the stochastic version of the game so that the abstract MDP remains near-deterministic.

Robustness to Variations in the Abstraction Function
An important feature of ABSPLORE is its ability to perform well under many different abstraction functions. This enables successfully applying it to tasks without searching for the perfect abstraction function. To study this, we train AB-SPLORE with multiple variants of our abstraction function: Our state abstraction function buckets the agent's (x, y) coordinates. We obtain variants of it by varying the bucketing size: increasing the bucketing size results in fewer, coarser abstract states.
We report results in Figure 5 on five different bucket sizes obtained by scaling the original bucket size by 1 4 , 4 9 , 1, 9 4 , and 4. To adjust for the updated bucket sizes, we also scale the worker's skill episode horizon H worker by the same value. ABSPLORE outperforms the prior state-of-the-art approach DQN-PixelCNN across the entire range of bucket sizes, suggesting that it does not require a highly-tuned state abstraction function. While a drawback of ABSPLORE is its use of RAM information for the abstraction function, the Attentive Dynamics Model (ADM) (Choi et al., 2018) presents a promising avenue for automatically learn the abstraction without RAM information. Specifically, the key information required from the RAM is the agent's position (the other parts of our abstraction can be inferred from pixels). ADM automatically detects the agent's position from pixels by applying a grid over the screen, predicting the action between consecutive frames in each grid cell, and learning to attend to the cells that best predict the agent's action. The attention naturally focuses on the agent's location, because the agent's action can only be predicted from the cells containing the agent. We compare the abstract states obtained by our RAM state abstraction function with those obtained by a modified version of ADM on over 100K frames throughout the rooms of MONTEZUMA'S REVENGE, PITFALL!, and PRIVATE EYE and find that they yield similar abstract states 75%, 64%, and 81% of the time respectively (we defer the detailed setup of this experiment to Appendix C). While ADM still makes a fair number of errors, these results are a promising proof-of-concept that the abstraction function can be automatically learned in future work.

Related Work
In theory, model-based RL offers improved exploration (Brafman & Tennenholtz, 2002) and faster transfer to new tasks (Laroche & Barlier, 2017). However, in practice, model-based approaches (Guo et al., 2014), struggle to match the performance of model-free methods (Hessel et al., 2017) in high-dimensional state spaces, due to errors in function approximation which compound throughout planning. More expressive function approximators help for learning accurate models in relatively low-dimensional (e.g., < 100 dimensions) state spaces (Nagabandi et al., 2018), but even the best high-dimensional models (Oh et al., 2015;Finn et al., 2016) produce poor longterm predictions due to compounding errors. Other works try to robustly plan with imperfect models (Weber et al., 2017;Abbeel et al., 2006;Sutton, 1990), but this reduces sample efficiency.
Our work leverages abstraction (Dietterich, 2000a;Li et al., 2006) to learn accurate models. While many other works (Schmidhuber, 1993;Singh et al., 1995;Vezhnevets et al., 2017;Bacon et al., 2017) similarly leverage abstraction, they do not learn models, preventing them from planning for strategic exploration or fast transfer to new reward functions, as we do. Within the body of hierarchical reinforcement learning (HRL), two works most relate to ours. Ecoffet et al.
(2019) concurrently developed GoExplore, which similarly progressively discovers new abstract states via randomized exploration on the fringes of the known set. Unlike AB-SPLORE, GoExplore does not construct a model, which enables it to be more sample efficient on a single task, but prevents it from transferring to new tasks. Roderick et al. (2017) similarly learn models over abstract states and skills, but differ in critical design decisions (e.g., sharing parameters between workers, leading to catastrophic forgetting), which leads to poor empirical performance.

Conclusion
This work presents framework for achieving effective strategic exploration and fast transfer to shared dynamics tasks via planning. This is particularly desirable, because many tasks are easily specified with sparse binary reward functions (Nair et al., 2017), and thus require strategic exploration. Also, many real-world families of tasks share the same dynamics: e.g., navigating the Internet (Shi et al., 2017;Liu et al., 2018) or manipulating objects with a robotic arm. Whereas prior model-based approaches struggle in highdimensional state spaces, due to compound errors from function approximation, ABSPLORE learns an accurate abstract model over low-dimensional abstract states by leveraging the idea of abstraction from hierarchical RL. This brings the drawback of requiring an abstraction function, but Section 6.5 presents a promising avenue for future work to automatically learn the abstraction function.

A. Experiment Details
Following Mnih et al. (2015), the pixel concrete states are downsampled and cropped to 84 by 84 and then are converted to grayscale. To capture velocity information, the worker receives as input the past four frames stacked together. Every action is repeated 4 times.
In addition, MONTEZUMA'S REVENGE and PITFALL! are deterministic by default. As a result, the manager deterministically navigates to the fringes of the known set by calling on the worker's deterministic, saved skills. To minimize wallclock training time, we save the states at the fringes of the known set and enable the worker to teleport to those states, instead of repeatedly re-simulating the entire trajectory. When the worker teleports, we count all the frames it would have had to simulate as part of the training frames. Importantly, this only affects wallclock time, and does not benefit or change the agent in any way. Notably, this does not apply to PRIVATE EYE, where the initial state is stochastically chosen from two similar possible states.

A.3. Skill Training and Architecture
Architecture. Our skills are represented as Dueling DDQNs (van Hasselt et al., 2016;Wang et al., 2016), which produce the state-action value Q (s,s ) (x, a) = A (s,s ) (x, a) + V (s,s ) (x), where A (s,s ) (x, a) is the advantage and V (s,s ) (x) is the state-value function. The skills recover a policy π K(s,s ) (a|x, (s, s )) by greedily selecting the action with the highest Q-value at each concrete state x.
The skill uses the standard architecture (Mnih et al., 2015) to represent A (s,s ) (x, a) and V (s,s ) (x) with a small modification to also condition on the transition (s, s ). First, after applying the standard ALE pre-processing, the skill computes the pixel embedding e x of the pixel state x by applying three square convolutional layers with (filters, size, stride) equal to (32, 8, 4), (64, 4, 2), and (64, 4, 2) respectively with rectifier non-linearities (Nair & Hinton, 2010), and applying a final rectified linear layer with output size 512. Next, the skill computes the transition embedding e (s,s ) by concatenating [e r ; e dif f ] and applying a final rectified linear layer with output size 64, where: • e r is computed as the cumulative reward received by the skill during the skill episode, represented as onehot, and passed through a single rectified linear layer of output size 32.
• e dif f is computed as s − s passed through a single rectified linear layer of output size 96.
Finally, e x and e (s,s ) are concatenated and passed through a final linear layer to obtain A (s,s ) (x, a) and V (s,s ) (x).
To prevent the skill from changing rapidly as it begins to converge on the optimal policy, we keep a sliding window estimate of its success rate p success . At each timestep, with probability 1 − p success , we sample a batch of (x, a, r, x ) tuples for transition (s, s ) from the replay buffer and update the policy according the DDQN loss function: L = ||Q (s,s ) (x, a) − target|| 2 2 , where target = (r + Q target (x , arg max a ∈A Q (s,s ) (x , a ))). Additionally, since the rewards are intrinsically given, the optimal Q-value is known to be between 0 and R hold . We increase stability by clipping target between these values.
Pixel blindness. In addition, some skills are easy to learn (e.g. move a few steps to the left) and don't require pixel inputs to learn at all. To prevent the skills from unnecessarily using millions of parameters for these easy skills, the worker first attempts to learn pixel-blind skills for simple transitions (s, s ) with d(s, s ) = 1 (i.e. (s, s ) was directly observed by the manager). The pixel-blind skills only compute e (s,s ) and pass this through a final layer to compute the advantage and value functions (they do not compute or concatenate with e x ). If the worker fails to learn a pixel-blind skill, (e.g.

Hyperparameter
Value Success weight λ 1 (1 (stochastic), 10, 100 (deterministic)) New transition exploration goal weight λ 2 5000 Abstract state exploration goal weight λ if the skill actually requires pixel inputs, such as jumping over a monster) it will later try to learn a pixel-aware skill instead.
Epsilon schedule. The skills use epsilon-greedy exploration, where at each timestep, with probability , a random action is selected instead of the one produced by the skill's policy (Watkins, 1989). Once a skill becomes frozen, is permanently set to 0.
The number of episodes required to learn each skill is not known in advance, since some skills require many episodes to learn (e.g. traversing a difficult obstacle), while other skills learn in few episodes (e.g. moving a little to the left). Because of this, using an epsilon schedule that decays over a fixed number of episodes, which is typical for many RL algorithms, is insufficient. If epsilon is decayed over too many episodes, the simple skills waste valuable training time making exploratory actions, even though they've already learned near-optimal behavior. In contrast, if epsilon is decayed over too few episodes, the most difficult skills may never observe reward, and may consequently fail to learn. To address this, we draw motivation from the doubling trick in online learning (Auer et al., 1995) to create an epsilon schedule, which accomodates skills requiring varying number of episodes to learn. Instead of choosing a fixed horizon, we decay epsilon over horizons of exponentially increasing length, summarized in Figure 6. This enables skills that learn quickly to achieve low values of epsilon early on in training, while skills that learn slowly will later .
Self-imitation. When learning to traverse difficult obstacles (e.g. jumping over a disappearing floor), the skill may observe a few successes long before successfully learning a policy to reliably traverse the difficult obstacle. We use a variant of the self-imitation described in (Oh et al., 2018) to decrease this time. Whenever a skill successfully traverses a transition, it adds the entire successful trajectory to a separate replay buffer and performs imitation learning on the successful trajectories. These successful trajectories are actually optimal skill trajectories because the skill episode uses undiscounted reward, so all successful trajectories are equally optimal. To update on these skills, the skill periodically samples from this replay buffer and updates on an imitation loss function L imitation (θ) = L 1 (θ) + L 2 (θ), where θ is the skill's parameters, and L 1 and L 2 are defined as below: • Let G t = T i=t r t be the reward to-go for a successful trajectory (x 0 , a 0 , r 0 ), · · · , (x T , a T , r T ). L 1 directly regresses Q (s,s ) (x, a) on the reward to-go of the successful trajectory, because G t is actually the optimal Q-value on successful trajectories (all successful trajectories are equally optimal): i.e., L 1 = ||G t − Q (s,s ) (x t , a t )|| 2 .
• We use the margin-loss from Hester et al. (2018) for L 2 . When sampling a transition (x, a E , r, x ), Intuitively, L 2 encourages the skill to replay the actions that led to successful trajectories over other actions. We use λ = 0.5, which was chosen with no hyperparameter tuning. Table 2 compares the final performance of our method with the previous state-of-the-art after training.

C. Detailed Setup for Automatically Learning the Abstraction Function
A drawback of ABSPLORE is that it uses RAM information to construct the abstraction function. Specifically, in all three games, the abstraction function uses the following information from the RAM: (i) the agent's location, (ii) the objects the agent has picked up, and (iii) the agent's current room number. The objects that the agent has picked up can be inferred from the cumulative episodic reward. The agent's current room number can be inferred by clustering frames by visual similarity (Choi et al., 2018) and treating each cluster as a different room. Multiple rooms may look the same, and therefore end up in the same cluster, but they can be disambiguated if the agent's location can be accurately predicted, by looking at the total distance traveled by the agent. When the agent arrives at different rooms, it will have traveled a different amount to get there.
Thus, the main information our approach requires from the RAM is the agent's location. The Attentive Dynamics Model (ADM) from Choi et al. (2018) automatically learns to extract the agent's location via self-supervised inversemodel loss function. Using this would enable our approach to operate directly on pixels, without additional RAM information. We summarize ADM here, but defer to Choi et al. (2018) for the full details: ADM applies a 9 x 9 grid over the screen and learns an inverse dynamics model from each grid cell (predicting the action taken between consecutive frames). Then, it learns an attention mechanism to place attention on the grid cells that best predict the agent's action. These cells are exactly the grid cells containing the agent, because, for example, predicting that the agent took the left action can only be done from the cells containing the agent. We use ADM with the following modifications: 1. The attention weights are obtained with softmax instead of sparsemax (Martins & Astudillo, 2016) for implementation simplicity.
2. We found that that the entropy regularization loss L ent did not help in learning, so we do not use that term.
3. We added a temporal consistency loss term L c to the objective with weight 0.1 to encourage the attention to be similar across consecutive frames. Specifically, at timestep t, L c = ||α t − α t−1 || 2 , where α t is the current attention and α t−1 is the attention in the previous timestep.
We evaluate the position extracted by our modified ADM on MONTEZUMA'S REVENGE, PITFALL!, and PRIVATE EYE, and compare it to the actual position of the agent, extracted finding the cells containing the hard-coded colors matching the agent's sprite. To integrate ADM with AB-SPLORE, everytime ABSPLORE encountered a new room, we would collect some frames of training data in the new room via random exploration for ADM. Then, we would train ADM on this data (and the data collected from past rooms) and then freeze ADM on this room, to always produce the same abstract states in this room. We simulate this process by training ADM in a progression of rooms obtained from ABSPLORE trained with the RAM abstract state. On each encounter of a new room, we collect 10000 frames of data to train ADM on, and a separate 5000 frames to test ADM on by following the simple exploration policy π d from Section 3.1. We report the accuracy of ADM averaged over all the rooms in table 3, counting successes as any time ADM predicts a grid cell containing the agent, or a grid cell one-away from the agent (an amount of error tolerable by ABSPLORE).
As is, ADM makes too many errors to effectively combine it with ABSPLORE. However, this result is a promising proof-of-concept that it's possible to automatically learn the abstraction function without RAM information. Future work that improves the accuracy of ADM may make it possible to directly combine with ABSPLORE.

D.1. Skill Sharing
The worker learns skills that successfully apply in to many similar transitions. Figure 7 depicts the number of different transitions each skill is used on in MONTEZUMA'S RE-VENGE, PITFALL!, and PRIVATE EYE. The simplest skills (e.g. move to the left) enjoy the highest number of reuses, while more esoteric skills (e.g. jump over a particular monster) are only useful in few scenarios. Figure 8 provides an example of a skill in MONTEZUMA'S REVENGE with relatively high reuse. The arrows denote the movement of the agent when it executes the skill. The same skill that jumps over a monster in the first room (Figure 8(a)) can also climb up ladders. In Figure 8(b), the skill appears to know how to climb up all parts of the ladder except for this middle. This occurs because the spider occasionally blocks the middle of the ladder, and a different special skill must be used to avoid the spider. However, the skill reuse is not perfect. For example, in Figure 8(a), the skill can climb up the top half of ladders, but a separate skill climbs the bottom half of the ladders.

D.2. Generalization to New Tasks
To evaluate the ability of our approach to generalize to new reward functions, we train our approach on the basic MONTEZUMA'S REVENGE reward function and then test it on three challenging new reward functions (illustrated in Figure 9), not seen during training: • Get key: the agent receives 1000 reward for picking up the key in room 14 (6 rooms away from the start). In addition, the agent receives -100 reward for picking up any other objects or opening any other doors.
• Kill spider: the agent receives 1000 reward for killing the spider in room 13 (5 rooms away from the start). To kill the spider, the agent must first pick up the sword in room 6 (3 rooms away from the start) and save the sword for the spider. The agent receives no other reward.
• Enter room 8: the agent receives 1000 reward for entering room 8 (6 rooms away from the start). The agent receives no other reward.
In all three tasks, the episode ends when the agent completes its goal and receives positive reward.
Our approach trains on the basic MONTEZUMA'S REVENGE reward function for 2B frames, and then is allowed to observe the new reward functions for only 1M frames. We Our approach quickly transfer with 1M frames, whereas SmartHash trains from scratch for 1000x more frames, and still achieves lower reward. compare with SmartHash, which trains directly on the new reward functions for 1B frames. The results are summarized in Figure 10. Even when evaluated on a reward function different from the reward function it was trained on, our approach achieves about 3x as much reward as SmartHash, which is trained directly on the new reward function. Averaged over all 3 tasks, our approach achieves an average reward of 716.7 out of an optimal reward of 1000, whereas SmartHash only achieves an average reward of 220, even when trained directly on the new reward function. These experiments suggest that after our approach is trained in an environment on one task, it can quickly and successfully adapt to new tasks with little additional training.

D.3. Near-Linear Training
Whereas many prior state-of-the-art approaches tend to plateau toward the end of training, our approach continues to make near-linear progress. Figure 11 graphs the number of transitions learned by the worker against the number of frames in training. In MONTEZUMA'S REVENGE and PITFALL! particularly, the rate the worker learns new transitions is nearly constant throughout training. Because of this, when we continued to train a single seed on PITFALL!, by 20B frames, it achieved a reward of 26000, and by 80B frames, it achieved a reward of 35000.

D.4. Additional Results on PRIVATE EYE
By changing a single hyperparameter, our approach can perform even better on PRIVATE EYE, exceeding human performance on 2 of 4 seeds. Since nearby abstract states  Figure 12: Performance of our approach on PRIVATE EYE, when decreasing the number of exploration episodes (N visit ). (a) When N visit is set to 10, our approach performs even better, achieving near human-level rewards. (b) Decreasing N visit enables the worker to learn more transitions in fewer frames.
are particularly easy to discover in PRIVATE EYE, the manager needs not explore for new transitions as many times. Consequently, if we decrease the number of times the manager explores around each abstract state N visit from the 500 (used in the main experiments for all three games) to 10, performance improves. Figure 12 compares the performance with the decreased value of N visit with the original value of N visit reported in the main experiments. Decreasing N visit prevents the manager from wasting frames with unnecessary exploration and consequently enables the worker to learn more transitions in fewer total frames. With N visit set to 10, our approach achieves a final average performance of 60247 after 200M frames of training. Additionally, the top 2 of our 4 seeds achieve rewards of 75600 and 75400, exceeding average human performance: 69571 (Pohlen et al., 2018). (Henderson et al., 2017) emphasizes the importance of running many seeds to combat the high variance of deep RL results. We report additional results with 10 different random seeds of ABSPLORE on MONTEZUMA'S REVENGE, PITFALL!, and PRIVATE EYE in Figure 13. Due to computational constraints, we only run for 150M frames, but even with more seeds, our approach still compares favorably to the prior state-of-the-art.

F. Guarantees for Near Optimality
In general, a hierarchical policy over skills is not guaranteed to be near-optimal, because certain optimal trajectories may be impossible to follow using the skills. Because of this, hierarchical reinforcement learning literature typically focuses on hierarchical optimality (Dietterich, 2000a) optimality given the abstractions. However, under the following assumptions, our approach provably achieves a near-optimal policy on the original MDP in time polynomial in the size of the abstract MDP, with high probability.
Notation. Recall that we are interested in finding a nearoptimal policy on the concrete MDP, with concrete states x ∈ X and concrete actions a ∈ A. We refer to the value function of the optimal policy in the concrete MDP as V * (x).
From the concrete MDP approach constructs the abstract MDP, consisting of abstract states s in the known set S, learned abstract actions o (e.g., go(s, s )), transition dynamics P (s |o, s), and rewards R(s, s ). The abstract MDP changes over time. We refer to the known set at timestep t as S t and to the set of all abstract states as Φ = {φ(x) : x ∈ X }. We refer to the optimal value function on the abstract MDP at timestep t as V * t (s). Our approach maintains estimates of the rewards and transition dynamics of the abstract MDP. With these estimates, at each timestep t, our approach computes π t , the policy that is optimal with respect to these models (e.g., via value iteration). To simplify notation, we refer to the expected reward achieved by π t on the abstract MDP at timestep t starting at abstract state s as V πt t (s). The policy computed by our approach, π t also applies on the concrete MDP, because actions on the abstract MDP are implemented as subpolicies on the concrete MDP. Consequently, we refer to the expected reward achieved by π t on the concrete MDP starting at concrete state x as V πt (x).
Assumptions. Formally, we require the following assumptions: 1. The learned abstract MDP is deterministic.
2. The learned abstract MDP has rewards that are path independent: i.e., all trajectories to an abstract state s achieve the same reward.
3. The diameter of each abstract state is at most H worker , where we define the diameter of an abstract state s to be the maximum number of steps required to navigate to an immediate neighbor s .
Assumption 1 intuitively says that the worker can successfully abstract away stochasticity from the manager, which our experiments in Section 6.3 suggests is possible. Humans typically also make this assumption when they plan. For example, when humans plan (e.g., to get to Paris), they expect to deterministically hit subgoals (e.g., get to the airport, get on the plane, get to the hotel) even though the world is actually non-deterministic (e.g., the taxi may be late.) Assumption 2 tends to hold under many natural abstraction functions. For example, in the ALE games we evaluate on, the state abstraction function captures the agent's inventory and a history of the agent's inventory. Since all reward in these games is given when the agent picks up new items, or uses an item in its inventory, the agent's inventory and history encodes path independent reward. This also holds for many robotic arm manipulation tasks. For example, in a block stacking task with sparse rewards, a natural state abstraction might be the location of all the blocks. Then, the reward of a trajectory is encoded by the last abstract state of the trajectory: all trajectories that lead to a stacked configuration of blocks achieve the same reward for a success, while all non-stacking trajectories achieve the same failure reward.
Assumption 3 ensures that the worker has enough timesteps to navigate to any immediate neighbors. This is easily satisfied by setting H worker conservatively.
Main results. While the above assumptions enable us to prove near-optimality, our method performs well empirically even when these assumptions are violated. Given the above assumptions, our main theoretical result holds: Proposition 1. Under the assumptions, for a given input η and , π t is at most suboptimal, H worker timesteps, where x 0 is the starting concrete state and p and K are polynomial in |Φ| and |A|.
Lemma 2. If the known set is equal to the set of all abstract states (S = Φ) at timestep T , then for any policy π on the abstract MDP, π achieves the same expected reward on the abstract MDP as on the concrete MDP: i.e., V π T (φ(x 0 )) = V π (x 0 ), where x 0 is the initial concrete state.
In addition, the expected return of the optimal policy on the abstract MDP is equal to the expected return of the optimal policy on the concrete MDP: i.e., V * T (φ(x 0 )) = V * (x 0 ) where x 0 is the initial state. Given these lemmas, we are ready to prove Proposition 1: Proof of Proposition 1. For simplicity, we ignore terms due to appropriately setting N transition and 1 − η from Lemma 1, but these terms are all polynomial in the size of the abstract MDP.
By Lemma 3 the known set grows to cover all abstract states in T = O |Φ| 3 (|A| + log K|Φ|+log 1 η log 1 p ) + d max × H worker timesteps. For all timesteps t ≥ T , by Lemma 1, π t is at most suboptimal on the abstract MDP. On all those timesteps, the known set is equal to all abstract states, so by Lemma 2, π t is at most suboptimal on the concrete MDP.
Proof of Lemma 1. LetP (s |o, s) denote the estimated transition dynamics 4 andR(s, s ) denote the estimated reward model in the abstract MDP.
For each reliable transition (s, s ) (action in the abstract MDP), the manager estimatesP (s |o, s) from N transition samples of the worker. We bound the error in the model |P (s |o, s) − P (s |o, s)| with high probability by Hoeffding's inequality: P (|P (s |o, s)−P (s |o, s)| ≥ α) ≤ 2e −2Ntransitionα 2 (1) By the Assumption 2,R(s, s ) = R(s, s ) because all trajectories leading to s achieve some reward r and all trajectories leading to s achieve some reward r , so a single estimate R(s, s ) = r − r is sufficient to accurately determineR.
Because the model errors are bounded, and because the abstract MDP is Markov, we can apply the simulation lemma (Kearns & Singh, 2002), which states that if |P (s |o, s) − P (s |o, s)| ≤ α and |R(s, s ) − R(s, s )| ≤ α, then the policy π optimizing the MDP formed byP andR is at most suboptimal: i.e., at each timestep t, V π t (s) ≥ V * t (s) − for all s ∈ S, where α is O ( /|S|HV * (x 0 )) 2 , and H is the horizon of the abstract MDP. Since the total number of transitions is bounded by |S| 2 , substituting for N transition gives the desired result.
Proof of Lemma 2. Assume that the known set is equal to the set of all abstract states at timestep T and let π be a policy on the abstract MDP.
To prove the first part of Lemma 2, consider a trajectory s 0 , o 0 , r 0 , s 1 , o 1 , · · · , o T −1 , r T −1 , s T rolled out by π on the abstract MDP. Each abstract action o i is implemented as a subpolicy in the concrete MDP, so it expands to the trajectory solving the subtask of navigating from s i to s i+1 : x (i,0) , a (i,0) , r (i,0) , x (i,1) , · · · , o (i,Ti−1) , r (i,Ti−1) , x (i+1,0) , where φ(x (i,0) ) = s i , φ(x (i+1,0) ) = s i+1 , and r i = Ti−1 j=0 r (i,j) , by definition of the abstract MDP rewards. Consequently, for each trajectory, π achieves the same total reward in the concrete MDP as in the abstract MDP, implying V π T (φ(x 0 )) = V π (x 0 ). To prove the second part of Lemma 2, it suffices to show that the optimal policy on the concrete MDP achieves no more reward than V * T (φ(x 0 )), because the first part already shows that V * T (φ(x 0 )) ≤ V * (x 0 ). Let π * be the optimal policy on the concrete MDP and let τ = x 0 , x 1 , · · · , x T be the highest-reward trajectory generated π * achieving reward R. Because the known set contains all abstract states, in particular, it contains φ(x T ). By Assumption 1, and because φ(x T ) is in the known set, it is possible to deterministically navigate to φ(x T ). By Assumption 2, traversing to φ(x T ) in the abstract MDP achieves reward R. Hence, V * T (φ(x 0 )) is at least R, proving the desired result.
Proof of Lemma 3. For the known set to cover all abstract states, the manager must discover all neighboring transitions for each abstract state and the worker must learn all the discovered transitions. The number of samples to do this is equal to the sum of: 1. The number of samples used by the manager to discover all transitions.
2. The number of samples used by the worker to learn new transitions.
3. The number of samples used by the worker to navigate to the fringes of the known set, for the worker to learn new transitions and for the manager to discover new transitions.
Samples used by the manager to discover transitions. At each abstract state, let p be the probability that the manager fails to discover a particular abstract state on a single discovery episode. Let K be the maximum number of outgoing transitions from an abstract state (maximum degree). Both p and K are polynomial in |Φ| and |A| because the diameter of each abstract state is bounded by assumption. By setting the number of times the manager explores from each abstract state, N visit = log K|Φ|+log 1 η log 1 p , the manager finds all outgoing transitions of each abstract state with probability at least 1 − η by the following elementary argument. There are at most K|Φ| total transitions to discover, and the manager fails to discover each transition with probability p Nvisit . By the union bound, the probability the manager fails to discover at least one transition is at most K|Φ|p Nvisit . Consequently, the manager explores for Samples used by the worker to learn transitions. We assume that policy search with neural network function approximators can learn each transition at least as quickly as brute-force search over deterministic policies. By Assumption 3, the maximum number of timesteps required to traverse a transition (s, s ) is d(s, s ) times the diameter H worker , which is at most H = d max × H worker . Consequently, we bound the time required to learn each transition by |A| H , the total number of possible action trajectories for the worker.
Samples used to navigate to the fringes of the known set. The total number of samples used to navigate to the fringes of the known set is given by: where N (s) is the number of times the worker visits state s at the endpoint of a transition, counted when all abstract states are in the known set.