Skip to content
SQUARE MILE DESIGN®

NOTES

By Luke Paxton12 November 202610 min readLocal LLM · Raspberry Pi · LoRA · Fine-tuning · Evaluation · Ollama

Taught Once, Untaught Twice

One round of training on a teacher's moves took a 3B model on a Raspberry Pi from zero goals to 12 in 30 on a maze it had never seen. A second round, with its own mistakes added, took it back to zero. Twice.

Branch Point 1.0 ended with a split. llama3.2:3b, running on a Raspberry Pi 5 on my desk, walked a straight corridor to the goal 30 times out of 30. On a maze, with the same prompt, it reached the goal zero times out of 30. Execution was intact. Judgement at the branch points was not. The last line named what was missing: a way to be wrong, remember it, and choose differently next time.

Branch Point 2.0 tried to add it. Same two models, qwen2.5:1.5b and llama3.2:3b. Same Pi. No bigger model. Three levers, cheapest first: change what surrounds the model, give it memory, change its weights.

One lever worked, once. Trained on a planner's moves, llama reached the goal 12 times in 30 on a board it had never seen. Trained again with its own mistakes added, it reached it zero times. I wrote down a fix and a test before the next run. Zero again.

HOLDOUT-A · GOALS IN 30 EPISODES

llama3.2:3b0102030llama3.2:3b, untrained: 0 of 300Untrainedllama3.2:3b, round one: 12 of 3012Roundonellama3.2:3b, round two: 0 of 300Roundtwollama3.2:3b, rebalanced: 0 of 300Rebalancedqwen2.5:1.5b0102030qwen2.5:1.5b, untrained: 0 of 300Untrainedqwen2.5:1.5b, round one: 3 of 303Roundoneqwen2.5:1.5b, round two: 0 of 300Roundtwoqwen2.5:1.5b, rebalanced: 0 of 300Rebalanced
Goals in 30 episodes on holdout-a, a board no model was trained on. One round of training on a planner's moves took llama from 0 to 12 (p = 0.00006). Adding its own mistakes took it back to 0, and so did the pre-registered rebalanced retry. qwen's 3 are not significant on their own.

The rig is Branch Point 1.0's, with two changes

The board runs in a browser on a laptop. The Pi runs Ollama and answers one move per HTTP request. I rebuilt the Pi between versions, and Branch Point 1.0 had not recorded the models' digests, so I could not prove the weights were identical. Every comparison here is against a control re-run for Branch Point 2.0.

Training happens on the Mac, scoring on the Pi. The Pi is part of the test. Its Ollama build refused LoRA adapters, so every trained model is merged, converted to GGUF, quantised to Q4_K_M and loaded as a separate model. The untrained control goes through the same pipeline, so "trained against control" differs only in the training.

Two held-out boards. Branch Point 1.0's maze, Workshop floor, became a tuning board, kept out of all training data. holdout-a is a new 8×8 that starts bottom-right with the goal top-left, so the pull to the right both models showed in Branch Point 1.0 walks straight off the grid. crossroads-solo is Branch Point 1.0's 16×16 Crossroads, with mud, teleporters and one-way chutes that no training board contains.

G..#....
.H.#.H..
.....#..
..##.H..
.H......
...##H#.
..H.....
.....#.a

holdout-a. a start, G goal, H hazard (hidden until found), # wall.

Rules in the prompt bought decisiveness, not judgement

The cheapest change touches only the prompt. I gave both models a short rulebook: don't undo your last move, never step onto a DEADLY cell, prefer the goal, then unexplored cells, then the least visited. A third arm added a mask: the harness swapped any rule-breaking reply for the best allowed move. Each arm ran twice on Workshop floor, with identical code.

| Workshop, llama3.2:3b | Goals | Hazard deaths | Reversals | |---|---:|---:|---:| | control | 0 / 0 | 5 / 6 | 91% / 91% | | rules in the prompt | 0 / 0 | 30 / 29 | 12% / 12% | | rules plus the mask | 26 / 1 | 4 / 4 | 0% / 5% |

