Research paper code for text-conditioned Super Mario Bros level generation
Top 34.6% on sourcepulse
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
pip install mario-gpt
or install from source.transformers
. CUDA is recommended for faster generation. Java 8+ is required for interactive playback and A* agent simulation.Highlighted Details
play()
) and pathfinding (run_astar()
).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.
1 year ago
1 day