techlist.io

Intrinsic Motivation

2 posts

OpenAI2019-09-164 min readCurated summary

Emergent tool use from multi-agent interaction

# Emergent Tool Use from Multi-Agent Hide-and-Seek OpenAI trained agents to play a team-based hide-and-seek game in a simulated physics environment, and they developed six distinct strategies and counterstrategies, including tool use that the designers had not anticipated. The agents received no incentive to interact with objects; the complex behavior arose from the competitive dynamics of the game alone. The authors argue that multi-agent competition is a more scalable route than intrinsic motivation to producing human-relevant skills without supervision, and that evaluating such agents requires new transfer-based tests. ## The Environment and Reward Structure - Hiders (blue) must avoid line-of-sight with seekers (red), while seekers must keep hiders in view. - Agents can grab and lock movable objects, and the map includes randomly generated immovable rooms and walls. - Hiders get a preparation phase in which seekers are immobilized, giving them time to run or rearrange the space. - The only supervision is a team-based reward: hiders receive +1 when all are hidden and -1 if any is seen, and seekers receive the opposite. - Agents are penalized for leaving the play area, and all agents receive zero reward during preparation. ## Autocurricula and Emergent Strategies - As agents train against each other, up to six strategies emerge, with each new one creating pressure for the next stage. - No direct incentive exists for object interaction or exploration. The behaviors result from an autocurriculum induced by multi-agent competition. ## Training Setup - The team reused the infrastructure and algorithms from OpenAI Five and Dactyl, with each agent acting independently on its own observations and hidden memory state. - The world is represented as entity-centric state, permutation invariant over objects and agents. - Each object is embedded and processed by a masked residual self-attention block, similar to transformers but attending over objects rather than time. Objects outside line-of-sight and in front of the agent are masked out. - Training uses self-play and Proximal Policy Optimization. The value function can use privileged information about obscured objects and agents. - Large-scale training was critical. Larger batch sizes drastically reduced wall-clock time to reach stage 4 (ramp defense) without greatly affecting sample efficiency at or above 32k. Batch sizes of 8k and 16k never reached stage 4 within the episode budget. ## Competition Versus Intrinsic Motivation - The team compared against count-based exploration, which rewards agents for visiting rarely seen states. - Count-based agents with a simple 2-D box-position state moved objects in seemingly undirected ways. With the full state, they had fewer meaningful object interactions as complexity grew. - Hide-and-seek agents produced more interpretable behavior, such as shelter construction. The authors expect competition to scale better as environments grow. ## Evaluating Agents Through Transfer - Reward alone is ambiguous in multi-agent settings, and ELO or TrueSkill cannot show whether gains come from new adaptations or from improving existing skills. Environment-specific statistics like object movement are also hard to interpret and costly to design as environments scale. - The authors propose a suite of domain-specific intelligence tests that measure transfer performance as a proxy for representation quality and skill. They compare against count-based pretraining and training from scratch. - The hide-and-seek agents transferred somewhat better on many tasks but did not show a dramatic improvement in performance or convergence time. The authors attribute this to entangled skill representations that are hard to fine-tune, and they open-sourced the evaluation tasks. ## Lessons From Surprising Behavior Building environments is difficult, and agents often exploit unintended quirks in the environment or physics engine. The authors suggest that agents can learn sophisticated tool use in a high-fidelity simulator, but that careful environment design remains essential.

OpenAI2017-04-092 min readCurated summary

Stochastic Neural Networks for hierarchical reinforcement learning

This work proposes a two-stage framework for hierarchical reinforcement learning that tackles sparse rewards and long horizons. An agent first learns a library of reusable skills in a pre-training environment, guided by a single proxy reward that requires little domain knowledge about the downstream tasks. A high-level policy then operates over these skills, which improves exploration and lets the agent learn faster in downstream tasks with sparse rewards. ## Motivation - Deep reinforcement learning performs well on many tasks, but sparse-reward and long-horizon tasks remain difficult. - The approach aims to reuse skills learned in advance rather than learning each downstream task from scratch. ## Skill Pre-training with a Proxy Reward - Skills are learned in a pre-training environment using one proxy reward, which combines ideas from intrinsic motivation and hierarchical methods. - The proxy reward needs very little knowledge of the downstream tasks, so the skills are not tailored to any particular one. - Stochastic Neural Networks are used to represent a broad span of skills efficiently. - An information-theoretic regularizer encourages the learned skills to be diverse and distinguishable. ## High-level Policy for Downstream Tasks - A high-level policy is trained on top of the pre-trained skills and chooses which skill to use. - Working at the level of skills improves exploration, which helps where rewards are sparse. ## Experimental Results - The learned skills are interpretable and were acquired sample-efficiently. - Learning performance improved consistently across a wide range of downstream tasks.