Curiosity-driven learning, where an agent is rewarded for its own prediction error instead of hand-designed environment rewards, is tested here at a large scale. Across 54 standard benchmarks, including the Atari suite, purely curiosity-driven agents perform surprisingly well and often align closely with the games' extrinsic rewards. The study also finds that random features are enough for many game benchmarks, but learned features generalize better. It notes that prediction-based rewards break down in stochastic environments.
## Curiosity as an Intrinsic Reward
- Reinforcement learning usually depends on extrinsic rewards that engineers must hand-design and densely annotate for each environment, which does not scale.
- Curiosity is an intrinsic reward that uses the agent's prediction error as its reward signal.
- The study examines purely curiosity-driven learning, with no extrinsic rewards at all.
## Scale and Results Across Benchmarks
- The authors ran the first large-scale study of this approach across 54 standard benchmark environments, including the Atari game suite.
- Performance was surprisingly good, and the intrinsic curiosity objective aligned well with the hand-designed extrinsic rewards in many games.
## Feature Spaces for Computing Prediction Error
- Random features are sufficient for many popular RL game benchmarks.
- Learned features generalize better, for example to novel levels in Super Mario Bros.
## Limitations in Stochastic Settings
- Prediction-based rewards have clear limitations when environments are stochastic, since unpredictable randomness can be mistaken for novelty worth exploring.
## Practical Takeaway
If hand-designing rewards is impractical, curiosity is a viable intrinsic signal for many games. Choosing the feature space matters, and learned features are the safer choice when generalization is needed. Developers should be cautious about using it in highly stochastic environments.
# Learning Montezuma's Revenge from a Single Demonstration
OpenAI trained an agent to score 74,500 on Montezuma's Revenge from a single human demonstration, a result better than any previously published. The method starts each reinforcement learning episode from a state in the demonstration and gradually moves the starting point back to the beginning of the game, optimizing the game score directly with PPO. This turns one hard exploration problem into a curriculum of short, easier subtasks.
## Why Exploration Is the Bottleneck
- Model-free methods like policy gradients and Q-learning explore by taking random actions, which only works when rewards are frequent enough.
- Games like Montezuma's Revenge require long, precise action sequences before any reward appears. If each of N actions has a fixed probability, the expected time to the first reward grows exponentially in N.
- Getting the first key, for example, requires a chain of steps (down ladders, down a rope, jump a skull, climb a ladder), so the overall probability is far smaller than any single step's.
## Curriculum Built from Demonstration States
- Each episode starts from a recorded demonstration state. Early in training, the agent starts near the end of the demonstration, where the remaining task is short.
- Once the agent matches or beats the demonstrator's score on the remaining segment in at least 20% of rollouts, the starting point moves earlier in time.
- This continues until the agent plays from the true start of the game without using the demonstration.
- Because each stage is only slightly harder than the last, the agent's chance of success stays high, and the required exploration scales linearly rather than exponentially with the length of the action sequence.
- The authors note that earlier work had proposed resetting to demonstration states, but the gradual backward curriculum was essential to getting a benefit from the demonstration.
## Comparison with Imitation Approaches
- Prior DeepMind work imitated demonstrations, either by reproducing states from a YouTube video or by combining Q-learning with a likelihood term on demonstrated actions.
- Those methods need less environment control, but this approach requires resetting the environment to arbitrary states and access to full game states from the demonstration.
- Optimizing the game score directly avoids overfitting to a possibly suboptimal demonstration and allows the agent to discover strategies the demonstrator did not use. The authors also suggest this could help in multiplayer settings where opponents differ from the demonstrator.
## Remaining Challenges
- **Generalization:** The agent rarely reproduces the exact demonstrated states because of frameskip differences and action randomness, so it must generalize to near-identical states. This works well for Montezuma's Revenge but much less well for Gravitar and Pitfall, which likely need better vision.
- **Exploration–exploitation balance:** The PPO entropy coefficient, learning rate, and reward scaling required careful tuning. Gravitar and Pitfall never found workable hyperparameters for the full curriculum, and some runs for Montezuma's Revenge failed to converge.
- **Robustness:** The trained policy does not yet generalize as well as a human. With sticky actions (repeat probability 0.25) it averages 10,000 points, and with random actions (probability 0.01) it averages 8,400. Humans also degrade under such perturbations, but less so. These perturbed scores still exceed previously published results.
- **Start-state variation:** Starting with 0 to 30 random no-ops did not significantly hurt performance, with most rollouts reaching the demonstration's final score.
## Takeaway
Decomposing a long-horizon sparse-reward problem into a curriculum of subtasks, seeded by demonstration states and optimized for the true reward, can solve tasks that pure random exploration cannot. The authors hope future RL algorithms will be more robust to noise and hyperparameter choices.
# Gym Retro: A Platform for Generalization Research Across Games
OpenAI is releasing the full version of Gym Retro, a reinforcement learning research platform that expands its public game library from roughly 100 titles to over 1,000 across several emulators. The release also includes the integration tool used to add new games. The authors argue that most RL research has focused on solving single tasks, and that a large, varied game collection makes it possible to study generalization between games that share concepts but differ in appearance. The post also shows that simple score-based rewards can lead agents to exploit games rather than complete them, and that current algorithms struggle with sparse rewards and long-horizon planning.
## Scope of the Release
- The library grows from about 70 Atari and 30 Sega games to more than 1,000 titles.
- Supported consoles include the Sega Genesis, Sega Master System, NES, SNES, and Game Boy, with preliminary support for the Game Gear, Game Boy Color, Game Boy Advance, and NEC TurboGrafx.
- Some integrations in the `data/experimental` folder are in beta, and the authors ask for bug reports.
- The new code lives on a branch and will not be merged until the ongoing Retro Contest ends, so contestants' code does not break.
## Motivation: From Single Tasks to Generalization
- The Retro Contest and its technical report focus on generalizing across levels of one game (Sonic the Hedgehog).
- The full dataset extends this to generalization across different games, which is a substantially harder problem.
- The authors hope solutions developed by Retro Contest participants can scale to the full dataset.
## Integration Tool
- Given a game's ROM, the tool creates save states, locates memory addresses, and defines scenarios that RL agents can solve.
- It records and plays back movie files that store only the starting state and button inputs, not every frame. This keeps files small.
- Movie files help visualize agent behavior and can store human demonstrations as training data.
- An integrator's guide accompanies the tool for developers adding new games.
## Reward Farming
- Agents often learn to maximize in-game score instead of completing the intended objective. In Cheese Cat-Astrophe and Blades of Vengeance, agents became trapped in loops that rapidly accumulated points.
- Simple reward functions, such as maximizing score, can produce unintended behavior, a phenomenon the authors have discussed before.
- Algorithms like PPO perform well on games with dense rewards, where points come frequently and difficulty lies mainly in reaction time. Gradius is an example, since points come from each enemy shot and dodging is handled frame by frame.
- Existing algorithms struggle with sparse rewards or tasks that require planning several seconds ahead. Many games in the dataset fall into this category, so tackling the full dataset will likely require new techniques.
The post proposes using an ensemble of Q-functions to improve exploration in deep reinforcement learning. The authors adapt well-established upper-confidence-bound (UCB) methods from the bandit setting to Q-learning and report significant gains on the Atari benchmark.
## Q-Ensembles for Exploration
- The approach uses an ensemble of Q*-functions, several value estimates rather than a single one, to guide how the agent explores.
- The ensemble's disagreement provides a signal about which states and actions are still uncertain.
## Adapting Bandit Algorithms to Q-Learning
- Methods designed for multi-armed bandits, where each action is a fixed arm with an unknown reward, are carried over to the sequential decision-making setting of Q-learning.
- The adaptation lets the proven bandit ideas inform exploration in environments where the agent's actions affect future states.
## UCB-Based Exploration Strategy
- The exploration policy selects actions by adding an upper-confidence bonus to value estimates, so that actions with high uncertainty get tried more often.
- Because the bonus comes from the ensemble, the agent explores where its own value estimates are least certain.
## Results on Atari
- Experiments on the Atari benchmark show significant performance gains over the baselines the authors compare against.
# OpenAI Baselines: DQN
OpenAI is open-sourcing Baselines, an internal library of reinforcement learning algorithms whose implementations are verified to match published results. The first release includes DQN and three of its variants, and the authors argue that known-good implementations make it harder for apparent RL advances to come from comparisons against buggy or undertuned baselines. The post pairs the release with practical advice on avoiding the bugs that commonly make RL results hard to reproduce.
## Why RL Results Are Hard to Reproduce
- Performance is very noisy, so results can look like progress when they are not.
- Algorithms have many interacting parts, and subtle bugs can hide inside them.
- Papers often omit tricks that are needed to reach the reported performance.
## Practical Debugging Practices
- **Compare against a random baseline.** An agent taking random actions can appear to learn early in training, as seen in the H.E.R.O. example, so an agent should always outperform a random one to show real learning.
- **Watch for silent bugs.** In a review of ten popular RL reimplementations, six had subtle bugs confirmed by their authors. These ranged from ignored gradients and incorrect causal convolutions to implementations reporting scores higher than the true results.
- **Inspect what the agent sees.** Converting frames to grayscale with miscalibrated green-channel coefficients erased the fish in Seaquest, which caused poor performance. Gym's new `play` function lets researchers view the same observations the agent receives.
- **Fix bugs before tuning hyperparameters.** Bugs can push researchers toward compensating hyperparameter choices. Epsilon annealing had a large effect on performance, with the final schedule decreasing it to 0.1 over the first million steps and then to 0.01 over the next 24 million.
- **Interpret papers carefully.** The DQN Nature paper's instruction to clip the error term to between -1 and 1 can mean clipping the objective, which zeroes gradients for high-error transitions, or clipping the gradient multiplier, which corresponds to Huber loss. The second interpretation is the correct one. Checking gradients with TensorFlow's `compute_gradients` can reveal such mistakes.
- **Review code repeatedly.** Most bugs were found by re-reading the code line by line and asking what could go wrong, and experienced researchers often underestimate how many passes this takes.
## The Released Algorithms
- **DQN:** Combines Q-learning with deep neural networks so RL can handle high-dimensional inputs such as video games and robotics.
- **Double Q-learning:** Reduces the tendency of DQN to overestimate action values.
- **Prioritized Replay:** Extends experience replay by sampling transitions where actual and expected rewards differ significantly.
- **Dueling DQN:** Splits the network into a value stream and an advantage stream, which are combined into a single action-value estimate.
## Getting Started
The release installs with `pip install baselines`. Users can train a CartPole model with `baselines.deepq.experiments.train_cartpole`, then visualize the learned policy with `enjoy_cartpole`. Pretrained Atari agents are also available, such as a dueling, prioritized-replay Breakout model that can be downloaded and run with the `atari.download_model` and `atari.enjoy` scripts.
## Benchmarks
An included notebook compares the Atari performance of the DQN variants, including Dueling Double Q-learning with Prioritized Replay, Double Q-learning with Prioritized Replay, Dueling Double Q-learning, and Double Q-learning.
## Conclusion
Reusable, verified implementations let researchers spend less time reimplementing existing algorithms and more time designing new ones. Anyone reproducing RL results should check against a random baseline, inspect the agent's observations, fix bugs before tuning, verify ambiguous paper details through gradient checks, and review the code thoroughly.
Q-learning and policy gradient methods, two leading approaches to model-free reinforcement learning, are shown to be closely related in the entropy-regularized setting. The post argues that "soft" (entropy-regularized) Q-learning is exactly equivalent to a policy gradient method, which may partly explain why Q-learning works well despite its inaccurate Q-value estimates. Experiments on Atari support the view that these entropy-regularized variants perform comparably to, or slightly better than, the standard versions.
## Equivalence Between Soft Q-learning and Policy Gradients
- The authors establish a precise equivalence between Q-learning and policy gradient updates under entropy regularization.
- This suggests Q-learning may be "secretly" implementing policy gradient updates, offering a partial explanation for its effectiveness.
- The post notes that Q-learning is often sample-efficient, but its estimated Q-values are typically very inaccurate, so the mechanism behind its success has been poorly understood.
## Connection to Natural Policy Gradients
- The authors also identify a link between Q-learning methods and natural policy gradient methods.
## Experimental Results on Atari
- Entropy-regularized versions of both Q-learning and policy gradients were evaluated on the Atari benchmark.
- They performed as well as, or slightly better than, their standard counterparts.
## Practical Validation Against A3C
- To show the equivalence holds in practice, the authors built a Q-learning method whose learning dynamics closely match those of A3C.
- Notably, this method works without a target network or an ϵ-greedy exploration schedule, two components common in standard Q-learning.
The results suggest that entropy regularization provides a principled bridge between value-based and policy-based reinforcement learning, and that some of Q-learning's practical behavior may be better understood through a policy gradient lens.
Evolution strategies (ES), a decades-old black-box optimization method, can match standard reinforcement learning (RL) methods on modern benchmarks like Atari and MuJoCo while avoiding many of RL's practical burdens. ES needs no backpropagation, is simpler to implement, scales far more easily across distributed machines, handles sparse rewards well, and has fewer hyperparameters. The authors show that ES can train a 3D humanoid walker in 10 minutes on 1,440 CPU cores, where A3C needed about 10 hours on 32 cores, and reach comparable Atari performance in one hour instead of one day.
## How Reinforcement Learning Works
- A policy, usually a neural network with on the order of a million parameters, maps the current state to probabilities over actions.
- Training collects episodes of interaction, then uses backpropagation to nudge the network toward actions that preceded good outcomes and away from those that preceded bad ones.
- Exploration comes from sampling actions from a stochastic policy, which injects noise into the agent's actions.
## Evolution Strategies as Black-Box Optimization
- Despite the name, ES has little to do with biological evolution. It is best understood as a family of black-box stochastic optimization methods.
- The environment, the agent, and the time structure of episodes are all abstracted away. The method sees only a million-dimensional parameter vector go in and a single total reward come out.
- Each step perturbs the current parameters with Gaussian noise to create a population (for example, 100 candidates), evaluates each candidate's total reward, and moves the parameters toward a reward-weighted average of the perturbations.
- Mathematically, this is a finite-difference estimate of the gradient of expected reward along random directions. It can also be viewed as REINFORCE with a Gaussian policy over whole parameter vectors.
- A short NumPy example minimizes a quadratic with this procedure, illustrating how little code is required.
- Because noise is injected into parameters rather than actions, ES can use deterministic policies and can optimize non-differentiable networks.
## Advantages of ES over RL
- **No backpropagation:** Only forward passes are needed, making the code shorter and about 2 to 3 times faster in practice. Episodes need not be stored, and exploding gradients in RNNs are not a concern.
- **Highly parallelizable:** Workers share random seeds and only exchange scalar rewards, rather than synchronizing parameter vectors with millions of entries. The authors observed linear speedups up to thousands of CPU cores.
- **Robustness:** RL can fail badly under different Atari frame-skip settings, whereas ES performs about equally well across them.
- **Structured exploration:** Policy-gradient methods often start with random jitter in place. ES, using deterministic policies, produces consistent behaviors.
- **Long time horizons:** Analysis of both gradient estimators suggests ES is especially attractive when episodes are long, actions have lasting effects, or good value estimates are unavailable.
## Challenges and Limitations
- ES requires that parameter noise produce different outcomes so that a gradient signal exists. Virtual batch norm helped, but better parameterizations are needed.
- In Montezuma's Revenge, a random network almost never retrieves the key on the first level, whereas random actions occasionally do.
- ES is about 1,000 times slower than backpropagation for supervised tasks such as MNIST, so its advantage is specific to RL settings, where gradients must be estimated by sampling.
## Benchmark Results
- On MuJoCo, ES reaches performance comparable to TRPO but is roughly a factor of 10 less data-efficient in the worst case.
- On wall-clock time, ES solved the 3D humanoid task in 10 minutes on 1,440 CPUs across 80 machines. A3C on 32 cores took about 10 hours, and the authors note that naive A3C scaling in cloud settings is limited by communication bandwidth.
- On Atari, ES on 720 cores in one hour matches A3C on 32 cores in one day across games such as Pong, Seaquest, and Beamrider. In Seaquest, the submarine learns to surface when oxygen runs low.
## Context and Conclusion
- The work follows a broader pattern of revisiting decades-old ideas, similar to how AlexNet and Deep Q-Learning revived CNNs and Q-learning.
- The authors' contributions are scaling ES to distributed settings, adapting it to deep networks (such as with virtual batch norm), and evaluating it on modern RL benchmarks. Their work builds on Natural Evolution Strategies (Wierstra et al., 2014).
- The authors conclude that neuroevolution can compete with RL on modern benchmarks while being simpler and easier to scale, and suggest future directions such as indirect encoding and evolving network structure.
Count-based exploration works well with tabular reinforcement learning on small discrete MDPs, but it has long been assumed to fail in high-dimensional state spaces, where most states occur only once. This work shows that a simple generalization of the classic approach, which maps states to hash codes and counts those codes, reaches near state-of-the-art performance on high-dimensional and continuous deep RL benchmarks. The method offers a simple baseline for tasks that require substantial exploration.
### Why Count-Based Exploration Was Limited
- Count-based methods come with theoretical guarantees and perform near-optimally in small tabular settings.
- Raw state counts are useless in high-dimensional or continuous spaces, because nearly every state is novel.
- Recent deep RL exploration methods handle this with complex heuristics, often based on optimism under uncertainty or intrinsic motivation.
### Hashing States to Make Counts Useful
- Each state is mapped to a hash code, and occurrences of each code are tracked in a hash table.
- The resulting counts feed a reward bonus derived from classic count-based exploration theory.
- Surprisingly simple hash functions perform well on many challenging tasks.
- A learned, domain-dependent hash code can improve results further.
### What Makes a Good Hash Function
- Granularity matters: the hash must group states at an appropriate level, so that counts are neither too sparse nor too coarse.
- The hash should encode information relevant to solving the MDP, not just superficial state features.
### Results
- The method achieves near state-of-the-art performance on both continuous control tasks and Atari 2600 games.
For practitioners facing hard exploration problems in deep RL, this suggests starting with a simple hashed count bonus as a baseline before adopting more complex heuristics. Its effectiveness depends heavily on choosing a hash that has the right granularity and captures task-relevant features.
# OpenAI Gym Beta: A Shared Toolkit for Reinforcement Learning Research
OpenAI has released the public beta of OpenAI Gym, an open toolkit for developing and comparing reinforcement learning (RL) algorithms. It pairs a growing suite of environments, ranging from simple control tasks to Atari games and simulated robots, with a site for comparing and reproducing results. The authors built it to speed up their own research and hope it becomes equally useful to the wider community.
## Why RL Needs Better Infrastructure
- RL covers any problem involving a sequence of decisions, such as robot locomotion, pricing and inventory management, video games, and board games. It has also been applied to supervised problems with sequential or structured outputs.
- Recent deep RL systems, including DeepMind's Atari work, BRETT, and AlphaGo, make few assumptions about their environments, so they transfer across settings. Earlier RL methods required heavy problem-specific engineering.
- Two obstacles slow progress:
- **Weak benchmarks:** Supervised learning advanced through large labeled datasets like ImageNet. RL lacks an equivalent, and existing open-source environment collections are narrow and often hard to set up.
- **Inconsistent environments:** Small differences in reward functions or action sets can change a task's difficulty dramatically, which makes published results hard to reproduce or compare.
## The Environment Suite
- **Classic control and toy text:** Small-scale tasks from the RL literature, intended as a starting point.
- **Algorithmic:** Tasks such as adding multi-digit numbers or reversing sequences, learned purely from examples. Difficulty scales with sequence length.
- **Atari:** Classic games through an easy-to-install integration of the Arcade Learning Environment.
- **Board games:** Go on 9x9 and 19x19 boards against a fixed Pachi opponent. Multi-player support is planned.
- **2D and 3D robots:** Simulated control tasks built on the MuJoCo physics engine, including environments from a UC Berkeley benchmark. MuJoCo is proprietary but offers free trial licenses.
Each environment carries a version number, such as Hopper-v0. Any change to an environment produces a new version, so results on a given version stay comparable over time.
## Evaluation Without Leaderboards
- Users can upload results, but OpenAI chose not to build traditional leaderboards, since raw scores can be gamed through overfitting or hand-crafted solutions.
- Instead, a curated list highlights contributions that show something interesting about algorithmic capability. The long-term goal is for this curation to be community-led.
- Partners supporting the launch include NVIDIA (technical Q&A), Nervana (a DQN agent implementation), and AWS (US$250 credit vouchers for promising, resource-constrained researchers).
## Getting Involved
- Work through the tutorial, or reproduce an existing result.
- During the beta, feedback is requested on making the tool better for research. Contributors can push the state of the art on each environment, reproduce published results, or build new environments. Community chat is open.