GBUDDY'S ESCAPE
A tiny AI experiment for the Game Boy (DMG-01)

Version 0.39, 16 October 2026
by Dr. Marcel Pflug, gameboymuseum.com


WHAT THIS IS
------------

GBuddy, the mascot of the Game Boy Museum, is stuck in a maze. He does
not know the way out, and nobody tells him.

He learns it. Every move earns a small score: a step costs a little,
bumping into a wall costs more, and the exit is worth a lot. From those
scores alone he works out, run after run, which move is worth making on
which field. The method is called tabular Q-learning.

All of the learning happens inside this ROM, on the Game Boy's own
processor. There is no internet connection, no server, no external AI
and no calculation on a connected PC. His knowledge starts at zero, and
he never plays back a stored route.

Reaching the exit is not the same as knowing the way, and the cartridge
keeps the two apart. After every success it checks, without any chance
involved, whether what he has learned gets him out. If it does not, the
screen says so.


HOW TO RUN IT
-------------

The file in this folder is an ordinary Game Boy ROM. It needs no BIOS
and no extra files.

    GBuddys Escape v0.39.gb

On real hardware:
    Write it to a flash cartridge with battery backed RAM and put it in
    a Game Boy. The EverDrive family is the recommended choice. Some
    flash cartridges need an extra step before switching off to copy
    the save to their memory card; see the manual of yours.

In an emulator:
    Open it. Any emulator that supports MBC5 with battery backed RAM
    will run it.

The ROM is 65 536 bytes and uses MBC5 with 8 KB of battery backed RAM.


CONTROLS
--------

    Arrow keys      move, and turn pages
    A               select, confirm
    B               back one step
    START           start from the title screen, pause training
    SELECT          slow or fast training, test again

Every screen names the buttons it uses at the bottom.


WHAT IS ON THE CARTRIDGE
------------------------

    TRAIN       GBuddy practises. Watch him slowly, or let him learn fast.
    TEST        he walks what he has learned, with no chance and no
                learning. Nothing he does here changes his memory.
    STATS       how the training is going on the current maze.
    EDIT ARENA  move the walls. Start, exit and the outer walls are
                protected, and the exit always stays reachable.
    RESET AI    clear everything he has learned. The maze stays.
    WIKI        15 short pages on what is happening and why.
    ABOUT       who made this, and why.

When the route he has learned is as short as the maze allows, training
pauses and the screen reads MAZE SOLVED. The obvious next step is to
change the maze and watch him adapt.


HIS PROGRESS IS SAVED
---------------------

What GBuddy has learned, the maze, the statistics and both counters are
kept in the cartridge's battery backed RAM. They are saved when training
is paused or left, at the first success, every ten completed runs,
when the maze is saved and after RESET AI.

Two alternating copies with checksums protect the last good state if a
save is interrupted. A run that was in progress when the power went off
starts again from the beginning; what he had learned stays.


CARTRIDGE LABEL
---------------

The file cart-label.png is a label for a flash cartridge. It is
1116 by 983 pixels. Print it at 42 by 37 millimetres; 42 millimetres
is the usual width of a Game Boy cartridge label. Print at 100 percent
rather than "fit to page".


VERIFYING THE DOWNLOAD
----------------------

    GBuddys Escape v0.39.gb

    Size           65 536 bytes
    MD5            8e862925c9e855e5c14aba55e3e11726

If those two do not match, the file is not the one that was published.


TERMS, CREDITS
--------------

See TERMS.txt and CREDITS.txt in this folder.


CONTACT
-------

Dr. Marcel Pflug
info@gameboymuseum.com
https://www.gameboymuseum.com
