techlist.io

Mmo

1 posts

OpenAI2019-03-033 min readCurated summary

Neural MMO: A massively multiagent game environment

# Neural MMO: A Massively Multiagent Game Environment for Reinforcement Learning OpenAI released Neural MMO, a game environment for reinforcement learning that hosts a large, variable number of agents in a persistent, open-ended world. The authors argue that existing environments are either complex but narrow, or open-ended but simple, and that massively multiagent settings can fill this gap. Their experiments show that larger populations and more species lead to better exploration, niche formation, and overall agent competence. ## Design Goals The authors built Neural MMO around four criteria: - **Persistence:** Agents learn concurrently with other learning agents and no environment resets occur, so strategies must account for long time horizons and shifting behaviors of other agents. - **Scale:** The environment supports a large, variable number of entities. Experiments ran up to 100M lifetimes of 128 concurrent agents across 100 concurrent servers. - **Efficiency:** Effective policies can be trained on a single desktop CPU, keeping the barrier to entry low. - **Expansion:** Modeled on existing MMOs, the environment is designed to grow with new content. Current features include procedurally generated tile-based terrain, food and water foraging, and strategic combat. ## Environment Mechanics - Agents join any available server, each generating a tile-based map of configurable size. - Forest and grass tiles are traversable, while water and stone are not. - Agents spawn along the map edges and must manage health by obtaining food and water while avoiding combat damage. - Forest tiles hold limited food that regenerates slowly, so agents compete for it. Water tiles are infinite. - Combat uses three styles: Melee, Range, and Mage. - **Observations:** Agents see a square crop of tiles centered on their position, including terrain types and the health, food, water, and position of nearby agents. - **Actions:** Each tick, agents output one movement and one attack. ## Training Approach - The baseline is a small, fully connected network trained with vanilla policy gradients, a value function baseline, and reward discounting. - Agents receive a reward of 1 for each tick they survive, so they optimize for lifetime rather than explicit objectives. - Variable-length observations, such as lists of nearby players, are converted to fixed-length vectors by taking the maximum across entities, a trick also used by OpenAI Five. - The released code uses PyTorch and Ray for distributed training. ## Emergent Behaviors - **Server merge tournaments:** Policies trained in larger settings consistently outperformed those trained in smaller ones when players from different servers were merged to compare them directly. - **Exploration from competition:** Map coverage increased with the number of concurrent agents, since the presence of others naturally pushes agents to spread out. - **Niche formation:** With more populations, agents separated across the map to avoid competing with their own kind, seeking regions with enough resources to sustain their population. DeepMind independently observed similar effects. - **Learned dependencies:** A value-function visualization showed agents' policies depend on the positions of other agents. Agents learned "bull's eye" avoidance maps to forage effectively within minutes, and they learned appropriate engagement ranges and approach angles in combat. ## Conclusion Neural MMO combines moderate environment complexity with large population scale, and the authors designed it for open-source expansion so the research community can build on it. They present it as a step toward solving the limitations of prior game-based environments, while acknowledging that many open problems remain.