Memento 3's core method is called Code as Model. It has the AI maintain two things simultaneously during gameplay: a continuously updated Rulebook, using Markdown to record discovered patterns and rules not yet figured out; and an Executable World Model, writing the summarized rules directly as runnable Python code, essentially building its own simplified game simulator. With these two, the AI can first reason through different routes in its self-built simulator, then decide how to take the next step.
The key lies in the error-correction mechanism. The report gives an example: the AI initially thought that after stepping on a special floor tile, the pattern carried by the character would mirror-flip according to the entry direction; only after actually trying it did it discover it was a 90-degree clockwise rotation unrelated to the entry direction, so it modified the rulebook, and the corresponding Python code updated in sync. The system then re-simulated previous operations, comparing the 64×64 game screen cell by cell, confirming the code could accurately reproduce the real results; if it didn't match, it kept revising.
This iteration leaves version traces. In the symbol-decryption game tr87, the same rulebook went through 11 versions over the course of a single game, and the research team also introduced Git version management for traceability—if a change was wrong, one could review historical versions or even restore them. This is exactly what the research team calls recursive self-improvement (RSI): the large model's parameters stay fixed, and the AI becomes more skilled at playing by accumulating experience and modifying rules and code.