TL;DR
This paper introduces Kinetix, a novel, large-scale, and open-ended 2D physics-based reinforcement learning (RL) environment designed to train generalist agents. By procedurally generating millions of diverse tasks and leveraging a hardware-accelerated physics engine, they demonstrate that pre-training on this broad distribution enables agents to generalize to unseen tasks and significantly improves fine-tuning performance.
What Problem Does This Paper Address?
The quest for generalist AI agents, capable of performing competently across a wide range of tasks and domains, remains a significant challenge. While large models have achieved remarkable success in text and image processing, extending this generalization to agents that act in sequential decision-making problems is difficult. Existing RL environments are often narrow and homogeneous, limiting the generalization capabilities of trained agents. Furthermore, training agents from scratch on specific tasks can be sample-inefficient and may fail to discover optimal solutions for complex problems. This paper aims to bridge this gap by creating a more expressive and diverse training ground for RL agents.
Methods
The core of this work is the Kinetix framework, an open-ended space of 2D physics-based RL environments. Kinetix is built upon Jax2D, a novel, hardware-accelerated, deterministic, impulse-based 2D rigid-body physics engine implemented entirely in JAX. This engine allows for efficient simulation of a vast number of environment steps.
Key methodological contributions include:
- Unified Framework: Kinetix can represent a wide array of tasks, from robotic locomotion and grasping to classic RL environments and video games, all within a single framework.
- Procedural Generation: Millions of 2D physics-based tasks are procedurally generated, creating a virtually unlimited supply of diverse training scenarios.
- Heuristic Environment Generator: A generator is used to create maximally expressive levels while minimizing degenerate cases, employing rejection sampling to filter out trivial and unsolvable tasks.
- Transformer-based Architecture: A permutation-invariant transformer architecture is employed to process the entity-based observations, allowing it to handle varying numbers of entities.
- Domain Randomization (DR) and Curriculum Learning (SFL): The paper compares training with standard Domain Randomization (DR) against a curriculum learning approach called Successor Feature Learning (SFL), which prioritizes levels based on learnability.
Datasets
The paper introduces Kinetix, a new benchmark comprising:
- Procedurally Generated Levels: Tens of millions of randomly generated 2D physics-based tasks.
- Hand-Designed Levels: A suite of 74 interpretable hand-designed levels, categorized into Small (S), Medium (M), and Large (L) sizes, used for evaluation. These levels are inspired by existing benchmarks and include novel tasks designed to test specific agent capabilities.
Key Insights and Ideas
- The Power of Scale and Diversity: Training a generalist agent on a massive and diverse set of procedurally generated physics tasks leads to strong zero-shot generalization capabilities on unseen environments.
- SFL Outperforms DR: Prioritizing training levels based on learnability (SFL) significantly outperforms standard Domain Randomization (DR), suggesting that a more intelligent curriculum is crucial for effective pre-training.
- Pre-training as a Foundation: A general agent pre-trained on Kinetix serves as a powerful foundation for fine-tuning, drastically reducing sample requirements and enabling the learning of tasks that a "tabula rasa" agent would struggle with.
- Emergent Capabilities: The general agent exhibits surprising capabilities, such as solving deceptive tasks that require moving away from the goal to gain momentum, which standard RL agents often fail at.
- Hardware Acceleration is Key: The use of Jax2D, a hardware-accelerated physics engine, is critical for enabling the scale of simulations (billions of environment interactions) required for this type of training.
Key Results
- Zero-Shot Generalization: The trained general agent demonstrates significant zero-shot generalization capabilities across different environment sizes (S, M, L), solving a substantial portion of unseen hand-designed levels.
- Fine-tuning Benefits: Fine-tuning the general agent on specific tasks leads to dramatically improved sample efficiency and performance compared to training from scratch. For example, on some challenging MuJoCo tasks, the fine-tuned agent achieves high performance while a "tabula rasa" agent fails to make progress.
- Solving Deceptive Tasks: The general agent can solve deceptive tasks like "Car-Ramp" where a "tabula rasa" agent trained for 1 billion timesteps fails to reach the target even once.
- Speed Improvements: Jax2D offers significant speedups over Box2D, with the RL training pipeline running up to 30x faster.
Limitations and Future Work
- Performance Degradation with Size: Performance of the general agent decreases as environment complexity (size) increases, particularly on the largest "L" environments.
- DR on L: Domain Randomization on the "L" environments performed worse than a random policy, highlighting the challenges of training on highly complex, potentially unsolvable tasks without a curriculum.
- Forgetting/Plasticity Loss: Lifelong learning experiments suggest potential forgetting or plasticity loss when agents are trained sequentially on different distributions.
- Future Work: The authors suggest exploring other reward formulations, investigating network capacity and plasticity loss, developing more intelligent environment generation methods, and leveraging these findings for sample-constrained tasks and real-world applications. They also highlight the potential for further speedups with multi-GPU training.
Summary updated