Run one / run two.

The rules fixed the symptom they named. llama stopped pacing. With nothing to keep it still, it died on a hazard in 30 of 30 episodes, then 29 of 30 in the rerun, and chose an option its prompt called DEADLY 27 times in 72. Branch Point 1.0 found the same trade with chain-of-thought. The pacing had been protecting it. qwen did not change: it died on the first warned hazard in nearly every episode, rules or not.

The mask looked like the result of the project for one night: 26 goals in 30. The next morning the same code scored 1. It preferred pushing a block to revisiting a cell, and one block on Workshop floor, pushed to one square, seals the only approach to the goal. It was also overriding up to 45% of the model's moves. Whatever it measured, it was not the model. I dropped it.

One round of training did what no prompt did

The textbook way to teach a small model a task is to show it the right answer many times. Here the answer is easy to compute: a planner that sees only what the prompt shows plans the shortest route over known cells. Nothing the model could not see leaks into the label.

I played 900 random 8×8 boards with a dot that moved at random a quarter of the time, so the data would include being off the route, and the planner labelled every state. A quarter of the examples have a known hazard next to the dot. 12,864 examples. One pass of LoRA training on the Mac.

| holdout-a (never trained on) | Goals | Hazard deaths | Reversals | Cells / ep | |---|---:|---:|---:|---:| | llama, untrained control | 0 | 1 | 89% | 2.2 | | llama, trained (r1) | 12 | 13 | 21% | 12.5 | | qwen, untrained control | 0 | 1 | 36% | 5.8 | | qwen, trained (r1) | 3 | 7 | 37% | 13.4 |

Twelve goals in thirty, against zero for the untrained model put through the identical conversion (p = 0.00006). Across both versions and every prompt I tried, this is the first time either model reached the goal of a maze, a board with decisions in it, more than by luck. Reversals fell from 89% to 21%. Wall bumps fell from 2.9 an episode to 0.3.

The control survived by not moving. The trained model explored nearly six times as much, and died more. Six of its 13 hazard deaths were on hazards still hidden, which an exploring dot can only find by stepping on them. Seven were on cells its prompt called DEADLY, and in those 7 replies its reason already named the danger. Hold on to that; it comes back.

Two limits. The page keeps a map across episodes, and the goals clustered after episode 10, so part of the gain is the trained model using a growing map. The control had the same map and scored nothing. And on the 16×16 board the trained models scored one goal in sixty.

Where a fact sits matters more than whether it is there

Separately, I tested Branch Point 1.0's closing idea on the untrained models: let each dot remember. I turned the page's map memory off and carried one thing between dots: a notebook. After each episode a script wrote down what had happened, in the first person. A real one:

I started at row 7, column 7. I headed up and left, saw 9 cells and got as far as row 3, column 5. Walls stopped me at row 7, column 5 and row 5, column 6. I stepped onto a deadly hazard at row 3, column 5 and died after 14 moves.

Never a route. The ten newest notes went into every prompt.

It made things worse. llama died on a hazard in all 30 episodes, against 17 with no notebook. Twenty-seven of those deaths were on a hazard the notebook already named. qwen went from 5 deaths to 12. No qwen dot without the notebook ever stepped on row 5, column 5. Eight qwen dots with it did.

The models were reading coordinates in a note as a place to go. Row 3, column 5 is a destination-shaped phrase, and a small model goes toward the things its prompt names.

So I kept the facts and moved them, onto the option line each one concerned:

- down: DEADLY hazard, an earlier dot died here (from the notebook)

| holdout-a, untrained | No notebook | Notes as a paragraph | Same notes on the options | |---|---:|---:|---:| | llama, hazard deaths | 17 | 30 | 9 | | llama, stepped onto a hazard when next to one | 40% | 48% | 9% | | qwen, hazard deaths | 5 | 12 | 10 |

