Meet MarioGPT: New Method to Make Endless Super Mario Bros Levels

Meet MarioGPT: New Method to Make Endless Super Mario Bros Levels

News by Roberto Orosa
Published: February 16, 2023

A team of researchers at IT University of Copenhagen just discovered a new way to generate endless levels of Super Mario Bros – the MarioGPT. 

MarioGPT makes use of GPT2, which is different from the conversational AIs used for OpenAI’s ChatGPT. The large language models (LLM) are proficient in processing sentences, putting out more like them, and recognizing patterns as replication machines. 

According to Shyam Sudhakaran, the lead author of the study, GPT2 is easier to train and much more lightweight compared to GPT3 when it comes to small datasets. “However, in the future, with bigger datasets and more complicated prompts, we may need to use a more sophisticated model like GPT3,” he added. 

The researches explained that LLMs have a hard time understanding Mario levels natively, so they first had to render a set of them as text, and produce a Dwarf Fortress-like version of the beloved Mario game.  

The LLM then ingests the levels represented by a series of characters, and once it understands the patterns, it produces them. To test its playability, the researchers used the game-playing software agent A*which was able to beat nine out of 10 levels that the LLM produced.   

The researchers also wanted to give the game a bit of a challenge, so they included functions to gauge how easy a path is, making sure players don’t just walk through the game. The model used can also understand simple prompts, which allowed the researches to make levels with lots of pipes, enemies, blocks and high elevation, or no enemies.  

“In future work, we’re [going to] explore some richer datasets!” shared Sudhakaran. 

Sebastian Risi, a professor at IT University of Copenhagen who helped with the project, shared his work with Sudhakaran and the rest of the team on his Twitter:

The MarioGPT project is now madeavailable by the team on theirGithub, which is accessible here. 

Subscribe to Spotlight Newsletter
Subscribe to our newsletter to get the latest industry news