Cooperative-Competitive Team Play of Real-World Craft Robots

Rui Zhao, Xihui Li, Yizheng Zhang, Yuzhen Liu, Zhong Zhang, Yufeng Zhang, Cheng Zhou, Zhengyou Zhang, Lei HanarXiv 2026

TL;DR

This paper introduces a novel framework for training multi-robot teams in cooperative and competitive environments, successfully bridging the gap between synchronous simulations and asynchronous real-world execution. By combining rule-based action masking with a new technique called Out of Distribution State Initialization (OODSI), the authors achieved a 20% improvement in sim-to-real transfer success rates, enabling physical robots to execute complex strategies like blocking opponents and stealing resources.

What Problem Does This Paper Address?

Multi-agent reinforcement learning (MARL) has achieved superhuman performance in virtual games like Dota 2 and StarCraft. However, deploying these learned policies onto physical robot teams remains a massive challenge.

The primary culprit is a unique multi-agent sim-to-real gap. In standard training simulations, time steps are perfectly synchronized: all agents choose their actions simultaneously, and the environment updates instantly. In the real world, physical actions take variable amounts of time (e.g., a robot turning takes longer than a robot driving straight). This creates asynchronous execution delays, leading to unexpected physical states that the simulation never prepared the robots to handle. While standard domain randomization (DR) can help single-robot systems, it struggles to scale with the combinatorial complexity of multi-robot interactions and often results in overly conservative, ineffective policies.

Methods

The authors developed the Robot Craft Arena, a physical and virtual platform featuring mobile manipulation robots tasked with moving blocks and slopes to build structures. To train these agents efficiently and transfer them to the real world, they introduced two key innovations:

  1. Guided RL via Action Masking: Real-world physical constraints (like needing to back into a slope precisely to avoid losing track of visual localization tags) make exploration difficult for random RL policies. The authors implemented rule-based local sub-routines that mask out unhelpful or dangerous actions. This narrows the exploration space, allowing the RL agents to focus purely on learning high-level team strategies.
  2. Out of Distribution State Initialization (OODSI): Instead of trying to build a perfectly accurate (but computationally slow) simulation, the authors used a dual-simulator pipeline. They first trained policies in a fast, discrete, synchronous simulator (pyBullet). They then deployed these policies in a high-fidelity, asynchronous simulator (Gazebo) where real-world action delays naturally occur. The mismatched states caused by these delays—termed Out of Distribution (OOD) states—were collected and injected back into the pyBullet simulator as new starting states ($\rho_0$). This forced the agents to learn how to recover from synchronization errors during retraining.
Out of Distribution State Initialization Pipeline

The framework utilizes Centralized Training and Decentralized Execution (CTDE) via Proximal Policy Optimization (PPO), scaled across a distributed Kubernetes framework (TLeague). Competitive teams were evolved stably using a self-play curriculum where training was dynamically paused for the leading team to allow the weaker team to counter.

Datasets

The paper does not rely on standard static datasets. Instead, the authors evaluated their methods on two custom-designed multi-agent tasks within their platform:

  • Build Character (Cooperative): A task where multiple robots must cooperate to arrange blocks and slopes to spell out the letters "TPX".
  • Two-team Competition (Competitive): A zero-sum game where two teams race to build a two-floor structure. Resources are intentionally limited (e.g., a critical block is missing), forcing aggressive competitive interactions.

Key Insights and Ideas

  • The Asynchrony Gap: The core insight is that the multi-agent sim-to-real gap isn't just about friction or sensor noise; it is fundamentally about time and synchronization. Action delays alter the environment's transition dynamics entirely.
  • Surgical Simulation Updates: Rather than making the training simulation slow and complex to capture every real-world nuance, OODSI acts as a surgical intervention. It only exposes the fast simulator to the specific "messy" states generated by real-world physics.
  • Emergent Strategic Behaviors: Through self-play, the robots didn't just learn to build; they evolved sophisticated adversarial tactics. The authors observed emergent "blocking behavior" (where a robot invades enemy territory to physically obstruct their progress) and "stealing behavior" (pilfering blocks from the opponent's half-built structure to complete their own).
Blocking behavior in the pyBullet environment

Key Results

  • Training Acceleration: Action masking proved essential for feasibility. Without it, the normalized reward for both tasks flatlined near zero even after 3 million update steps. With action masking, policies converged rapidly.
Training curves for the cooperative task Training curves for the competitive task
Training curves for the cooperative task
Training curves for the competitive task
  • Sim-to-Real Performance Boost: When evaluated in the realistic Gazebo environment, standard PPO suffered heavily from the asynchrony gap, achieving only a 46.67% success rate in the cooperative task. Combining Domain Randomization with OODSI (PPO+DR+OODSI) raised the success rate to 76.67% (a 30% absolute improvement over the baseline).
  • Competitive Robustness: In the two-team competition task, the PPO+DR+OODSI combination pushed the evaluation success rate from 43.33% (baseline) up to 66.67%.
Sim2Real Performance Comparison

Limitations and Future Work

While OODSI significantly mitigates the multi-agent sim-to-real gap, it still relies on having an intermediate, high-fidelity simulator (like Gazebo) or real-world rollouts to collect the initial OOD states, which can be logistically or computationally expensive. Additionally, the action masking technique relies on hand-crafted, rule-based sub-routines. This restricts the end-to-end nature of the system, preventing the pure emergence of low-level motor skills. The authors suggest that future work should focus on automating the discovery of these action masks and optimizing the OOD state sampling process.

Summary updated

BibTeX
@misc{zhao2026cooperative,
  author = {Rui Zhao and Xihui Li and Yizheng Zhang and Yuzhen Liu and Zhong Zhang and Yufeng Zhang and Cheng Zhou and Zhengyou Zhang and Lei Han},
  title = {{Cooperative-Competitive Team Play of Real-World Craft Robots}},
  year = {2026},
  eprint = {2602.21119},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.21119},
}
Figure