VMAS: A Vectorized Multi-Agent Simulator for Collective Robot Learning

Matteo Bettini, Ryan Kortvelesy, Jan Blumenkamp, Amanda Prorok · DOI

Abstract

Multi-Agent Reinforcement Learning (MARL) is essential for developing coordinated robotic systems, yet it is frequently bottlenecked by the computational inefficiency of traditional simulators. We present the Vectorized Multi-Agent Simulator (VMAS), an open-source 2D physics engine implemented in PyTorch. By leveraging GPU vectorization, VMAS enables the simultaneous execution of tens of thousands of environments, achieving performance benchmarks over 100x faster than established standards such as OpenAI’s Multi-Agent Particle Environment (MPE). This paper details the architecture of VMAS, its suite of coordination-focused scenarios, and its impact on reducing the wall-clock time required for complex MARL training.

1. Introduction

The development of collective intelligence in robotics—ranging from swarm coordination to warehouse automation—relies heavily on Multi-Agent Reinforcement Learning (MARL). However, the field faces a significant "speed wall." High-fidelity simulators like Gazebo offer realism at the cost of extreme computational overhead, while simpler abstractions like OpenAI’s MPE often lack the hardware acceleration necessary for modern deep learning workflows. VMAS addresses this gap by providing a unified, high-performance platform designed specifically for high-level coordination tasks while stripping away the computational overhead of low-level motor control.

2. The Vectorization Paradigm

The core innovation of VMAS is its commitment to the Single Instruction Multiple Data (SIMD) paradigm. Unlike traditional simulators that step through environments sequentially on a CPU, VMAS is written entirely in PyTorch. This allows the simulator to treat thousands of independent environments as a single batched tensor, executing physics calculations across all environments simultaneously on the GPU.

2.1 Physics Engine and Motion Models

VMAS utilizes a custom 2D force-based physics engine employing a semi-implicit Euler method. It supports:

  • Elastic collisions and torque.
  • Customizable gravity and friction.
  • Holonomic motion models, which allow agents to move in any direction instantly.

By focusing on holonomic motion, VMAS prioritizes the study of high-level strategic coordination over low-level motor control, though the engine remains flexible enough to incorporate more complex constraints.

2.2 Eliminating the Data Transfer Bottleneck

In standard RL setups, the CPU-to-GPU data transfer (sending environment states to the neural network) creates a significant latency bottleneck. Because VMAS runs the physics engine directly on the GPU in PyTorch, the data remains in-place. This "on-device" simulation loop drastically reduces overhead and maximizes the utilization of modern hardware.

3. Scenarios and Benchmarking

To facilitate diverse research, VMAS introduces 12 new multi-robot scenarios categorized by the coordination challenges they present:

  • Physical Coordination: Transport (collaborative pushing) and Balance (dynamic equilibrium).
  • Agent Heterogeneity: Give Way (navigation in constrained spaces) and Dispersion (resource allocation).
  • Adversarial Dynamics: Football (team-based competition) and Discovery (area coverage).

Furthermore, VMAS includes vectorized versions of all 9 classic OpenAI MPE scenarios, providing a direct baseline for performance comparison.

4. Performance Results

Empirical evaluations demonstrate that VMAS offers transformative speedups for MARL research. On a single NVIDIA RTX 2080 Ti, VMAS can execute 30,000 parallel simulations in under 10 seconds.

4.1 Comparative Speed

When compared to the original OpenAI MPE, VMAS is approximately 5x faster on a CPU. However, when leveraging GPU acceleration, the performance gap widens to over 100x.

4.2 Training Efficiency

In practical training applications, the authors observed that 60,000 environment interactions, including neural network updates, could be completed in an average of 25 seconds. Benchmark runs that previously required days of computation were completed in under three hours.

4.3 Algorithmic Insights

The benchmarks also highlighted the necessity of specialized algorithms for specific tasks. For instance, in the "Give Way" scenario, standard algorithms that utilize parameter sharing (like MAPPO) often failed to develop the necessary heterogeneous roles. In contrast, versions allowing for unique policies (such as HetIPPO) achieved success, underscoring the value of VMAS as a diagnostic tool for MARL algorithm development.

5. Conclusion and Future Work

VMAS provides a scalable solution for the "speed wall" in multi-agent research. While currently limited to 2D environments and holonomic motion, it offers a robust framework for studying complex coordination. Future developments will focus on expanding the scenario library, modularizing the physics engine for varying levels of fidelity, and further bridging the gap between simulation and real-world robotic deployment.

Summary updated

BibTeX
@inproceedings{bettini2022vmas,
  author = {Matteo Bettini and Ryan Kortvelesy and Jan Blumenkamp and Amanda Prorok},
  title = {{VMAS: A Vectorized Multi-Agent Simulator for Collective Robot Learning}},
  booktitle = {DARS},
  year = {2022},
  url = {https://openreview.net/forum?id=qf8u9pVWW5},
}
Figure