[论文解读] TLeague: A Framework for Competitive Self-Play based Distributed Multi-Agent Reinforcement Learning
TLeague 是一个可扩展的、云原生的分布式竞争自博弈多智能体强化学习框架,采用模块化的 Actor-Learner-InferenceServer 架构,在混合 CPU-GPU 集群上实现高吞吐量训练。它在 StarCraft II 和 ViZDoom 等基准测试中实现了高达 280 万帧每秒的吞吐量,并具备合理的扩展能力,支持主流算法如 PPO、V-trace 和基于 PBT 的对手采样。
Competitive Self-Play (CSP) based Multi-Agent Reinforcement Learning (MARL) has shown phenomenal breakthroughs recently. Strong AIs are achieved for several benchmarks, including Dota 2, Glory of Kings, Quake III, StarCraft II, to name a few. Despite the success, the MARL training is extremely data thirsty, requiring typically billions of (if not trillions of) frames be seen from the environment during training in order for learning a high performance agent. This poses non-trivial difficulties for researchers or engineers and prevents the application of MARL to a broader range of real-world problems. To address this issue, in this manuscript we describe a framework, referred to as TLeague, that aims at large-scale training and implements several main-stream CSP-MARL algorithms. The training can be deployed in either a single machine or a cluster of hybrid machines (CPUs and GPUs), where the standard Kubernetes is supported in a cloud native manner. TLeague achieves a high throughput and a reasonable scale-up when performing distributed training. Thanks to the modular design, it is also easy to extend for solving other multi-agent problems or implementing and verifying MARL algorithms. We present experiments over StarCraft II, ViZDoom and Pommerman to show the efficiency and effectiveness of TLeague. The code is open-sourced and available at https://github.com/tencent-ailab/tleague_projpage
研究动机与目标
- 解决竞争自博弈多智能体强化学习(CSP-MARL)对极高的数据效率需求,其收敛通常需要数十亿帧。
- 在异构集群(CPU 和 GPU)上实现大规模、分布式 MARL 智能体训练,以加速学习并缩短训练时间。
- 提供一个模块化、可扩展的框架,支持标准 Kubernetes 部署,并可轻松适配新环境、新算法或对手采样策略。
- 在分布式环境中实现高训练吞吐量与合理的扩展能力,使 CSP-MARL 更易于用于研究与实际应用。
提出的方法
- 采用 Actor-Learner-InferenceServer 架构,将环境交互(数据收集)与学习(梯度更新)解耦,实现高效的并行化。
- 使用集中式对手池和参数服务器管理多样化的对手策略与模型权重,支持通过 PBT、Agent-Exploiter 或虚构自博弈实现动态对手采样。
- 实现策略梯度方法(如 PPO 和 V-trace)用于价值函数与策略学习,通过 TCP 上的 Horovod allreduce 实现同步梯度更新。
- 支持灵活的神经网络架构,从简单的前馈网络到复杂的有向无环图(DAG),采用模块化设计以方便新模型的集成。
- 利用标准 Kubernetes 进行编排,实现在公有云或私有云基础设施上的云原生部署,并支持动态扩展。
- 通过阻塞队列优化数据流,平衡 Actor 与 Learner 的吞吐量,最小化数据延迟,确保在线策略学习的保真度。
实验结果
研究问题
- RQ1一个模块化、分布式的框架能否显著减少在竞争自博弈多智能体强化学习场景中训练高性能 MARL 智能体所需的时钟时间?
- RQ2在多智能体强化学习中,异构 CPU-GPU 集群在多大程度上能被有效利用以提升训练吞吐量?
- RQ3该框架在多大程度上支持对新环境、强化学习算法和对手采样策略的可扩展性?
- RQ4在使用标准云基础设施的现实世界基准(如 StarCraft II 和 ViZDoom)中,该框架能实现怎样的吞吐量与扩展能力?
- RQ5尽管具备高数据吞吐量和分布式训练,该框架如何保持在线策略学习的质量?
主要发现
- 在 Dota 2 1v1 场景中,TLeague 达到了峰值 280 万帧每秒(rfps)和 560 万帧每秒(cfps)的吞吐量,使用了 192 块 GPU 和 60,000 个 CPU 核心。
- 在 StarCraft II 的 TStarBot-X 设置中,框架在 96 块 GPU 和 4,200 个 CPU 核心下维持了 4,200 cfps 的吞吐量,展示了在单个 Zerg 种族游戏中的强大扩展能力。
- 在 ViZDoom 中,框架在 32 块 GPU 和 1,152 个 CPU 核心下实现了 8,200 cfps 的吞吐量,处理了 17.5 个游戏内帧每秒(帧跳=2)。
- 该框架在数百块 GPU 和数万个 CPU 核心中表现出合理的扩展能力,cfps/rfps 比值接近 1.0,表明数据延迟极低,且在线策略保真度强。
- TLeague 有效训练出在 StarCraft II(zvz 全图)、ViZDoom(CIG 2016 赛道 1)和 Pommerman(NeurIPS 2018 2v2 竞赛)中表现优异的智能体,验证了其有效性。
- 该开源框架已具备生产就绪能力,可在标准 Kubernetes 集群上部署,并支持与腾讯云等主流云服务提供商的集成。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。