techlist.io

Exploration

6 posts

OpenAI2018-11-041 min readCurated summary

Plan online, learn offline: Efficient learning and exploration via model-based control

This paper, from November 2018, proposes plan online, learn offline (POLO), a framework for agents that have an internal model and must keep acting and learning in the world. The core idea is that local model-based trajectory optimization, global value function learning, and exploration support one another. Together they solve complex simulated control tasks, such as humanoid locomotion and dexterous in-hand manipulation, using only about a few minutes of equivalent real-world experience. ### Local Planning Stabilizes Value Learning - Local trajectory optimization can compensate for errors in the learned value function. - Planning in this way stabilizes value function learning and speeds it up. ### Value Functions Extend Planning Beyond Local Solutions - Approximate value functions shorten the horizon the planner must search. - This lets the agent find better policies than local planning alone would produce. ### Coordinated Exploration Under Uncertainty - Trajectory optimization drives temporally coordinated exploration. - The exploration is paired with estimates of uncertainty in the value function approximation. - The authors argue this exploration is essential for fast and stable value function learning.

OpenAI2018-10-304 min readCurated summary

Reinforcement learning with prediction-based rewards

# Random Network Distillation: Curiosity-Driven Exploration That Cracks Montezuma's Revenge OpenAI introduces Random Network Distillation (RND), a prediction-based curiosity method that encourages reinforcement learning agents to explore. RND is the first approach to exceed average human performance on Montezuma's Revenge, a game that had long resisted exploration-based methods. It works by rewarding agents for visiting states that are hard to predict, and it avoids the classic failure modes of earlier curiosity approaches. The method can be combined with any RL algorithm and scales efficiently. ## The Long-Standing Challenge of Montezuma's Revenge - DQN scored 0% of the average human score on Montezuma's Revenge, the only game in the original DQN work where it failed completely. - Simple exploration rarely yields rewards or reaches more than a few of the game's 24 rooms. - A 2016 count-based exploration bonus added to DQN reached 15 rooms and an average score of about 3.7K. - Later gains mostly relied on human demonstrations or access to the emulator's underlying state, rather than on exploration alone. ## Learning Without Extrinsic Rewards - The authors, with collaborators from UC Berkeley, studied agents trained with no environment-specific reward, using curiosity as the sole learning signal. - Earlier next-state prediction methods rewarded the prediction error of a learned model, which made agents attracted to unpredictable events. - Surprisingly, even predicting random features of the observation worked well. - Across more than 50 environments, curious agents showed a range of behaviors, and some achieved the game's objective without ever receiving the score as a reward: - **Breakout:** Intrinsic reward spiked on seeing new brick configurations and on first clearing a level. - **Pong:** An agent controlling both paddles kept long rallies going rather than trying to win. - **Bowling:** Agents outperformed those trained on the clipped extrinsic reward, likely because they were drawn to the hard-to-predict scoreboard flashes after strikes. - **Mario:** Agents discovered 11 levels, secret rooms, and bosses, since new areas are inherently unpredictable. ## The Noisy-TV Problem - Prediction-based curiosity can trap an agent in sources of randomness, such as a TV showing static, since such transitions always yield high reward. - The authors demonstrated this in a Unity maze with a TV playing random channels. - For largely deterministic games like Montezuma's Revenge, the problem was expected to matter less, but the team used sticky actions (repeating the previous action with some probability) to prevent memorization and make room transitions less predictable. ## How Random Network Distillation Works - The authors identified three sources of prediction error: (1) poor generalization from previously seen examples, which reflects novelty; (2) stochastic prediction targets; and (3) missing information or a predictor too limited for the target function. - Factor 1 is useful for measuring novelty, while Factors 2 and 3 cause the noisy-TV trap. - RND trains a predictor to match the output of a fixed, randomly initialized neural network on the next state. - Because the target is deterministic and the predictor shares the target's architecture, the predictor can fit it well in familiar states, so error stays low there and rises in novel states. - Intrinsic and extrinsic rewards are combined through a variant of PPO that uses two value heads, allowing different discount rates and mixing episodic and non-episodic returns. - The best agent often finds 22 of 24 rooms on the first level of Montezuma's Revenge and occasionally clears the level, with state-of-the-art results on Venture and Gravitar as well. ## Scale and Results on Montezuma's Revenge - A large run with 1024 rollout workers reached a mean return of 10K over 9 runs, with a best mean of 14.5K, and each run discovered 20 to 22 rooms. - A smaller, longer run produced one of 10 runs that scored 17.5K, passing the first level and finding all 24 rooms. - Implementation details mattered greatly: stabilizing features and normalizing intrinsic rewards separated an agent stuck in the first room from one that clears the first level, and fixing a bug where extrinsic returns were mistakenly treated as non-episodic produced noticeable gains. ## Future Directions The authors suggest analyzing and combining different exploration methods, training curious agents on many environments without reward to study transfer to tasks with rewards, and investigating global exploration with coordinated decisions over long horizons.

