Skip to main content
QUICK REVIEW

[Paper Review] Craftax: A Lightning-Fast Benchmark for Open-Ended Reinforcement Learning

Michael R. Matthews, Michael Beukman|arXiv (Cornell University)|Feb 26, 2024
Reinforcement Learning in RoboticsComputer Science4 citations
TL;DR

Craftax introduces a lightning-fast, JAX-based benchmark for open-ended reinforcement learning, combining the complexity of NetHack and Crafter with 250x faster inference than the original Crafter. It enables efficient training of agents on complex, long-horizon tasks using only a single GPU, with PPO solving Craftax-Classic in under an hour and existing methods failing on the more challenging Craftax environment.

ABSTRACT

Benchmarks play a crucial role in the development and analysis of reinforcement learning (RL) algorithms. We identify that existing benchmarks used for research into open-ended learning fall into one of two categories. Either they are too slow for meaningful research to be performed without enormous computational resources, like Crafter, NetHack and Minecraft, or they are not complex enough to pose a significant challenge, like Minigrid and Procgen. To remedy this, we first present Craftax-Classic: a ground-up rewrite of Crafter in JAX that runs up to 250x faster than the Python-native original. A run of PPO using 1 billion environment interactions finishes in under an hour using only a single GPU and averages 90% of the optimal reward. To provide a more compelling challenge we present the main Craftax benchmark, a significant extension of the Crafter mechanics with elements inspired from NetHack. Solving Craftax requires deep exploration, long term planning and memory, as well as continual adaptation to novel situations as more of the world is discovered. We show that existing methods including global and episodic exploration, as well as unsupervised environment design fail to make material progress on the benchmark. We believe that Craftax can for the first time allow researchers to experiment in a complex, open-ended environment with limited computational resources.

Motivation & Objective

  • Address the lack of fast, complex benchmarks for open-ended reinforcement learning that are both computationally feasible and challenging.
  • Overcome the computational inaccessibility of existing open-ended environments like Crafter, NetHack, and Minecraft due to slow inference speeds.
  • Develop a high-speed, JAX-native environment that supports deep exploration, long-term planning, and continual adaptation with minimal hardware requirements.
  • Provide a benchmark that enables meaningful research on sample-efficient and generalizing RL agents without requiring large-scale compute clusters.
  • Demonstrate that current state-of-the-art methods in exploration and unsupervised environment design fail to make significant progress on the new benchmark, validating its challenge level.

Proposed method

  • Reimplement Crafter as Craftax-Classic in JAX to achieve up to 250x speedup over the original Python-based version.
  • Leverage JAX’s JIT compilation, GPU acceleration, and full-GPU training pipeline to eliminate CPU-GPU transfer bottlenecks and enable massive parallelization of environment rollouts.
  • Extend Craftax-Classic into Craftax by incorporating procedural generation, Roguelike mechanics (e.g., permadeath, turn-based, grid-based movement), and richer world dynamics inspired by NetHack.
  • Design a complex, open-ended environment that requires deep exploration, long-term memory, and continual adaptation to novel situations as the world is discovered.
  • Introduce a new evaluation protocol using 1 billion environment interactions per run, enabling meaningful assessment of sample efficiency and long-horizon learning.
  • Use a PPO agent with RNN-based memory and curriculum learning to evaluate performance on both Craftax-Classic and Craftax, with ablation studies on exploration and environment design methods.
Figure 1 : Pixel-based view from Craftax .
Figure 1 : Pixel-based view from Craftax .

Experimental results

Research questions

  • RQ1Can a JAX-based environment achieve orders-of-magnitude speedup over existing open-ended RL benchmarks without sacrificing complexity?
  • RQ2To what extent can standard exploration and unsupervised environment design methods (e.g., UED) solve the new Craftax benchmark?
  • RQ3Does the increased complexity of Craftax—beyond Crafter—pose a meaningful challenge to current SOTA RL algorithms?
  • RQ4Can a simple PPO agent achieve near-optimal performance on Craftax-Classic within a reasonable compute budget (e.g., 1 billion steps on a single GPU)?
  • RQ5How do different curriculum learning and environment design strategies (e.g., PLR, ACCEL, DR) affect learning efficiency and final performance on Craftax?

Key findings

  • Craftax-Classic runs 250x faster than the original Python-based Crafter, enabling a full PPO training run with 1 billion environment interactions to complete in under an hour on a single GPU.
  • A PPO agent with an RNN policy achieves 90% of the optimal return on Craftax-Classic within 51 minutes of training, demonstrating that the environment is tractable with standard algorithms.
  • Existing state-of-the-art methods for global and episodic exploration, as well as unsupervised environment design (UED), make little to no progress on the more complex Craftax benchmark.
  • The performance gap between Craftax-Classic and Craftax is substantial: while PPO solves the former quickly, it fails to make meaningful progress on the latter, indicating the latter's high challenge level.
  • The use of JAX enables efficient parallelization of up to 4096 environment workers, drastically reducing training time and making large-scale RL experiments feasible on consumer hardware.
  • Hyperparameter tuning and architectural modifications (e.g., decoupling rollout length from episode length in UED) were necessary to adapt existing methods to Craftax’s long-horizon dynamics.
Figure 2 : Speed comparison with popular benchmarks for open-ended learning. Craftax-Classic and Craftax are 257x and 169x faster than Crafter respectively. Details of the speed test are in Appendix B and best case results are in Table 1 .
Figure 2 : Speed comparison with popular benchmarks for open-ended learning. Craftax-Classic and Craftax are 257x and 169x faster than Crafter respectively. Details of the speed test are in Appendix B and best case results are in Table 1 .

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.