A new way to encode and generate Super Mario Bros levels
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 video game 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 model 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
© 2023 Science X Network
Citation:
A new way to encode and generate Super Mario Bros levels (2023, February 15)
retrieved 15 February 2023
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.
For all the latest Technology News Click Here
For the latest news and updates, follow us on Google News.