HOLDOUT-A · HAZARD DEATHS IN 30 EPISODESFEWER IS BETTERllama3.2:3bllama3.2:3b, no notebook: 17 of 30 died on a hazardNo notebook17llama3.2:3b, notes as a paragraph: 30 of 30 died on a hazardNotes as a paragraph30llama3.2:3b, same notes on the options: 9 of 30 died on a hazardSame notes on the options9qwen2.5:1.5bqwen2.5:1.5b, no notebook: 5 of 30 died on a hazardNo notebook5qwen2.5:1.5b, notes as a paragraph: 12 of 30 died on a hazardNotes as a paragraph12qwen2.5:1.5b, same notes on the options: 10 of 30 died on a hazardSame notes on the options1030 = every episode
The same notebook facts, placed two ways, untrained models. As a paragraph the named hazard cells became destinations: every llama dot died. On the line where it picks a direction, llama died 9 times, below its no-memory floor of 17. qwen could use the facts in neither place.

Same facts, opposite effect. llama died 9 times, below the no-memory floor. Next to a hazard labelled that way, it stepped on three times in 89. qwen could not use the fact even there.

Nobody reached the goal. The notebook taught llama where not to go, half of what Branch Point 1.0 asked for. It did not teach it where to go. And in 821 replies, llama mentioned the notes in its stated reason once. The fact changed the move without appearing in the explanation.

A second round undid the first

Round one had a known weakness. Every training state came from the planner's own play, so the model had only seen states a good player reaches. One mistake and it was somewhere the data never went. The standard fix, DAgger, lets the trained model play, has the teacher label every state it reaches, and trains again on all of it.

The round-one models played 600 fresh boards on the Mac, 8×8 and 16×16. I added teacher play on 400 new 16×16 boards and kept round one's data. About 34,500 examples, a fresh LoRA on the same base model with the same settings, so the two rounds differ only in data.

Both models got worse.

| holdout-a | Goals | Hazard deaths | Chose a warned move | Wall bumps / ep | |---|---:|---:|---:|---:| | qwen, round one | 3 | 7 | 1 of 254 | 0.3 | | qwen, round two | 0 | 28 | 23 of 70 | 0.3 | | llama, round one | 12 | 13 | 7 of 152 | 0.3 | | llama, round two | 0 | 1 | 0 of 0 | 24.1 |

qwen started walking into warned hazards: 22 of its 28 deaths were one route onto a cell an earlier death had already marked. On those moves, its reply read:

{"move": "left", "why": "The way to the nearest unexplored cell. Not left: deadly."}

Round one had done this occasionally, 7 times in 151 for llama. Round two did it on a third of all warned states. One possible reason, not yet tested: the training format puts the move before the reason, so the reason may not be able to steer the move. It may only show that the model knew.

llama collapsed. 778 of its 896 moves were right, from a start in the bottom-right corner where right is the edge of the board. 894 of the 896 gave the same reason: "The nearest unexplored cell."

On the Mac I ruled out quantisation, bad labels and direction bias. What had changed was the mix. The round-one models mostly died early in their own play (qwen died on a hazard in 619 of 745 8×8 games), so only 3-6% of the states they reached had a known hazard next to them. Round one held that share at 25% on purpose. Round two let it fall to 15%, and nearly half the new set showed nothing dangerous in view. llama's run had a second problem: its validation loss jumped from 0.072 to 0.344 two-thirds of the way through training and finished at 0.157. Even the checkpoint before the jump was worse than round one.

The fix passed the gate and failed the board

That diagnosis made a clean experiment. Before building anything I wrote down one data change (rebalance the model's own states to round one's 25% hazard share), one procedure fix (keep the best checkpoint, not the last), a gate on the Mac, and the test: more goals than round one on holdout-a, one-sided, p below 0.05.

The gate was 270 states from fresh boards. It would have stopped both round-two models: round-two llama chose a DEADLY move 39 times. The rebalanced models chose none and matched the planner within a few states of round one (qwen 182 against 188, pass mark 179; llama 184 against 180). Both passed. Both went to the Pi.

