Skip to main content
QUICK REVIEW

[Paper Review] Jumanji: a Diverse Suite of Scalable Reinforcement Learning Environments in JAX

Clément Bonnet, Xiapu Luo|arXiv (Cornell University)|Jun 16, 2023
Evolutionary Algorithms and ApplicationsComputer Science3 citations
TL;DR

Jumanji is an open-source suite of fast, flexible, and scalable reinforcement learning environments built in JAX, designed to accelerate research on real-world combinatorial optimization problems. It enables high-throughput training via GPU/TPU acceleration, supports customizable initial state distributions, and demonstrates scalability and generalization through actor-critic baselines across 18 diverse environments.

ABSTRACT

Open-source reinforcement learning (RL) environments have played a crucial role in driving progress in the development of AI algorithms. In modern RL research, there is a need for simulated environments that are performant, scalable, and modular to enable their utilization in a wider range of potential real-world applications. Therefore, we present Jumanji, a suite of diverse RL environments specifically designed to be fast, flexible, and scalable. Jumanji provides a suite of environments focusing on combinatorial problems frequently encountered in industry, as well as challenging general decision-making tasks. By leveraging the efficiency of JAX and hardware accelerators like GPUs and TPUs, Jumanji enables rapid iteration of research ideas and large-scale experimentation, ultimately empowering more capable agents. Unlike existing RL environment suites, Jumanji is highly customizable, allowing users to tailor the initial state distribution and problem complexity to their needs. Furthermore, we provide actor-critic baselines for each environment, accompanied by preliminary findings on scaling and generalization scenarios. Jumanji aims to set a new standard for speed, adaptability, and scalability of RL environments.

Motivation & Objective

  • Address the lack of fast, flexible, and scalable RL benchmarks aligned with real-world industrial problems.
  • Overcome limitations of existing libraries like OpenAI Gym and ALE in computational efficiency and real-world applicability.
  • Enable large-scale, hardware-accelerated RL experimentation for NP-hard combinatorial problems common in logistics, scheduling, and planning.
  • Provide a modular, composable framework that supports customization of initial state distributions and problem complexity.
  • Establish a foundation for future research on generalization and scaling in RL through standardized baselines and evaluation protocols.

Proposed method

  • Implement 18 diverse RL environments in JAX, categorized into routing, packing, and logic problems, all based on NP-hard combinatorial optimization problems.
  • Leverage JAX’s automatic differentiation and XLA compilation to achieve hardware acceleration on GPUs and TPUs, enabling high-throughput environment rollouts.
  • Design modular environment components with customizable reset functions to support arbitrary initial state distributions and distribution shift studies.
  • Use JAX’s vmap and jit transformations to parallelize policy inference and environment dynamics, improving training throughput.
  • Introduce the VmapAutoResetWrapper to efficiently handle auto-reset during batch training, avoiding redundant resets and improving performance on expensive reset functions.
  • Develop and release actor-critic baseline agents for all environments to serve as standardized benchmarks for future comparison.

Experimental results

Research questions

  • RQ1Can a JAX-based RL environment suite achieve high throughput and scalability on GPU/TPU hardware while maintaining flexibility for real-world problem modeling?
  • RQ2How does the performance of Jumanji scale across single-device and multi-device setups in terms of environment step throughput?
  • RQ3To what extent can environment customization—particularly in initial state distribution—improve agent generalization in real-world-like scenarios?
  • RQ4How do actor-critic agents trained on Jumanji environments perform across diverse problem types, and do they demonstrate transferable learning potential?
  • RQ5What are the performance bottlenecks in parallelizing discrete-action environments with conditional dynamics, and how can they be mitigated?

Key findings

  • Jumanji environments achieve high throughput on GPU and TPU hardware, with performance scaling effectively across single- and multi-device setups.
  • The use of JAX’s JIT and vmap transformations enables efficient batching and hardware acceleration, significantly reducing training iteration times.
  • Customizing initial state distributions allows for meaningful study of generalization, particularly under distribution shift, demonstrating the framework’s adaptability.
  • Actor-critic baselines were successfully trained across all 18 environments, establishing a consistent benchmark for future research.
  • The VmapAutoResetWrapper reduces unnecessary computation by avoiding resets on non-terminal environments, improving efficiency—especially critical for expensive reset functions like in Rubik’s Cube.
  • Despite challenges in parallelizing conditional discrete actions (e.g., via jax.lax.cond), the framework maintains high performance by offloading data transfer to accelerators and optimizing policy inference.

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.