llmby bluegreyboxes
Stage 2 of 7 · The what-comes-next tally

Count what follows each letter. Then roll a die to write.

Your model can turn text into numbers. Now it needs its first guess about what comes next. The simplest guess there is: read the text, and for every letter keep a tally of the letter that came straight after it.

  1. ✓ 1Do it by hand
  2. ✓ 2Build it
  3. 3Watch it work
  4. 4Say it back
  5. 5Name it
Your tally, running45 neighbour pairs counted
this letter → (row) · came next → (column) · pick a row
␣.acehimnost
···2·111·213
1···········
···········5
··2·········
4···········
··1·4·······
··········1·
··1·········
2···········
········2···
1·1·········
32···4······

After “t”one row, as shares

  • h4 · 44%
  • ␣3 · 33%
  • .2 · 22%
the die for this letter

A row is the whole idea. Turn its counts into shares and you have a die with lopsided sides: letters that followed more often get more of the die.

Let it write roll, move, roll again

starts at “t”, the first letter of your text

It looks at one letter only, so it can't spell. But the pairs are right: it writes “th”, “at” and spaces in about the right places. Every later stage is a better way to guess this same next letter.

Word book · 3 words waiting
• • • • • •

These boxes have real names. They unlock once you can rebuild the tally and the die from a blank page, without looking.