| holdout-a | Goals | Hazard deaths | Cells / ep | Undoes its last move | |---|---:|---:|---:|---:| | qwen, round one | 3 | 7 | 13.4 | 37% | | qwen, rebalanced | 0 | 1 | 3.4 | 95% | | llama, round one | 12 | 13 | 12.5 | 21% | | llama, rebalanced | 0 | 4 | 9.3 | 47% |

The test failed for both. Zero goals each. In the other direction, llama's rebalanced model is clearly worse than round one (p = 0.00006).

The rebalancing fixed what the diagnosis said it would. qwen's hazard deaths fell from 28 to 1. Warned moves taken fell to zero. llama stopped hitting the wall. And both models stopped dying by stopping going anywhere. qwen moved left and right, undoing its last move 95% of the time. In Branch Point 1.0 the metronome was llama's, the oscillation I spent four days wrongly explaining. Now qwen had it, and training produced it. llama went up and down in one or two columns.

One last check on the Mac: 120 holdout-a states next to a known hazard, from the planner's path, at full precision, no randomness. One state at a time, the rebalanced models were only a little worse than round one. Nothing like 95%. The pacing is not in any single answer. It shows up in play, from the states the model's own moves lead to, possibly helped by quantisation and sampling on the Pi, which I did not separate. The gate looked at one move at a time. The failure was in the sequence.

HOLDOUT-A · LLAMA3.2:3B · WHERE THE DOT STOOD, 30 EPISODES EACH

UNTRAINED0 GOALS · 8 CELLSrow 4, column 5: 1 movesrow 4, column 6: 1 movesrow 4, column 7: 1 movesrow 5, column 7: 2 movesrow 6, column 6: 1 movesrow 6, column 7: 1 movesrow 7, column 6: 399 movesrow 7, column 7: 495 movesROUND ONE12 GOALS · 46 CELLSrow 0, column 4: 11 movesrow 0, column 5: 4 movesrow 0, column 6: 4 movesrow 0, column 7: 3 movesrow 1, column 0: 12 movesrow 1, column 2: 2 movesrow 1, column 4: 11 movesrow 1, column 6: 3 movesrow 1, column 7: 3 movesrow 2, column 0: 14 movesrow 2, column 1: 4 movesrow 2, column 2: 4 movesrow 2, column 3: 2 movesrow 2, column 4: 4 movesrow 2, column 6: 4 movesrow 2, column 7: 2 movesrow 3, column 0: 13 movesrow 3, column 1: 2 movesrow 3, column 4: 5 movesrow 3, column 6: 2 movesrow 3, column 7: 3 movesrow 4, column 0: 12 movesrow 4, column 2: 6 movesrow 4, column 3: 2 movesrow 4, column 4: 3 movesrow 4, column 5: 2 movesrow 4, column 6: 3 movesrow 4, column 7: 6 movesrow 5, column 0: 15 movesrow 5, column 1: 9 movesrow 5, column 2: 5 movesrow 5, column 7: 6 movesrow 6, column 0: 13 movesrow 6, column 1: 11 movesrow 6, column 3: 37 movesrow 6, column 4: 23 movesrow 6, column 5: 24 movesrow 6, column 6: 25 movesrow 6, column 7: 12 movesrow 7, column 0: 11 movesrow 7, column 1: 17 movesrow 7, column 2: 16 movesrow 7, column 3: 33 movesrow 7, column 4: 4 movesrow 7, column 6: 33 movesrow 7, column 7: 44 movesREBALANCED ROUND TWO0 GOALS · 39 CELLSrow 0, column 2: 2 movesrow 0, column 4: 1 movesrow 0, column 5: 1 movesrow 0, column 6: 2 movesrow 0, column 7: 75 movesrow 1, column 2: 1 movesrow 1, column 4: 1 movesrow 1, column 6: 2 movesrow 1, column 7: 108 movesrow 2, column 0: 1 movesrow 2, column 1: 1 movesrow 2, column 2: 1 movesrow 2, column 4: 1 movesrow 2, column 6: 2 movesrow 2, column 7: 65 movesrow 3, column 0: 1 movesrow 3, column 4: 1 movesrow 3, column 6: 3 movesrow 3, column 7: 68 movesrow 4, column 0: 1 movesrow 4, column 2: 1 movesrow 4, column 3: 2 movesrow 4, column 4: 2 movesrow 4, column 5: 1 movesrow 4, column 6: 4 movesrow 4, column 7: 73 movesrow 5, column 0: 1 movesrow 5, column 1: 1 movesrow 5, column 2: 1 movesrow 5, column 7: 65 movesrow 6, column 3: 2 movesrow 6, column 4: 1 movesrow 6, column 5: 2 movesrow 6, column 6: 5 movesrow 6, column 7: 143 movesrow 7, column 3: 1 movesrow 7, column 4: 1 movesrow 7, column 6: 38 movesrow 7, column 7: 151 moves

