![](https://lifeboat.com/blog.images/a-new-way-to-encode-and-generate-super-mario-bros-levels.jpg)
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.”