This article has been reviewed according to Science X's editorial process and policies. Editors have highlighted the following attributes while ensuring the content's credibility:

fact-checked

preprint

trusted source

proofread

A new way to encode and generate Super Mario Bros levels

A new way to encode and generate Super Mario Bros levels
Prompt-conditioned generations from a single seed block. MarioGPT is able to create diverse levels solely based on a text prompt in natural language. Credit: arXiv (2023). DOI: 10.48550/arxiv.2302.05981

A team of computer programmers at IT University of Copenhagen has developed a new way to encode and generate Super Mario Bros. levels—called MarioGPT, the new approach is based on the language model GPT-2. The group outlines their work and the means by which others can use their system in a paper on the arXiv pre-print server.

Mario Brothers is a first introduced in 1983—it involves two Italian plumbers emerging from a sewer and attempting to rescue Princess Peach, who has been captured and held by Bowser. To rescue her, the brothers must travel (via input from the game player) across a series of obstacles made of pipes and bricks. As they travel, the terrain changes in accordance with the level they have achieved in the game. In this new effort, the team in Denmark has recreated one aspect of the game—the number of levels that can be traversed.

The researchers used Generative Pre-trained Transformer 2 (GPT-2)—an open-source language created by a team at OpenAI, to translate user requests into graphical representations of Super Mario Brothers game levels. To do so, they created a small bit of Python code to help the language model understand what needed to be done and then trained it using samples from the original Super Mario Bros. game and one of its sequels, "Super Mario Bros.: The Lost Levels."

After prompting for style of play, MarioGPT generates a new level of the game. Responses to prompts can include phrases such as "many pipes, many enemies, little blocks, low elevation." The team posted the code and instructions for encoding and generating levels on GitHub. Users can generate any number of levels they desire.

In related news, a team at New York University Tandon, working with a colleague from the University of the Witwatersrand, conducted similar work that involved using large language models to generate and play versions of the game Sokoban, in which players push boxes around in a warehouse—they describe their work in a paper on the arXiv preprint server.

More information: Shyam Sudhakaran et al, MarioGPT: Open-Ended Text2Level Generation through Large Language Models, arXiv (2023). DOI: 10.48550/arxiv.2302.05981

Graham Todd et al, Level Generation Through Large Language Models, arXiv (2023). DOI: 10.48550/arxiv.2302.05817

MarioGPT: github.com/shyamsn97/mario-gpt

Journal information: arXiv

© 2023 Science X Network

Citation: A new way to encode and generate Super Mario Bros levels (2023, February 15) retrieved 29 March 2024 from https://techxplore.com/news/2023-02-encode-generate-super-mario-bros.html
This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only.

Explore further

The next 'Mario Kart' game for Nintendo Switch turns your living space into a race track

179 shares

Feedback to editors