Brain v4, live in your browser

This is brain v4's real code (compiled to WebAssembly) and its trained minds, learning live in your browser. It was never trained on your layout; everything it does here it learns during this life.

By default you see the full brain: four specialist parts (each a 420 KB mind; two share one mind file) and the learned router that picks which part lives the life. You can switch to the single 420 KB mind (v4_meta3) to compare them on the same room.

Loading the full brain (about 1.4 MB)...

Tap or drag on the room to add or remove walls. Drag the green food or the S (where each try starts) to move them.

Router–
0tries this life
–steps, last try
–food reached, last 10
0thoughts this life
0reward this thought
0food eaten
reached the foodran out of timeyou changed the room

Steps to the food, one bar per try, the latest 120. The line is the mean of the last 10.

What is going on

On whole kinds of task it never trained on, the single mind's recipe (with its memory of moves) scores 0.51 ± 0.04 across three independent raisings, against 0.076 for tuned PPO after the same experience (results). This page measures only what you see above.

How it runs: brain v4's C core and its parts (unchanged), the router (the research program's own code for this setting, four parts) and a C port of the gym's field rules are compiled to one WebAssembly file (about 300 KB) that thinks in a Web Worker; the mind files are loaded as they are. Checks: on the same inputs the WebAssembly build gives bit-identical acts to the native build (single mind: 100,000 thoughts; full brain: 20,000); on the same gym lives the WebAssembly router makes the same choices, at the same thoughts, with the same results as the research program; and the ported field gives the same senses and rewards as the gym's own nav and detour code. The way map is the research branch's own file: with it switched off the build gives the same acts as before to the last bit, and with it on the WebAssembly build gives the same acts as the native build (single mind 100,000 thoughts, full brain 20,000, and lives with a wall added). The memory of moves is the research branch's own code: with it, single parts give the research gym's results to the last digit, the native router gives the research router's own choices and results with all four parts, and the WebAssembly build matches the native build made with the same C maths library (with another C library, rounding in its sine, cosine and arctangent differs in the last bit, so lives can drift apart; the results stay alike).