Who is still at the table, part II: the scorekeeper
Episode 4 of the ABC of language models, and Part II of “Chi resta al tavolo” (who is still at the table). Part I trained a small language model on transcripts of a calling game in which every mistake eliminates a player, and found that it keeps track of who is still seated by re-reading the game at every decision. This part moves that knowledge out of the model, one arrangement at a time, and then changes a rule after training. Episode 1, Clockwork and dice, ended on a promise: games where the valid answer depends on who is speaking, and the tool that keeps track when the model cannot. This is that episode. Everything is built and taken apart inside Impromptu, a modeling engine I built from scratch: my own research bench, not a product you can download. New ideas are explained in boxes where they first matter; the full measurements are in the appendices. The companion video is embedded below; the post is readable on its own.
TL;DR
Part I’s model knows who is still at the table because it looks back over the transcript every time it has to decide. It does this well, with a small leak, and it can follow only the rules it was trained on.
Here the same job is given to something outside the model, in four arrangements, and each one is measured on the same game:
- A mask. Before the model picks a name, the program removes the players who are out. The model can no longer call them. The other mistake of the game, saying one of four words that are not names, is left alone, because in this game a round ends only on a mistake. Games still finish (75 % on the tool model, 84 % on Part I’s), but they run longer: the program has taken most of the mistakes away, and by the last round a call ends the round about one time in nine instead of one in four. Forbid the four words as well and no round ever ends.
- An oracle. The program steps in at every call and writes the name itself. Games finish (98.1 %) and no call ever goes to a player who is out, because the program makes the calls; when it makes a mistake, at the game’s rate, the mistake is one of the four words. The model has no part in it.
- A tool. A model trained on games in which players ask a scorekeeper, a set of spreadsheet formulas, for the list of players they may call. The model asks at every place it should, 100 % of the time, and the answers are always right. With the list a few words before its decision, its leak onto eliminated players falls by 96 %.
- The tool unplugged. The same model, with nobody answering. It writes the list itself. 98.2 % of its lists are exactly right, and it plays almost as well as with the tool.
Then a new rule is typed into a cell after training: Pietro may call only odd numbers. The model on its own, the mask and the unplugged model follow it about as often as a player who had never heard of it would (between 46 % and 48 % of Pietro’s calls fall inside the rule, against 46 % by chance). The oracle follows it every time, because the program does. The tool model is the only model that changes its behavior: it follows the rule in 78 % of Pietro’s calls, against 43 % for a player who ignores it (75 % on average over three training runs). In its 20,000 training games the scorekeeper’s list never disagreed with what the model could work out for itself. Calling the tool and trusting its answer turned out to be two separate things to learn, and the training taught only the first.
At the end, Claude plays the game through Impromptu’s real tool server, reading the same spreadsheet cells, house rule included.
Where Part I left us
The game: ten players, eight rounds, Pietro, Paolo, and 1 through 8. Whoever is called speaks next and calls somebody else; calling yourself is not allowed. A round ends on a mistake, and a mistake is one of two things: calling a player who is already out, or saying one of four words that are not names, boh, nonno, ciao or cavolo. The player who makes it is eliminated, and the transcript records it once as X perde (“X loses”). The first two players still seated open each round. The two left at the end win. Nobody lies: every player slips at the same rate, one call in four, and the rate is a dial of the game engine (Part I works out the odds).
The model: a Transformer with two layers, trained on 20,000 transcripts. It names the right opener in every round and both winners in 9,997 games of 10,000. In the last round it puts 0.237 of its probability on eliminated players where the world puts 0.159. Opened up, it keeps no running scoreboard. One attention head marks every X perde line with the name of the player who lost, and two heads of the next layer look back at those lines whenever the model needs to know who is in.
Three limits came out of Part I. The model leaks a little, more as the table empties. It re-reads the whole game at every decision, and the game only gets longer. And it knows only the rules it was trained on.
Four places the knowledge can live
The function stays the same throughout: knowing who is still at the table. What changes is where that knowledge is kept and who decides to use it.
A language model does not write text by itself. It produces, at each step, a probability for every possible next word. A program around it picks a word, appends it, and asks again. That program is the harness. Every arrangement in this episode is a change to the harness, not to the model’s weights: the harness can remove words before the pick, write words itself, or run a tool and paste its answer into the text. Commercial AI assistants are the same at a much larger scale; the model is one component, and the harness around it decides what it sees and what it is allowed to say.
| where the knowledge lives | who decides to use it | |
|---|---|---|
| Part I | in the model’s weights and the transcript | the model |
| the mask | in the harness, which removes the players who are out before the pick | nobody: it always happens |
| the oracle | in the harness, which writes the callee itself | the harness, by a fixed rule |
| the tool | in a scorekeeper the model calls | the model, by writing a call |
| unplugged | in notes the model writes for itself | the model, and it also writes the answer |
The game, the vocabulary and the size of the model are the same as in Part I in every row, so every difference below comes from the arrangement.
The game has two mistakes, and they share one budget: at every free choice the mistakes together get one call in four (Part I works out the odds). The two are not alike.
- Calling a player who is out needs memory: the only trace of the elimination is a
X perdeline, possibly rounds back. This is the mistake that tests whether the table is kept, and the one the arrangements are about. In this part’s tables, “illegal names” means these players, and nothing else. - Saying one of the four words needs no memory: the words are mistakes in every round, whoever is seated. They are the game’s dice, not a lapse of knowledge, and with the eliminations they are the game’s clock: a round ends only when somebody errs.
Each arrangement below treats the two differently, and The arrangements side by side puts them together at the end.
Enter the harness
The harness is not new. It was there in episodes 1 and 2 and in Part I, doing the least a harness can do: it handed the transcript to the model, took back a probability for each of the 34 words of the vocabulary, drew one word at random by those odds, appended it to the transcript, and asked again. In training there was not even a loop: the model read whole transcripts written by the game engine and was scored, at every position, on the word that actually came next.
The model lane holds everything Part I took apart. The model reads the transcript, turns each word and its position into d_{\text{model}} = 64 numbers, passes them through two layers of four heads, and ends with one score per word of the vocabulary, the logits, which softmax turns into probabilities that add up to 1. The harness lane holds the draw and the append. The transcript is the only thing the two share: the model never sees the harness, only words.
Every arrangement in this episode changes the harness lane, each at a different point of the loop:
- the mask acts between the model’s scores and the draw (①);
- the oracle acts in place of the draw (②);
- the tool loop acts after the draw: it recognises a request in the words just drawn, and writes the answer words itself (③);
- unplugged is the bare loop again, run on a model trained with tool calls.
None of them changes the weights, or anything computed inside the model lane.
Two of the arrangements need words that the game itself never uses.
Which words. The mask and the oracle need none: the mask acts on the scores of words that already exist, and the oracle writes a word that already exists. The tool, and the tool unplugged, need four:
<TOOL>: “I am asking”;tavolo(“table”): which tool. There is only one, but it has a name, like a function;<RESULT>and</RESULT>: where the answer starts and where it ends, so that the harness and the model both know which words are the answer. The answer itself is made of names the game already has.
These words used by the tool should not be confused with the four words that are not names, boh, nonno, ciao and cavolo: those are part of the game, mistakes a player can make. The house rule of the last test needs no word at all: it lives in a spreadsheet cell, not in the text.
Why they were there from the start. The vocabulary is part of the model’s shape. The embedding matrix has one row per word (V \times d_{\text{model}}, in the notation of the QKV primer), and so has the matrix that turns the last layer into logits. A word added after training would be a row the model has never trained. So the four words were reserved from the beginning, in Part I’s model too: 34 words in all, the same in both parts, so that every comparison between them is like for like. Part I’s model never saw them used, and gives them a probability of about 3 in 100 million. That is not a neutral blank: every training step lowers the score of every word that did not come next, and these never did.
In training no harness and no tool run. The calls and their answers are already written into the training transcripts, the way Toolformer learned its tools (Schick et al., 2023), and every position is scored. From the same text the model learns three different things: when to ask (predict <TOOL> right after a free-choice X chiama); what the answer will be (predict every name of the list, which is why the loss floor falls from Part I’s 0.3814 to 0.1461 nats per word: the lists are words with no dice in them); and what to do with the answer (predict the callee after </RESULT>).
In use the same four words are seen from the harness’s side. With the tool, the model draws <TOOL> and then tavolo, one turn each; the harness, watching the last two words, recognises the call and takes over, runs the scorekeeper and appends <RESULT>, the names and </RESULT> without drawing; then it hands back. The model’s predictions at those positions are computed and ignored. Unplugged, the harness does not take over, so those predictions are drawn and become the list.
The distance from real systems. Commercial models also have special tokens that mark a tool call and its result, and the result is written by the harness, as here. One difference matters for this story: many fine-tuning recipes leave the tool’s answer out of the loss, so the model learns to ask and to use the answer, but not to predict it. We scored it, and that is what makes the unplugged notes possible. A model trained the other way should not be able to write them; that was not run here.
The mask: the program filters the answers
Before the model picks a name, the harness removes the answers that are not allowed. This is constrained decoding. The model still produces its probabilities; the harness makes the forbidden ones zero and picks among the rest.
Where exactly. At a callee position, right after X chiama, the model runs in full, as in Figure 3: embeddings, both layers, every head, and the 34 logits at the end. The harness then sets the logits of the forbidden words to -\infty, before softmax. Softmax turns -\infty into a probability of exactly 0 and rescales the others so that they add up to 1 again, which keeps the model’s own proportions among the words that are left: if the model liked 4 twice as much as 6, it still does. Then the harness draws as usual. Nothing inside the model is overridden, which is why its own probabilities, read before the mask acts, can be measured and are quoted below. At every other position the loop is the bare one.
The first attempt forbids both mistakes: the players who are out and the four words. Nobody can make a mistake any more, and in this game a round ends only when somebody makes one. So no round ends. On 200 games, not a single round was completed. The mistakes are the game’s clock.
The second attempt forbids only the players who are out, and leaves the four words, since they are the game’s own dice. Now the model never calls an eliminated player (its probability on them is zeroed), and the rounds still end, on a word. The games finish: 0.753 of them on the tool model, in 7.5 rounds out of 8 on average, and 0.835 on Part I’s model, against 0.903 and 0.923 without the mask.
The cost is time. As the table empties, more and more of the game’s mistakes are calls to eliminated players (none in round 1, seven of the eleven possible mistakes in round 8), and the mask removes them. In round 8 a call used to end the round one time in four; with only the four words left as possible mistakes, it ends the round about one time in nine. So games run longer: on the tool model 703 words on average, against 490 without the mask, still inside its room of 896 words (11.6 % of the masked games run out of it).
Under the mask the model does not know any better than before: its own probabilities, read before the mask acts, still put 0.119 on illegal names, where the world puts 0.110. The harness is doing the knowing.
In real systems this is structured output or JSON mode: the harness forces the model’s answer to follow a format, such as a valid JSON object or a schema. The distance from our case is that real masks almost always enforce format, not facts. Ours enforces a fact about the world, which is closer to a guardrail, and the first attempt shows the risk: a filter that removes every wrong answer can remove something the process depends on.
The oracle: the program steps in
Here the harness watches the transcript and, every time it sees X chiama, writes the callee itself from the true table. Three times in four it writes a seated player, chosen at random; one time in four, the game’s own error rate, it writes one of the four words. It never writes a player who is out. So the oracle errs too, exactly as often as the world says, and always with a word: what it removes is the leak, never the dice, and the clock keeps the game’s pace. The model never chooses a name.
Games finish (98.1 %), and no call goes to an eliminated player, because the harness wrote every call. The model’s own probabilities, read before the harness acts, are unchanged: they still put 0.131 on illegal names, where the world puts 0.102. The model is a passenger. Whatever the oracle gets right, the program gets right.
In real systems this is retrieval injected on every turn, context the harness adds to each request whether the model asked for it or not, and the validators and guardrails that rewrite or block an answer after the fact. Calling it tool use would overstate it. It is a policy written outside the model, and the model has no say in when it applies. Anthropic’s engineering guide Building effective agents (Schluntz and Zhang, 2024) draws the same line in practice: a workflow runs the model and its tools along code paths fixed in advance, as the oracle does, while an agent lets the model direct its own use of tools, as the tool model below does.
The mask and the oracle compared. Both act only at callee positions, and under both the model runs in full. The mask keeps the model’s choice and narrows it: the word is still drawn from the model’s own probabilities, among the words that are left. The oracle throws the model’s choice away: its probabilities are computed (0.131 on players who are out) and never used. The model still writes every other word of the game, the chiamas, the perde lines, the openers and the winners; only the callee is the program’s.
It follows that the oracle’s dice are not the model’s either. The harness draws them itself, from the game’s rule, and it decides where the mistakes go: here all of them onto the four words, the one mistake that needs no knowledge of the table. That is a choice made to keep the clock running without ever calling a player who is out. An oracle that refused the words too would be the mask’s first attempt by another route: no mistake, so no round could end. That follows from the rule; it was not run.
The tool: the model calls the scorekeeper
The third arrangement needs a new model. It is trained on the same games as Part I’s, with one difference: before every free choice, the player asks a scorekeeper for the list of players they may call, and the answer is written into the transcript.
The first rounds of a training game, as this model sees it:
<BOS> Pietro chiama Paolo <SEP> Paolo chiama <TOOL> tavolo <RESULT> Pietro 1 2 3 4 5 6 7 8 </RESULT> ciao <SEP> Paolo perde <SEP>
Pietro chiama 1 <SEP> 1 chiama <TOOL> tavolo <RESULT> Pietro 2 3 4 5 6 7 8 </RESULT> 7 <SEP>
7 chiama <TOOL> tavolo <RESULT> Pietro 1 2 3 4 5 6 8 </RESULT> 6 <SEP> 6 chiama <TOOL> tavolo <RESULT> Pietro 1 2 3 4 5 7 8 </RESULT> 8 <SEP>
8 chiama <TOOL> tavolo <RESULT> Pietro 1 2 3 4 5 6 7 </RESULT> Paolo <SEP> 8 perde <SEP> …
<TOOL> tavolo is the call (“table”), and the list between <RESULT> and </RESULT> is the answer: every seated player except the caller. The player still chooses, and still errs at the game’s rate: Paolo reads the whole list and says ciao, and 8 reads a list without Paolo and calls Paolo anyway. The tool returns data, not the decision. The four tool words are the ones reserved since Part I (see Words for the harness).
What the tool adds to the training games, and where. The training games are written by a program that knows the table. In the tool corpus every free call (every call but the opening one, Pietro chiama Paolo, which never asks) is written as one piece: X chiama <TOOL> tavolo <RESULT>, the list, </RESULT>, the callee. The question, the answer and the pick sit in the same call. A game carries about 32 lists, which is why it grows from about 190 words to about 490. In training the program wrote the whole line. In play the same line has two writers: the model writes the question and the choice, and the scorekeeper writes the list in between.
A tool call is a piece of text the model writes that the harness recognises as a request. The harness stops the model, runs the tool, writes the answer into the transcript, and lets the model continue. The model decides when to call; the tool decides what the answer is. This is how commercial assistants look up a price, query a database or run a calculation: the model writes the request, a program does the work. Our model learned its one tool the way Toolformer did (Schick et al., 2023): from training text in which the calls and their answers were already written in.
One call, on the two lanes of Figure 2, with the words in the order they enter the transcript (the first call of the game above, by Paolo):
The scorekeeper is a set of spreadsheet formulas in three datasets. One holds the transcript so far, one works out player by player who is seated and who may be called, and one writes the list. For the 10,000-game runs a program does the same computation faster; it was checked against the formulas on 1,000 games, and the two produce the same lists, character for character.
The program that wrote the training games is in the same model file, also as formulas: it rebuilds the first 300 of the 20,000 training games word for word from the game’s rules and the recorded random draws, as Part I’s model file does for its own corpus. Its list column is the same computation as the scorekeeper’s: everyone at the table but the caller. So the program that wrote the answers into the training games and the scorekeeper that answers in play are one formula. That generator knows only the trained world: the four words are written into it, and it never reads the house rule of the last test.
The model has the shape of Part I’s two-layer model (L = 2, h = 4, d_{\text{model}} = 64), with room for 896 words instead of 320, and is trained from scratch on the tool games by the same recipe: the main phase and then the settling phase (the anneal) of Part I (Appendix B). It ends on its loss floor.
Does it work? It calls the scorekeeper at every place the training games did, 100 % of the time, and the answers are always right. It finishes 90.3 % of its games. The practical question is whether the list helps it play, and it does:
| Part I’s model, on its own | the tool model, with the list | |
|---|---|---|
| leak onto eliminated players, rounds 3 to 8 (0 = none) | 0.051 | 0.002 |
| probability on eliminated players in round 8 (world: 0.159) | 0.237 | 0.161 |
| probability on illegal names beyond the world’s own rate | +0.028 | +0.003 |
The leak is Part I’s measure: how alive an eliminated player looks to the model, on a scale where 0 is the world’s value for a mistake and 1 is the world’s value for a seated player. It falls by 96 %, and in the last round the tool model is within 0.002 of the world.
Note what does not change. The tool model still calls players who are out at the world’s rate, and still says one of the four words at the world’s rate, as the players of its training games do (Paolo and 8 in the transcript above), because its training games contain both mistakes and it reproduces them. The list removes the leak, not the dice.
Why it helps. Part I’s model has to find up to seven X perde lines scattered over hundreds of words and combine them. The tool model has the answer a few words before its decision, in a list it only has to copy from. Copying from nearby is a much easier job for a Transformer than gathering facts spread across a long context. This is a reading of the structure: I measured the leak, not how the tool model’s attention divides between the list and the rest of the game.
There is a price. The lists more than double the length of a game, from 190 words on average to 490, so the model needs room for 896 words instead of 320, and it finishes slightly fewer games than Part I’s model (90.3 % against 92.3 %). I did not break down where the games that do not finish go wrong.
In real systems this is function calling, or tool use, and the loop of call, answer and continue is the ReAct pattern (Yao et al., 2023). The distance is large and worth stating. Our model learned one tool from its training games and cannot be told about another. A large model reads a written description of each tool in its context, decides from the description when to use it, and has never seen most of its tools during training.
Unplugged: the model writes its own notes
Same weights, one switch: the harness stops answering. The switch is a setting of the harness at play time. The training games, the training and the weights are those of the tool model; nothing new was trained. The model still writes <TOOL> tavolo, nobody replies, so the model goes on drawing and writes <RESULT>, the list and </RESULT> itself, then its pick. The notes look exactly like the scorekeeper’s, but now the model wrote them, and they can be wrong.
Where the notes come from. With the tool, the list is the output of a rule executed on the state: the scorekeeper’s formulas read the transcript, work out who is seated, and leave out the caller. Unplugged, nothing executes that rule. The model writes the list because it was trained to predict it: in each of its 20,000 training games every list was written by the generating program, about 32 lists per game, and every word of every list was scored like any other word (Words for the harness). With the tool plugged in, the model’s own guess at each list was computed at every call and never used: the harness wrote over it. Unplugged, that guess becomes the list.
The training games carry two kinds of content, and the model learned both from the same text. One is the dice: whom a player calls, and when a mistake comes, which is random and can be learned only as odds. The other is the bookkeeping: who is out and who may be called, which follows with certainty from what has been said. The bookkeeping becomes near-certain predictions. Part I’s model used that ability silently, at the choice, and leaked. The tool games write the bookkeeping out about 32 times a game, so this model learned to write it. Plugged in, that second ability sits idle: the scorekeeper reads the game and writes the list in its place. Unplugged, nobody does, so the model writes the list itself, from what it learned.
It learned from the answers the generating program wrote into the training games, and was scored on predicting them; it did not learn from running the tool. So the model has learned to imitate the rule’s outputs from examples, not to apply the rule. Under the rules it was trained on, imitation and execution produce the same list, and the measurements below say how closely.
They are rarely wrong:
- 98.2 % of the lists it writes are exactly right, from 99.9 % in round 1 to 96.2 % in round 8. The caller appears in their own list in 0.02 % of the lists.
- It writes an eliminated player into a list with a probability of about 0.002 to 0.004 per player, about the same for a player who left last round as for one who left seven rounds ago. Part I’s model, at the free choice, left a leak of 0.024 to 0.067 on each eliminated player.
- It plays almost as well as with the tool: 87.6 % of games finish (with the tool, 90.3 %), and its excess on illegal names is +0.004 (with the tool, +0.003).
Watched one word at a time, the unplugged model looks amazingly smart. Take Pietro’s question in round 2 of the rehearsal game (Appendix D): 3 said boh in round 1 and is out, and the transcript ends Pietro chiama <TOOL> tavolo <RESULT>, with nobody answering. In the app, the model’s likeliest next word is Paolo, almost certainly; written in, the next is 1, then 2, then 4. It skips 3. It writes the scorekeeper’s list as if the call had been answered. So why keep a scorekeeper at all? Three reasons, and the first is arithmetic.
- Cost. To write one word, the model runs its whole calculation again: every word of the transcript so far goes through both layers. At this question (67 words of transcript) that is about 7.9 million multiply-adds (a multiplication and an addition each) for one word, and about 76 million for the nine words of the list. Real systems keep the earlier words’ intermediate results (a KV cache), which brings the list down to about 1 million. The scorekeeper answers with 67 spreadsheet cells, and its biggest job is to look for
X perdein the 335-character transcript once per player: about 3,350 character comparisons. The model’s cost also grows with the game: at an average training game’s length, 490 words, one pass is about 111 million. - Certainty. The formulas are right by construction. The model’s lists are right 98.2 % of the time.
- Currency. The formulas read whatever rule is in their cells, including one typed in after training (next section). The model’s notes keep the rules it was trained on.
These are counts of arithmetic from the model’s shape (two layers, 64 numbers per position, a feed-forward of 256, 34 words), not timings.
How the model builds the list was not measured on this model. Two readings fit what was measured. One is Part I’s finding: the roster is fetched by attention from the X perde lines when the question is asked. The other is a shortcut the tool games offer: the previous list is a few dozen words back, and the new one is that list with the new caller taken out and the previous caller put back; after an elimination, one name is gone for good. A list copied that way would leak by the same amount whatever the distance, as measured. Either way, the notes restate the state close to where it is needed, which is the same reason a written working note helps a person.
The notes have one weakness the next section exposes. They are as true as their writer, and their writer imitates the rule it was trained on; it does not run it.
In real systems this is a scratchpad or chain of thought, the notes, to-do lists and memory files that agents write for themselves (Anthropic’s guide to context engineering calls it structured note-taking, “like Claude Code creating a to-do list, or your custom agent maintaining a NOTES.md file”), and also the failure in which a harness does not run a tool call and the model writes a plausible answer in its place. The notes help because they restate the state near the decision, and they are only as reliable as the model that writes them.
The house rule: a rule typed in after training
This test is aimed at the tool. The house rule is typed into a cell that the scorekeeper reads, so it changes the tool’s answers, and only them; nothing can change the model’s weights after training. The other arrangements are run under the same rule as controls: the oracle’s program is given the rule, the mask is not, and the model on its own and the unplugged model have only their weights.
The rule: Pietro calls only odd numbers (1, 3, 5 or 7). A call outside the rule counts as Pietro’s mistake and costs Pietro the seat. The weights cannot know about it. The scorekeeper reads the cell, so its lists now leave out the even numbers whenever Pietro asks.
The rule makes the answer depend on who is speaking, the question episode 1 left open: the same table of seated players, asked by Pietro, gives a different list than when anybody else asks.
The follow rate is the share of Pietro’s calls to seated players that fall inside the house rule. A player who follows the rule scores 1. A player who has never heard of it still lands on an odd number some of the time by chance, about 0.43 to 0.47 depending on who is seated in the games of each arrangement. That rule-blind rate is the baseline: an arrangement only follows the rule to the extent that it beats it.
10,000 games per arrangement:
| arrangement | follow rate | rule-blind player, same games | |
|---|---|---|---|
| the model on its own (Part I’s) | 0.476 | 0.461 | ignores it |
| the mask | 0.468 | 0.465 | ignores it |
| unplugged | 0.465 | 0.462 | ignores it |
| the oracle | 1.000 | 0.443 | follows it; the program does |
| the tool | 0.776 | 0.428 | the only model that moves |
The model on its own follows the rule within 0.015 of a player who has never heard of it. That is the expected result, and the reason for the test: a rule changed after training is out of reach of the weights. The mask does not include the house rule, so it changes nothing. The unplugged model writes notes under the rule it learned: under the house rule only 92.5 % of its notes are true, because it keeps writing even numbers into Pietro’s lists.
The tool model is the only model whose behaviour changes. The same weights put 0.465 of their probability on the players the rule forbids when they write their own list (unplugged), and 0.189 with the scorekeeper’s true list in front of them. A model that trusted the list completely would put 0 there. It follows the rule in about three calls of four, and closes 61 % of the gap between ignoring the rule and following it. The tool model was trained three times from different random starting points; the run shown here follows the rule 0.776 of the time, and the three runs average 0.752, spread about ±0.03 (rule-blind 0.436).
Why three in four, and not four in four. In the 20,000 training games the scorekeeper’s list was always “every seated player except me”, which the model can also work out from its own reading of the game. The list and the model’s memory never disagreed, so the training never rewarded believing the list over the memory. When they disagree for the first time, the model splits its probability between the two. It learned to call the tool. It did not learn, because nothing taught it, that the tool is right when the two differ. If this reading is right, a model trained on games in which the list sometimes disagrees with its memory would learn to trust it.
Large models show the same behaviour with retrieved documents: when a document contradicts what the model learned in training, it does not always follow the document (studied as knowledge conflicts, e.g. Longpre et al., 2021). The distance from our case is that a large model is also told, in words, to rely on what it retrieves, and can be. Ours cannot be told anything.
Because each forbidden call costs Pietro the seat, the tool model finishes only 16.5 % of the games under the house rule, about one in six (Appendix A). Following a rule three times in four is not enough to play by it.
One head, switched off
Part I switched off attention heads one at a time to see which ones the model relies on. The same switch exists on the tool model. I switched off each of its eight heads in turn on two questions: Pietro’s question with the plain list, and the same question under the house rule, with the scorekeeper’s answer in place (the transcript ends Pietro chiama <TOOL> tavolo <RESULT> 1 5 7 </RESULT>). With every head on, the model’s three likeliest next words under the house rule are 1, 5 and 7, at 0.27, 0.15 and 0.13, and it puts 0.04 on Pietro, the caller.
Switch off the third head of the first layer, and Pietro enters the top three, at 0.15: the model would call the caller, which the game does not allow. Switch the head back on and Pietro drops out again. With the plain list the same head, switched off, raises the caller from 0.002 to 0.085.
That head is not the only one that matters, and it does not do one job alone. Under the house rule, the eight switches move the model’s probability like this:
| head switched off | on the names in the list (1, 5, 7) | on the caller | on players who are out |
|---|---|---|---|
| none | 0.538 | 0.042 | 0.021 |
| layer 1, head 3 | 0.404 | 0.150 | 0.011 |
| layer 2, head 4 | 0.492 | 0.119 | 0.011 |
| layer 2, head 1 | 0.524 | 0.071 | 0.018 |
| layer 2, head 3 | 0.353 | 0.037 | 0.045 |
| layer 2, head 2 | 0.480 | 0.036 | 0.047 |
| layer 1, head 1 | 0.491 | 0.008 | 0.011 |
| layer 1, head 2 | 0.535 | 0.037 | 0.020 |
| layer 1, head 4 | 0.522 | 0.033 | 0.022 |
Three heads keep the caller off the choice, by different amounts. Another head, the third of the second layer, holds the model’s choice on the list more than any other; with it off, the list’s share falls from 0.538 to 0.353. Two heads, both in the second layer, keep players who are out down. One head, the second of the first layer, changes almost nothing here. So even in a model of eight heads, reading the list and keeping the rules is spread over several heads, some contributing much more than others, and no head is a single line of a program that could be read off and rewritten. Part I found the same about how the model keeps the table: one head marks the eliminations and two others share the look-up. These are two questions, not a measurement over many games, so the table describes this model on these two transcripts; it does not assign each head a measured role.
Same tool, two callers
The last test needs no training. The same model file, with the scorekeeper’s three datasets, is opened in Impromptu, and Claude plays the callers through the Model Context Protocol (MCP), the standard way for an AI assistant to discover and use the tools a server offers. Impromptu ships an MCP server. Claude writes the transcript into the scorekeeper’s input cell with one tool (write) and reads the answer with another (read); every write recalculates the three formula datasets.
The method, as rehearsed with a fresh Claude session that had never seen the game (Appendix D; the filmed session is a different one):
- Claude is told the rules in a short prompt, including that a mistake is a player already out or one of the four words, and plays from the opening question,
Paolo chiama <TOOL> tavolo. Each turn it writes the whole transcript, reads the list, appends it and the pick, and goes on. - It is asked to let one caller slip with a word. In the rehearsal,
3read its list and saidboh:3 perde, and the next lists left3out. - It stops when Pietro has asked, in round 2. With no house rule, Pietro’s list is
Paolo 1 2 4 5 6 7 8. - The house rule is written into its cell,
{"Pietro": ["1", "3", "5", "7"]}, and the same question now answers1 5 7. The scorekeeper’s middle dataset shows why, player by player: 1, 3, 5 and 7 allowed,3out, 1, 5 and 7 kept. - Claude picks from the new list, and both cells are put back. The model is not saved.
TableInput (top), the scorekeeper’s TableState player by player (middle), the answer 1 5 7 in TableResult (bottom), and Claude’s own reading of the table on the right.
The same cells served two callers. The small model learned the tool from 20,000 games and cannot be told about it. Claude had never seen the game, and was told about the tool by the protocol’s list of tools, the names of the datasets and a paragraph of rules. In the rehearsal it worked out the layout of the transcript from the scorekeeper’s own formulas. That gap is the distance between the miniature and a real assistant. Our own tool loop is not MCP: MCP adds the discovery of tools, their written descriptions, and a wire protocol between programs. Ours has a single tool, known in advance.
The arrangements side by side
Each arrangement, against the two mistakes and the house rule, over whole games (Appendix A; “the world” is the odds the training games were drawn from):
| arrangement | calls to players who are out | saying one of the four words | house rule: follow rate (rule-blind) |
|---|---|---|---|
| the world | 0.096 to 0.110 of each free choice, depending on the mix of rounds | the rest of the one in four | |
| Part I’s model on its own | the world’s share, plus a leak of +0.028 | as the world | 0.476 (0.461) |
| the mask | none: the harness removes them | the only mistake left; the rounds end later | 0.468 (0.465) |
| the mask, the four words removed too | none | none: no round can end | |
| the oracle | none: the harness writes the calls | the whole one in four, written by the harness | 1.000 (0.443), the program’s |
| the tool | the world’s share, plus a leak of only +0.003 | as the world | 0.776 (0.428) |
| unplugged | the world’s share, plus +0.004 | as the world | 0.465 (0.462) |
Three things follow. Only the harness can stop a mistake outright; the mask and the oracle do it by acting on the model’s answer, not by improving it. The tool does not make the model err less than the world: its training games still contain both mistakes at the game’s rate, so a faithful model still makes them. What the tool removes is the leak, the part of the first mistake that comes from losing track of the table; the four words are untouched in every arrangement in which the model chooses, and should be, since they are the game’s dice. And of the arrangements in which the model chooses, only the one that reads the tool’s answer moves under a rule the weights cannot know.
What this means outside a toy
Every AI assistant that works on financial data faces the choices of this episode, usually without naming them. The data it needs (a client’s positions, a covenant threshold, today’s rates) can live in the model’s memory of the conversation, in a filter on its output, in a lookup the system always performs, in a tool the model calls, or in notes the model writes. Each arrangement puts responsibility in a different place.
Four points carry over from the measurements.
- A filter must leave the process the moves it runs on. Forbidding every mistake stopped every round, because the mistakes were how the game ran. Forbidding only the calls to players who are out kept the games going, longer and a little less often to the end (75 % against 90 %). A check that blocks out-of-policy answers is safe only if the process does not depend on those answers occurring, and its side effects on the process should be measured, not assumed.
- An always-on lookup is correct by construction, and the model learns nothing. The oracle followed the new rule perfectly; the model’s own view stayed rule-blind. Whatever the program gets wrong, nothing downstream catches.
- A tool the model calls improves its accuracy, and calling is not trusting. The tool model asked every time and cut its leak almost to nothing. When the tool’s answer contradicted what it had learned, it followed the tool about three times in four. A system that relies on a model reading fresh data should be tested specifically on the cases where the data contradicts what the model would have guessed, such as a rate that changed or a rule that was amended, because agreement during normal operation says nothing about those cases.
- Notes the model writes look like tool output. They were right 98.2 % of the time under the trained rules and wrong in the old way under the new one. A note is only as current as the model that wrote it.
This is the last game of Pietro chiama Paolo, and the one I learnt the most from. What comes next in the language model series is a new table: stories instead of calls, with TinyStories, and LoRA tuning of real open-source language models of a few gigabytes.
How the miniature maps onto the real thing
| here | the real thing | where it holds | the distance |
|---|---|---|---|
| the mask | structured outputs, JSON mode, strict tool schemas; grammar-constrained decoding (llama.cpp grammars, Outlines, XGrammar, Guidance, vLLM guided decoding) | the same mechanism: illegal words removed before the pick | real masks enforce format and schema, almost never facts; ours enforces a fact |
| the oracle | retrieval injected on every turn; context a harness adds by itself (system reminders, hooks); output validators and guardrails (NeMo Guardrails, Guardrails AI) | the harness, not the model, decides when; a workflow in the sense of Building effective agents (Anthropic, 2024) | a policy outside the model, not tool use |
| the tool | function calling and tool use in commercial models; the ReAct loop (Yao et al., 2023); Toolformer (Schick et al., 2023) | the model writes a call, the harness runs it and writes the answer, the model continues; an agent in the sense of Building effective agents | ours knows one tool, learned from training text, and cannot read a tool’s description |
| the harness | agent frameworks (Claude Agent SDK, OpenAI Agents SDK, LangGraph, LlamaIndex, CrewAI, AutoGen) | the loop of call, parse, run, append, repeat | frameworks add many tools, memory, retries, permissions and several agents |
| the scorekeeper’s datasets | a tool server; here, read by Claude over Impromptu’s MCP server | a server holding state the model does not have | MCP adds discovery, schemas and a wire protocol; our loop has none of these |
| unplugged | scratchpads and chain of thought (Nye et al., 2021); agents’ notes, memory files and to-do lists (“structured note-taking” in Anthropic’s Effective context engineering for AI agents, 2025); hallucinated tool results | the state restated near the decision, in the model’s own words | the notes are as true as the model that writes them |
See it happen in the companion video
The companion video (embedded at the top) tells this story in twenty-two minutes, and four of its passages run live in Impromptu, on the tool model. In the first (from 8:39) the scorekeeper is opened dataset by dataset: the transcript so far, who is seated and who may be called, player by player, and the list it returns. In the second (from 12:25) the two flows answer the same question, on a transcript where player 2 is asking and nobody is out yet. Written in one word at a time, the model’s list runs Pietro Paolo 1, then 3, skipping 2, the caller; the scorekeeper’s formulas return Pietro Paolo 1 3 4 5 6 7 8 in one recalculation. In the third (from 17:46) a fresh Claude session, not the one in Appendix D, plays the callers over MCP. The game it plays out matches the rehearsal: 3 reads its list and says boh, 3 perde, and in round 2 Paolo’s list leaves 3 out. Pietro’s list is Paolo 1 2 4 5 6 7 8; with the house rule written into its cell it becomes 1 5 7, and Claude picks 5 (Figure 8). In the last (from 20:58) the third head of the first layer is switched off by hand on Pietro’s house-rule question, and Pietro enters the top three at 0.15; switched back on, he drops out.
That is possible because the whole thing lives inside Impromptu, a modeling engine I built from scratch, where the model’s weights and its scorekeeper are tables in the same file. Impromptu is my own research bench, not a product you can download. The video is the window onto it.
Further reading on this blog
- Part I: a small model keeps the score by heart: the game, the model on its own, and how it keeps the table.
- Lying dice and Clockwork and dice: episodes 2 and 1, the same game before eliminations.
- Opening the hood: a Transformer as a spreadsheet: how a model and its tool can both live in the same spreadsheet.
- Forecasting with an AI assistant: Claude building a financial model through the same MCP server.
Appendix A: the grid in full
10,000 games per cell unless stated; temperature 1 (the model’s own probabilities, no sharpening); the same random seed in every row. Columns under the trained rules: games finished, rounds played (8 is a full game), the share of free choices that went to a legal callee, and the probability the model itself puts on illegal names at a free choice (in brackets, its excess over the world’s own rate; after the mask or the oracle the realised value is 0 and the model’s own value is in brackets). Under the house rule: the follow rate (rule-blind baseline), the share of the model’s probability on the seated players the rule forbids (before any harness acts; the rule’s value is 0), and games finished.
| arrangement | model | finished · rounds · legal pick · illegal mass | house rule: follow (blind) · forbidden mass · finished |
|---|---|---|---|
| on its own | Part I’s | 0.923 · 7.707 · 0.719 · 0.124 (+0.028) | 0.476 (0.461) · 0.442 · 0.428 |
| mask | Part I’s (room for 320) | 0.835 · 7.712 · 0.832 · 0 (model 0.144, +0.035) | 0.476 (0.461) · 0.428 · 0.274 |
| mask | tool model (room for 896) | 0.753 · 7.521 · 0.843 · 0 (model 0.119, +0.009) | 0.468 (0.465) · 0.453 · 0.244 |
| mask, four words too | tool model, 200 games | 0.000 · 0 rounds · 1.000 · 0 | |
| oracle | Part I’s | 0.981 · 7.959 · 0.750 · 0 (model 0.131, +0.030) | 1.000 (0.443) · 0.452 · 0.980 |
| tool, program | tool model | 0.903 · 7.699 · 0.752 · 0.102 (+0.003) | 0.776 (0.428) · 0.189 · 0.165 |
| tool, formulas | tool model, 50 games | 0.920 · 7.460 · 0.760 · 0.103 (+0.002) | 0.722 (0.440) · 0.187 · 0.100 |
| unplugged | tool model | 0.876 · 7.644 · 0.750 · 0.104 (+0.004) | 0.465 (0.462) · 0.466 · 0.377 |
“Illegal” here means the players already out (and, under the house rule, the seated players it forbids); the four words are not counted, so legal pick and illegal mass do not add up to 1, and the remainder is mostly the four words. Every mass is taken over the ten names and the four words together. The world’s own illegal mass, the eliminated players’ share of the game’s one in four, 0.25\,m/(4+m) per free choice with m players out, is 0.096 to 0.110 depending on the round mix. “Tool, formulas” runs the same loop with the answers computed by the spreadsheet formulas instead of the program; its games are the program’s games word for word, and its 50 games are too few to compare its rates with the 10,000-game row. Delegation (the model writes the tool call where the training games had one) is 1.000 in every tool-model cell (lowest 0.9997). The pick lands inside the list 0.752 of the time, the world’s 0.75. The lists are right 1.000 with the tool and 0.995 unplugged (0.925 unplugged under the house rule). Under the mask the tool model’s games average 703 words (11.6 % run out of room); Part I’s model, with room for 320, averages 247 (7.8 % run out).
Two notes on the oracle. On the tool model it fails in round 1 of every game (1,000 of 1,000): it writes X chiama <callee> with no list, a shape that model never saw, so its row is measured on Part I’s model. And 11 of the 20,000 oracle games on Part I’s model stopped at a round with a single player seated, after the model had written a wrong X perde; they are counted as unfinished.
With the four words masked as well, 199 of the 200 games ran out of space, and the model’s own notes broke down (exactly right in 0.815 of round 1’s lists and 0.070 of round 2’s): it had never seen a round without a mistake.
Appendix B: the tool model’s training
Part I’s recipe: two layers, four heads, 64 numbers per position, learning rate 1e-3 for 60 passes over the 20,000 games, then the anneal, 5 passes at 1e-4. The games are the same as Part I’s corpus (the same random seed), with the tool calls and lists written in; only games that fit in 896 words were kept.
The model was trained with the PyTorch path described in Part I’s Appendix C, on the Mac Studio’s graphics processor: about 13 minutes per run (700 seconds for the 60 passes, 87 for the anneal). On that path one run is one draw: the same seed does not give the same run twice, so I trained three runs and kept the middle one.
| run | validation loss after the anneal (distance from the floor) | house rule: follow (blind) · finished |
|---|---|---|
| 1 | 0.1471 (+0.0010) | 0.764 (0.438) · 0.239 |
| 2, the one in this post | 0.1472 (+0.0011) | 0.776 (0.428) · 0.165 |
| 3 | 0.1479 (+0.0018) | 0.717 (0.440) · 0.198 |
| mean | 0.1474 | 0.752 (0.436) |
The floor is lower than Part I’s (0.1461 nats per word against 0.3814), because the lists are deterministic words the model can predict exactly, so the dice are a smaller share of what it is scored on: free choices are 6.5 % of the scored words here and about 17 % in Part I. The test of “on the floor” was scaled to allow the same error per free choice as in Part I, which here is +0.006 per word; all three runs pass it.
Appendix C: the notes against Part I’s leak
Teacher-forced on 10,000 fresh games: the model reads the true transcript, and its probabilities are scored at each position. The leak is on Part I’s 0-to-1 scale (0 = treated as out, 1 = treated as seated), pooled over rounds 3 to 8, for a player out for s rounds:
| s | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| Part I’s model, at the free choice | 0.067 | 0.056 | 0.051 | 0.045 | 0.038 | 0.029 | 0.024 |
| tool model, at the free choice after a true list | 0.007 | −0.005 | 0.002 | 0.004 | 0.004 | 0.002 | 0.000 |
| tool model, writing an eliminated player into its own list | 0.0001 | 0.0002 | 0.0001 | 0.0001 | 0.0002 | 0.0002 | 0.0004 |
Pooled over all s: 0.051, 0.002, 0.0002. With the true list a few words back, the tool model’s leak at the choice is at the level of noise; some cells are slightly below 0, where the model gives an eliminated player a little less than the world does. Within a list the model writes the caller with a probability of at most 0.0001 and leaves out a seated player with at most 0.0015 per slot in round 8. In free play, where its own earlier mistakes stay in the transcript, the unplugged model wrote an eliminated player into a list at a rate of 0.0020 to 0.0037 per player at every distance s.
Appendix D: the MCP rehearsal
A fresh Claude Code session, connected to Impromptu’s MCP server, given the three prompts of the protocol and nothing else before them; not the filmed session. In order:
- The question already installed,
… Paolo chiama <TOOL> tavolo, answered<RESULT> Pietro 1 2 3 4 5 6 7 8 </RESULT>. Claude picked 3;3 chiama <TOOL> tavoloanswered<RESULT> Pietro Paolo 1 2 4 5 6 7 8 </RESULT>. - Claude, as 3, said
boh, a mistake by the rules:3 perde. Round 2 openedPietro chiama Paolo; Paolo asked and gotPietro 1 2 4 5 6 7 8, picked Pietro;Pietro chiama <TOOL> tavoloanswered<RESULT> Paolo 1 2 4 5 6 7 8 </RESULT>. - The house rule was written into the rule cell (
{"Pietro": ["1", "3", "5", "7"]}). The same question answered<RESULT> 1 5 7 </RESULT>. Claude read the scorekeeper’s middle dataset as a table, explained that a player is kept when seated, not the caller and allowed by the rule, and that 3 is allowed but out, and picked 5. Both cells were reset and the model was not saved.
Before playing, Claude worked out the layout of the transcript (only the pick after </RESULT>) from the scorekeeper’s formulas, and said that it had not checked the training games.
Glossary: this episode’s additions
Part I’s glossary covers the elimination game, state, the leak, the learning rate and the anneal. New here:
Harness. The program around a language model that turns its probabilities into text: it picks each word, and can remove words, write words, or run tools.
Constrained decoding (the mask). The harness removes forbidden words before the pick. Used in practice to force a format.
Oracle. Here, a harness that writes the callee itself whenever a call begins, by a fixed rule outside the model.
Harness words. Vocabulary words reserved for the harness, never used by the game itself: <TOOL>, tavolo, <RESULT>, </RESULT>. Present since Part I, so that both parts share one vocabulary of 34 words. Not to be confused with the four words that are not names, boh, nonno, ciao and cavolo: those are part of the game, mistakes a player can make.
Tool call. Text the model writes that the harness recognises as a request; the harness runs the tool and writes the answer into the transcript.
Delegation rate. The share of the places where the training games called the tool at which the model writes the call.
Unplugged. The tool model with the harness not answering, so that the model writes the answer itself. A scratchpad.
House rule. A rule added after training by typing it into a cell: Pietro calls only odd numbers.
Follow rate, rule-blind baseline. The share of Pietro’s calls that obey the house rule, against the share a player ignorant of it would reach by chance in the same games.
Model Context Protocol (MCP). An open standard by which an AI assistant discovers the tools a server offers, reads their descriptions and calls them.


