Giter Club home page Giter Club logo

nmmo2-team's Introduction

Meta MMO: Massively Multiagent Minigames for Training Generalist Agents

Meta MMO is a collection of many-agent minigames built on top of Neural MMO to serve as a benchmark for reinforcement learning. It offers a diverse set of configurable minigames that allow fine-grained control over game objectives, agent spawning, team assignments, and various game elements. Meta MMO enables faster training, adaptive difficulty, and curriculum learning.

Getting Started

  1. Clone the repository:

    git clone https://github.com/kywch/meta-mmo.git
    cd meta-mmo
    
  2. Install the required dependencies:

    pip install -e .[dev]
    
  3. Train specialists for each minigame or a generalist policy:

    # Train specialists for Team Battle (tb), Protect the King (pk),
    # Race to the Center (rc), King of the Hill (kh), and Sandwich (sw)
    python train.py --use-mini -t tb_only
    python train.py --use-mini -t pk_only
    python train.py --use-mini -t rc_only
    python train.py --use-mini -t kh_only
    python train.py --use-mini -t sw_only
    
    # Train a generalist for playing all five games
    python train.py --use-mini -t mini_gen --train.total-timesteps 400_000_000
    
  4. Evaluate trained policies: The script below evaluates the checkpoints included in thie repository.

    # Mini config minigames: battle, ptk, race, koh, sandwich
    python evaluate.py experiments/mini_tb -g battle -r 10
    python proc_elo.py experiments/mini_tb battle
    
    python evaluate.py experiments/mini_pk -g ptk -r 10
    python proc_elo.py experiments/mini_pk ptk
    
    python evaluate.py experiments/mini_rc -g race -r 10
    python proc_elo.py experiments/mini_rc race
    
    python evaluate.py experiments/mini_kh -g koh -r 10
    python proc_elo.py experiments/mini_kh koh
    
    python evaluate.py experiments/mini_sw -g sandwich -r 10
    python proc_elo.py experiments/mini_sw sandwich
    

Minigames

Meta MMO includes several minigames, each focusing on different aspects of gameplay:

  • Survival: Agents must survive until the end of the episode
  • Team Battle: Last team standing wins (The NeurIPS 2022 competition)
  • Multi-task Training/Evaluation: Free-for-all with agents assigned random tasks (The NeurIPS 2023 competition)
  • Protect the King: Teams must protect their leader while eliminating other teams
  • Race to the Center: First agent to reach the center tile wins
  • King of the Hill: Teams must capture and hold the center tile
  • Sandwich: Teams must defeat all other teams and survive while fighting NPCs and a shrinking map

Baselines

We provide baseline generalist and specialist policies trained using PPO with historical self-play. The generalist policy is capable of playing multiple minigames with a single set of weights, matching or outperforming specialist policies trained on the same number of environment steps for the target minigame.

Citing Meta MMO

If you use Meta MMO in your research, please cite the following paper:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Neural MMO - The base environment for Meta MMO
  • PufferLib - A super efficient RL library for complex environments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.