This blog marks the beginning of the largest sub-project of my topic. Inspired by MarI/O, I aim to develop an AI that learns to play Super Metroid. To get it working, I will first try to stick to the same methodology as the one used for MarI/O and make changes to the scripts as the project develops.
In this blog, I will introduce the project, take a first look on the game and its mechanics and point out potential ’sticks and stones‘.
The game
Super Metroid (スーパーメトロイド Sūpā Metoroido?), also known as Metroid 3, was developed by Nintendo R&D1 and published by Nintendo for the SNES and is the third installment of its series. With its 24-megabit (3 megabyte) cartridge size, it was the largest video game ever created at the time of its release.
It is a 2D „Metroidvania“ platform game with action and adventure elements. Progression revolves around gathering power-ups that allow the main character, Samus Aran, to overcome obstacles in order to access new parts of the world. Like most Metroid games, the world has a non-linear design and contains many hidden areas, making exploration a central aspect. It is considered as one of the greatest games of all time, and its formula has served as the primary basis for most Metroid games to follow. (cf. https://metroid.fandom.com/wiki/Super_Metroid)
The project
In this project, I want to develop an AI that learns to play this huge and complex game – which includes exploration of the game’s world and mastering of the game’s mechanics. There are many things I want to achieve during the project. At first, I want the AI to complete some relatively easy tasks, like moving from one area to another or successfully shooting at enemies. To achieve this, the code provided by MarI/O might already be sufficient (with some minor adjustments, though). At later stages of the project, I would like to see the AI adapt to newly acquired power-ups and taking down bosses. To achieve these tasks, however, new solutions might be needed, which is where the knowledge gathered from the TensorFlow examples becomes valuable.
Simply put, I will go through the project step by step and choose concrete directions after each step. Using MarI/O as a cheatsheet, I will try to get everything started.
This project will probably turn out as a long series; I will title the next blogs differently than usual.
First analysis
After starting the game from the main menu, A short unskippable cutscene introduces the lore of the game and sends the player to the first tutorial-like area Space Colony, as shown in Figure 1.
Soon after the cutscene, players need give some input for the first time, as shown in Figure 2. The tutorial level begins – it features an area without actual obstacles or enemies. After advancing through some minor floors, the game jumps right into the first bossfight. After some time, the whole level starts collapsing and players need to escape through the same floors they came from. After reaching the starting point within a given time limit of 60 seconds, the game advances to its actual first area.
Players land on Planet Zebes, as shown in Figure 3. From here on out, players can explore the game world, find power-ups and progress through the game.
MarI/O started in one of two possible pre-selected levels – both were neither too easy nor too hard. This case does not work that way, though, since there are no actual levels but rather sections that build up the game and its world.
For the first steps the AI should learn how to move through sections and therefore, selecting the tutorial section as the first starting point might be a good idea. However, since the actual start of game is not too difficult at the beginning, it might also be a good choice.
I am going to prepare the tutorial as the starting point since it seems like a good testing ground, which is useful when it comes to figuring out the controls of the game. The first challenges for the AI to overcome will be the controls, which must be understood to navigate through the section and to perform complex manouvers such as landing on platforms.
Technical sources:
Emulator: https://downloads.tomsguide.com/BizHawk-,0301-68419.html
Rom: https://wowroms.com/de/roms/super-nintendo/super-metroid-usa/29599.html