moves made from that square, log scale shared across panels
the 14-move route · × hazard, hidden until found · dot start · square goal

The untrained model paced between the start and the square beside it: 894 of 901 moves on two cells. One round of training sent it across the board and to the goal 12 times. The rebalanced second round passed its gate and then walked up and down the right-hand column, 748 of 833 moves, and never left it far enough to find the goal.

What I would not claim

  • Thirty episodes, two boards. Zero in 30 bounds the true rate below about 9.5%. Every "zero" here is a bound, not a proof.
  • One strong positive result. llama's round one is significant on its own. qwen's round-one gain (4 in 60 against 0) is not (p = 0.06).
  • Map memory was on for every training arm. Part of round one's gain is the model using that map.
  • There is a teacher throughout. A planner labels the moves and Claude built the pipeline. This is a small model taught by something that already knows the answer, not a model improving itself.
  • Round two's cause is diagnosed, not proven. Untested: whether a policy that mostly dies early yields useful training states at all; whether the rebalanced set (2,800 of the model's own states, down from 16,600) was too small; whether reason-before-move targets would let the stated reason steer the choice.
  • Quantisation in the loop is not separated. I ran no full-precision games, so how much Q4_K_M and temperature add to the pacing is unknown.
  • Board size is still the wall. At most one goal in sixty per round on the 16×16 board: 2 in 180 trained episodes across all three.
  • One gate, one miss. A single case, not a measured rate.
  • These are 1.5B and 3B models on a Pi. Nothing here says what a 7B or a frontier model would do.

The procedure is what I would keep

Branch Point 1.0 asked whether a small model can play the game. Branch Point 2.0 asked something narrower and more useful: what can you add to a small model from outside it?

Rules add confidence and leave the judgement where it was, so the model dies more decisively. Memory keeps the bigger model alive if it sits where the choice is made. It does nothing for the smaller one and finds no goals. Training on a good player's moves works, once, narrowly, on boards shaped like the training boards. Training again with the model's own mistakes added made it worse twice, the second time with the test written first.

The mask's 26 goals would have been the headline if I had not run it twice. Round two's diagnosis would have been the conclusion if I had not written down a test it could fail. The gate would have looked like a safety check if I had not sent a model that passed it to the board anyway.

At 3B, on a Pi, remembering helps if the memory sits in the right place. Learning from being wrong, at this size, with this data and this teacher, made it worse.

The second lesson took back the first.

References

  1. Ross, S., Gordon, G. J., & Bagnell, J. A. (2011). A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. AISTATS 2011, PMLR 15:627-635. https://proceedings.mlr.press/v15/ross11a.html
  2. Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., & Chen, W. (2021). LoRA: Low-Rank Adaptation of Large Language Models. arXiv:2106.09685. https://arxiv.org/abs/2106.09685
  3. Paxton, L. (2026). It Can Walk. It Cannot Choose. Branch Point 1.0. /essays/four-brains-one-maze