Brain v4 at four slot machines
This is brain v4's real code (compiled to WebAssembly) and its trained minds, learning live in your browser. It sees no machine and no payout chance: each pull it chooses one of four machines and feels only whether that pull paid. You set how often each machine pays, and you can change it at any time.
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. Switch to the single 420 KB mind (v4_meta3) to compare them; the switch starts a new life with the same draws.
Drag a slider to change how often that machine pays, while it lives. Family rules: one machine pays 80% and three pay 20%, and the good one moves by itself every 60 to 120 pulls.
Share of pulls on the best machine (the one paying most just then), one bar per 20 pulls. Dashed: you changed the machines (or the family moved its good machine). A random chooser stays near 25%.
What is going on
- What it senses: the same 24 numbers as in every Brain Gym task; here only a "now choose" signal and whether its last pull paid (or not). What it does: two of its outputs pick one of four machines.
- A pull pays 1 with the machine's chance, else nothing. No other reward, and nothing tells it which machine is which.
- The full brain has four specialist parts, each a whole mind: the place part, the body-map part, the base mind (v4_meta3) and the place part with its memory of moves. Only one acts at a time. The life starts on the place part while the router watches: after 5, 10, 20, 40, 80 and 160 thoughts it compares what it has sensed with its memory of 1,600 earlier worlds, and as soon as the nearest ones clearly say which part did best there, that part lives the rest of the life (with a short trial: back to the place part if it earns less than expected). Of the routers we tested, this is the best: it scores above the router with three parts both on kinds of task it never trained on and on familiar ones, at least level with the best single part on the new kinds and well above it on the familiar ones.
- Memory of moves: the single mind carries a small whole-life memory of moves that failed (where it was, which way it moved, and then nothing changed, or it felt a loss) and leans firmly away from repeating them there. In the full brain this memory belongs to one part: the place part with its own whole-life memory of moves that failed and moves that paid, speaking only while that part acts.
- Learning happens only in this life: the minds' raised weights stay fixed and what they learn lives in their fast links and recurrent state. Reset brain starts a fresh life.
- Here the memory of moves does nothing: no pull leaves what it senses unchanged and no pull costs anything, so its acts pass through untouched (and the router does not give this task to the part that carries one).
- What to expect: with one machine much better than the rest it settles on it within a few dozen pulls; when the good machine moves, it keeps pulling the old one for a while, then finds the new one. A close call (60% against 45%) is slow and noisy to tell apart, for it as for anyone. In our runs of the close call (64 lives each, the same draws for both brains): best machine in the first 100 pulls 31% full brain against 33% single mind, over the whole life 41% against 39%, in the last 500 pulls 40% against 44%. Level within the noise, with the full brain a little behind late in the life (by 1.4 standard errors).
How it runs: the same WebAssembly file and mind files as the room demo (shared, so your browser loads them once). The task is Brain Gym's own bandit4 code, unchanged; your edits change its state between two thoughts. On the same inputs the WebAssembly build gives bit-identical acts to the native build built with the same C maths library, and the router and the memory of moves give the research programs' own results.