Adaptive Procedural Task Generation for Hard-Exploration Problems

Kuan Fang, Yuke Zhu, Silvio Savarese, Li Fei-Fei

Training reinforcement learning (RL) agents in environments where the "right" path is incredibly difficult to find remains a significant challenge. Published at ICLR 2021, this paper presents a novel framework called Adaptive Procedural Task Generation (APT-Gen). APT-Gen automatically creates a custom curriculum of increasingly difficult tasks to help RL agents solve "hard-exploration" problems. By using an adversarial discriminator to measure how much a generated task "looks" like the final goal based on the agent's behavior, it bridges the gap between easy starting points and complex, sparse-reward target tasks.

The Challenge of Sparse Rewards

Reinforcement learning often fails when rewards are "sparse" or "deceptive." Imagine a robot that only gets a point for successfully assembling a furniture kit but gets zero feedback for every step leading up to it. Without intermediate rewards, the agent wanders aimlessly, never stumbling upon the final solution.

While "curriculum learning"—starting with easy tasks and ramping up difficulty—is a known solution, it usually requires humans to manually design the easier tasks. Existing automated methods often struggle with high-dimensional task spaces where the environment isn't just a coordinate on a map, but a complex arrangement of walls, keys, doors, and obstacles. Furthermore, we often don't know the exact "parameters" of the final target task, making it hard to calculate how "close" a training task is to the goal.

Introducing APT-Gen

The authors introduce APT-Gen, which consists of three main components working in an adversarial loop:

  1. The Task Generator ($G$): This module learns to output parameters (like object positions or room layouts) for a black-box Procedural Content Generation (PCG) module.
  2. The RL Agent (Policy $\pi$): The student learning to solve the tasks.
  3. The Task Discriminator ($D$): This is the core innovation. Instead of comparing the settings of two tasks, the discriminator looks at the agent’s trajectories (its movements and actions). It tries to distinguish whether a rollout came from a generated task or the actual target task.
The APT-Gen architecture featuring a task generator, RL policy, and task discriminator.

The Training Loop: The system optimizes a dual objective. It wants the generator to create tasks that are:

  • Feasible: The agent must be able to achieve a minimum level of success (return $\delta$).
  • Progressive: The tasks should be as similar to the target task as possible, as measured by the discriminator's inability to tell them apart.

By balancing these two using a Lagrangian multiplier ($\beta$), the system ensures the curriculum isn't so hard that the agent gives up, but isn't so easy that the agent stops learning.

Evaluation Domains

The researchers evaluated APT-Gen on two highly configurable domains:

  • Grid-World: A navigation task involving rooms, keys, doors, and "lava" (penalties). It features 74 independent variables for task generation.
  • Robotic Manipulation: A Sawyer robot arm pushing objects on a table filled with obstacles and pitfalls. This uses 31 independent variables.
Examples of the Grid-World and Robotic Manipulation environments across different difficulty levels.

They also tested an "out-of-space" evaluation where the target task was physically different from anything the procedural generator was capable of creating, testing the system's ability to generalize.

Key Insights and Results

  • Behavior as a Metric: The most powerful idea here is using the agent's behavior to measure task similarity. If an agent acts the same way in Task A as it does in the Target Task, then Task A is a good proxy for training, even if the underlying code for the two environments is totally different.
  • Black-Box Compatibility: Because the system only cares about the output of the procedural generation and the behavior of the agent, the PCG module can be a "black box." You don't need to be able to differentiate through the environment's physics engine.
  • Superior Performance: In both Grid-World and Robotic Manipulation, APT-Gen significantly outperformed standard exploration baselines like ICM (Intrinsic Curiosity Module) and RND (Random Network Distillation), which often got stuck in "lava" or failed to find keys.
  • Curriculum Efficiency: It outperformed other automated curriculum methods like GoalGAN and ALP-GMM. These baselines struggled because they couldn't handle the high-dimensional complexity of changing layouts and object types simultaneously.

Visualizations of the training process show the generator "learning" to build a curriculum. It starts with a goal right next to the agent, gradually adds walls, moves the goal behind a door, and finally hides the key in a distant corner.

Limitations and Future Work

While highly effective, the authors noted that using raw convolutional layers to generate grid layouts is difficult; incorporating geometric priors could speed up the generator's learning process. Currently, the system optimizes for one specific target task, but a promising future direction is extending this to "meta-learning," where the generator creates a curriculum to make the agent a generalist across many different types of problems. Finally, future work could explore co-evolving the robot's physical structure alongside the tasks it must solve.

Summary updated

BibTeX
@inproceedings{fang2021adaptive,
  author = {Kuan Fang and Yuke Zhu and Silvio Savarese and Li Fei-Fei},
  title = {{Adaptive Procedural Task Generation for Hard-Exploration Problems}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=S2EnlNEOmPw},
}
Figure