OpenAI2018-07-034 min readCurated summary

Learning Montezuma’s Revenge from a single demonstration

# 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.

OpenAI2018-03-021 min readCurated summary

Some considerations on learning to explore via meta-reinforcement learning

This post proposes two meta-reinforcement learning algorithms, E-MAML and E-RL², designed to improve exploration. The authors argue that standard meta-RL methods often fail when an agent must actively explore to find useful information, and they show that both algorithms perform better on tasks where exploration matters. ## Proposed Algorithms - **E-MAML** extends Model-Agnostic Meta-Learning (MAML) to encourage exploration. - **E-RL²** extends RL² (Fast Reinforcement Learning via Slow Reinforcement Learning) with the same goal. ## Evaluation Environments - **Krazy World**: a novel environment the authors created to test exploration. - **Maze environments**: a set of maze tasks where finding the goal requires exploring unfamiliar layouts. ## Results - Both E-MAML and E-RL² outperform their baselines on tasks where exploration is important.

OpenAI2017-07-263 min readCurated summary

Better exploration with parameter noise

# Better Exploration with Parameter Noise Adding adaptive noise to the parameters of reinforcement learning policies, rather than to their actions, often improves performance. The method is simple to implement, rarely hurts results, and lets agents learn tasks much faster. On the HalfCheetah environment, a policy trained with parameter noise reached a score of about 3,000 after 20 episodes, while one trained with traditional action noise reached about 1,500. ## How Parameter Noise Differs from Action Noise - Traditional reinforcement learning explores by adding noise to the action space, which changes the probabilities of actions from one moment to the next. - Parameter noise instead perturbs the weights of the neural network policy, so the agent's decisions still depend fully on what it currently senses. - The approach sits between evolution strategies, which perturb parameters but not actions during rollouts, and methods like TRPO, DQN, and DDPG, which perturb actions but leave parameters untouched. - The authors believe the advantage comes from consistency: deliberate parameter perturbations produce exploration that persists across timesteps, while action noise produces erratic exploration unrelated to the agent's parameters. - Earlier work applied parameter noise to policy gradients, but this research extends it to deep neural network policies and to both on-policy and off-policy algorithms. ## Solving the Three Main Challenges - **Varying layer sensitivity:** Different layers respond differently to perturbations. Layer normalization keeps each perturbed layer's output within a similar distribution, so the next layer receives stable inputs. - **Shifting sensitivity over training:** The weights' sensitivity changes as training progresses, making behavior hard to predict. An adaptive scheme resizes the perturbations by measuring their effect on actions and comparing the resulting action-space noise level to a target. - **Choosing the noise scale:** Parameter noise is hard to interpret intuitively. The adaptive scheme moves the scale decision into action space, which is easier to reason about. ## Baselines and Benchmarks - The release includes baseline code for DQN, Double DQN, Dueling DQN, Dueling Double DQN, and DDPG with parameter noise. - Benchmarks compare DDQN with and without parameter noise on a subset of Atari games. - Benchmarks also compare three DDPG variants on a range of continuous control tasks in the MuJoCo simulator. ## Development Lessons - In early experiments, perturbing the DQN Q-function sometimes was so extreme that the agent repeated the same action. The team added a separate explicit policy head, as in DDPG, to work around this. - Later experiments showed the policy head was unnecessary. Changing how the noise was rescaled had likely fixed the underlying problem, so the simpler version performed comparably. - The authors note that reinforcement learning algorithms can fail silently and subtly, which can lead engineers to build workarounds around bugs they never noticed. ## Practical Takeaway Parameter noise is worth trying on any reinforcement learning problem. It is simple to add, rarely reduces performance, and can speed up learning considerably, especially when paired with layer normalization and adaptive scaling.

OpenAI2016-11-142 min readCurated summary

#Exploration: A study of count-based exploration for deep reinforcement learning

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.