Brain v4 learning to learn (Harlow)
This is brain v4's real code (compiled to WebAssembly) and its trained minds, learning live in your browser. Every six tries it is shown two new objects side by side; one of them is fed when chosen, the other is not, and which side each is on changes from try to try. Harlow (1949) found that monkeys, after many such problems, get the second try right almost every time: they have learned how to learn this kind of problem.
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.
The star marks the object that is fed in this problem (only you see it). Swap makes the other one fed, for the rest of this problem.
Second-try success, one bar per 10 problems. On the first try of a new problem it can only guess; the second try is where learning to learn shows. Dashed: you swapped the fed object.
What is going on
- What it senses: the left object's four features, the right object's four features, a "now choose" signal and whether its last choice was fed. What it does: one output picks left or right.
- A problem is six tries with the same two objects; then two new objects. It was never raised on Harlow's task (it is one of the kinds held out from its raising).
- 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 choice leaves what it senses unchanged and no choice 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: the second-try line sits well above chance from early in the life. Swapping the fed object mid-problem makes its next tries wrong until it notices. In our runs here (64 lives each) the full brain and the single mind were level: second try right 79.0% against 79.1%.
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 harlow 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.