Skip to main content
QUICK REVIEW

[Paper Review] Sample Factory: Egocentric 3D Control from Pixels at 100000 FPS with Asynchronous Reinforcement Learning

Aleksei Petrenko, Zhehui Huang|arXiv (Cornell University)|Jun 21, 2020
Reinforcement Learning in RoboticsComputer Science16 citations
TL;DR

Sample Factory introduces a high-throughput, single-machine reinforcement learning system that achieves over 100,000 environment frames per second using asynchronous, GPU-accelerated sampling and off-policy correction. It enables efficient training of highly skilled agents in 3D environments—demonstrated by training robust policies in a multiplayer Doom environment via self-play and population-based training—without relying on distributed clusters.

ABSTRACT

Increasing the scale of reinforcement learning experiments has allowed researchers to achieve unprecedented results in both training sophisticated agents for video games, and in sim-to-real transfer for robotics. Typically such experiments rely on large distributed systems and require expensive hardware setups, limiting wider access to this exciting area of research. In this work we aim to solve this problem by optimizing the efficiency and resource utilization of reinforcement learning algorithms instead of relying on distributed computation. We present the "Sample Factory", a high-throughput training system optimized for a single-machine setting. Our architecture combines a highly efficient, asynchronous, GPU-based sampler with off-policy correction techniques, allowing us to achieve throughput higher than $10^5$ environment frames/second on non-trivial control problems in 3D without sacrificing sample efficiency. We extend Sample Factory to support self-play and population-based training and apply these techniques to train highly capable agents for a multiplayer first-person shooter game. The source code is available at https://github.com/alex-petrenko/sample-factory

Motivation & Objective

  • To reduce reliance on large-scale distributed systems for deep reinforcement learning by optimizing single-machine throughput.
  • To achieve high sample efficiency and training throughput on commodity hardware for complex 3D control tasks.
  • To enable scalable population-based and self-play training for multi-agent environments using a single-node setup.
  • To demonstrate that extreme throughput on a single machine can match or exceed results from large distributed systems.

Proposed method

  • The system uses an asynchronous, GPU-based sampler that generates actions and collects environment transitions in parallel across multiple environment instances.
  • It employs off-policy correction techniques to maintain sample efficiency despite asynchronous data collection.
  • The architecture is built around Asynchronous Proximal Policy Optimization (APPO), enabling efficient gradient updates using mini-batches of experience.
  • A centralized learner component aggregates gradients from multiple actors and updates the policy model asynchronously.
  • The system supports self-play and population-based training by dynamically mutating hyperparameters and reinitializing underperforming agents based on win rate.
  • It leverages batched inference on a single GPU to maximize throughput, achieving up to 130,000 FPS on a 36-core, 4-GPU server.

Experimental results

Research questions

  • RQ1Can a single-machine reinforcement learning system achieve throughput exceeding 100,000 environment frames per second in 3D control tasks?
  • RQ2Can off-policy correction techniques maintain sample efficiency when combined with high-throughput asynchronous sampling?
  • RQ3Can self-play and population-based training be effectively scaled on a single machine without distributed infrastructure?
  • RQ4Does high-throughput single-machine training produce policies that generalize better than those trained against scripted opponents?
  • RQ5Can such a system train agents capable of competing at a high level in complex, strategic 3D multiplayer games like Doom?

Key findings

  • Sample Factory achieved a peak throughput of 130,000 environment frames per second on a single 36-core, 4-GPU server, exceeding 100,000 FPS in all evaluated 3D environments.
  • Agents trained against scripted bots won 100% of matches, but overfit to the opponent type, demonstrating a lack of robustness.
  • In self-play training, the population-based approach produced a diverse set of strategies, with the final agent winning 78 out of 100 matches against the scripted-bots-trained agent.
  • The self-play agent achieved 78 wins, 19 ties, and 3 losses against the scripted-bots-trained agent, indicating superior generalization and robustness.
  • The system enabled training of eight agents in a 1v1 Doom environment for 2.5 billion frames each, consuming approximately 18 years of simulated experience on a single server.
  • Despite high performance, the agents still fall short of expert human players, particularly due to the lack of audio perception and multimodal sensory integration.

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.