mario-gpt  by shyamsn97

Research paper code for text-conditioned Super Mario Bros level generation

Created 2 years ago
1,135 stars

Top 33.9% on SourcePulse

GitHubView on GitHub
Project Summary

MarioGPT enables the generation of Super Mario Bros. levels from text prompts using a fine-tuned GPT-2 model. It targets researchers and developers interested in procedural content generation, AI-driven game design, and exploring the capabilities of large language models for structured output. The project offers a novel approach to controllable level creation, allowing for diverse and potentially playable game environments.

How It Works

MarioGPT leverages a fine-tuned distilgpt2 model, trained on Super Mario Bros. and Super Mario Bros: The Lost Levels level data from The Video Game Level Corpus. The model takes text prompts describing desired level features (e.g., "many pipes, many enemies") and generates a sequence of tokens representing the level layout. This approach allows for a flexible, prompt-based generation process, with parameters like temperature controlling the stochasticity and playability of the output.

Quick Start & Requirements

  • Installation: pip install mario-gpt or install from source.
  • Prerequisites: Python 3.8+, PyTorch, Hugging Face transformers. CUDA is recommended for faster generation. Java 8+ is required for interactive playback and A* agent simulation.
  • Demo: An interactive Hugging Face demo is available for browser-based generation and playback.
  • Documentation: Code examples for generation, training, and interaction are provided in the README.

Highlighted Details

  • Generates levels based on text prompts.
  • Includes methods for interactive playback (play()) and pathfinding (run_astar()).
  • Provides code for training custom models.
  • Supports continuing generation from a previous output.

Maintenance & Community

The project is associated with NeurIPS 2023 and lists multiple authors from ITU. The primary repository is shyamsn97/mario-gpt.

Licensing & Compatibility

The project is released under the MIT license, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The README notes that generation is "not perfect" and suggests higher temperatures for more playable, albeit stochastic, levels. Inpainting functionality and more advanced generation methods are listed as future plans, indicating they are not yet implemented.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), and
3 more.

retro by openai

0.1%
4k
RL environment for classic video games
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.