PlayTrain:LLM生成可适应JavaScript游戏的高效强化学习框架
PlayTrain: An Efficient Reinforcement Learning Framework for LLM-Generated Adaptable JavaScript Games
PlayTrain让LLM直接生成JavaScript游戏,无需大量手动编码,RL训练速度达百万决策/秒/GPU。
PlayTrain结合大语言模型生成JavaScript游戏的能力,与高效管道支持在标准'gym'环境中运行。该框架能在单GPU节点上以每秒超过100万次智能体决策的速度训练基于像素的智能体。研究人员使用PlayTrain成功克隆了Atari和ProcGen游戏,并支持创建具有新测试集、程序生成逻辑或游戏动态的修改版本。
PlayTrain: An Efficient Reinforcement Learning Framework for LLM-Generated Adaptable JavaScript Games
While many video-game environments (VGEs) have played crucial roles in advancing reinforcement learning (RL), developing novel VGEs or modifying existing ones to support new features, has been a laborious process requiring extensive hand-coding. Here we present PlayTrain, an RL framework that combines the abilities of large language models (LLMs) to robustly generate JavaScript (JS) games from a minimal human prompt, and an efficient pipeline that can run any JS game in a standard 'gym' environment. Not only are recent LLMs particularly good at writing JS code, but the JS format also allows users to easily play generated VGEs, while PlayTrain enables us to train RL agents on the exact same games. We demonstrate multiple use cases of PlayTrain, including cloning well-known Atari and ProcGen games in simple JS, where PlayTrain trains pixel-based agents end-to-end at over 1M agent-decisions per second on a single GPU node; and creating modified versions thereof (e.g., that support novel test sets, procedural generation logics, or game dynamics). Through PlayTrain, we reimagine RL VGE development: all we need is a single JS file, generated and modified through an LLM. We discuss promising future RL research directions that PlayTrain unlocks.