Metroid Learning – DEV – Third run, First improvements

In this blog, I provide the most recent insights of the metroid-learning project.

Developement Log

  • Clean up code (again)
    • Restructure core script, move functions into new files.
    • Optimize code execution by „rethinking“ its logic.
    •  Add documentation.
  • Create „neatFunctions.lua“
    • Every single NEAT function that works completly fine when isolated was moved into an isolated script.
    • Some functions were reworked to also fit in the new file
  • Create „fileFunctions.lua“
    • Every file management function that did not need to directly access global variables were moved into a new script.
    • Minor adjustments were also necessary.
  • Improve Samus‘ behavior
    • Samus will no no longer try to only run right.
    • Samus will now try to move as much as possible, in any direction (or height).

 

Notes

The circles that surrounds samus is not correctly aligned.

A gitignore might be useful so that not all pool files are commited.

Samus tries to make too many inputs while in midair. This causes a flood of (harmless) error messages.

Fitness always starts at 179, should be 0. There should also be more penalties.

Because of a quickfix, the AI is basically blind. Re-fixing should be prioritized…

 

Results

The main difference from last time is that the AI has more options to move. On the one hand, that is useful, since it has more potential to actually complete the tutorial. On the other hand, it can also perform actions mid air that are not possible, causing some errors in the console.

The AI learns. In generation 6, the AI learned how to effectively jump from the starting platform into the next possible corner. A perfect jump scored a fitness of 452, as shown in Figure 1.

Figure 1 – AI in generation 6

 

In generation 13, the AI somehow figured out way to jump even more perfect, as shown in Figure 2. The AI managed to get a score of 453, 1 more than what should be possible. The error causing inputs cause a slow and that might lead to a small difference in the fitness calculations. The AI focussed on repeating the steps it took to get a 453 score, which shows that the system works.

Figure 2 – AI in generation 13

 

Bonus Content

An article on polygon.com dragged my attention on a rather unexpected project. The event Summer Games Done Quick (SGDQ), which focuses on streaming speedruns of different games, included a ‚race‘ of a mashup version of the games Super Metroid and The Legend of Zelda: Link to the Past. Collectible items of both games were randomly placed across both games. More about this project can be found in the link above or (in case it does not work) below:
https://www.polygon.com/2019/6/30/20579486/a-link-to-the-past-super-metroid-randomizer-snes-rom-speedrun-video

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

eins × fünf =