← Field Notes timeline
Field Notes · Part 23 · Oct 24, 2026

The Final Pi: Licensed, Resettable, and Full of Easter Eggs

The Raspberry Pi version of HoldemRobots.AI is finished and licensed. There is now one way to install it, a do-over button for when you break it, ways to keep your work safe, and a spoiler folder for when you give up on the three doors.

By Kevin Swinson, with ClaudettePart 23Raspberry PiFor students and teachersLicensing

In Part 12 the table fit in your hand for the first time. In Part 22 it got a student table with three doors left open. This article is the finish line for the Pi: the release that brings those together, with a license on it, so Kevin can give it away and you know exactly what you're allowed to do with it.

The website and the Pi

They share the same twenty-year-old poker engine, made honest in July. Where they split is the AI agents.

The websiteThe Pi
The poker engineThe 2006 engine, fair versionThe same engine
Review and analysisEvery game, hand by handThe same tools
Bots you writeRobot Wars: paste your bot into a page in the browserThe student table: up to six bots in one text file, run from the terminal
AI agentsThe thinking seat and the heads-up table, explaining every moveNot included
InternetNeededNot needed

The Pi stops just short of the AI agents, mostly because they need the internet. The agent’s brain is a large language model running in the cloud, and every decision is a call to it. A Pi that works anywhere, in a classroom with no network or a kid’s bedroom, can’t depend on that.

What the Pi does have is room to grow toward them. One of the advanced Pi lessons is memory: a student bot that remembers how its opponents play, from hand to hand, using only what a player could see. That’s the same idea the AI agent works toward online, built by a student, offline.

Five ways to play

Put the website and the Pi together and there are now five ways to sit at the table:

#Way to playWhereHowInternet
1Play it yourself, against nine robotsWebsiteClick through the Advanced Hold’em SimulatorYes
2Robot Wars: your bot against the house botsWebsitePaste your bot into a page in the browserYes
3Heads-up against the AI agentWebsitePlay in the browser; the agent explains its movesYes
4Play it yourself, against nine robotsPiThe same simulator, in the Pi’s browserNo
5The student table: up to six bots against each otherPiOne text file, run from the terminalNo

Number 5 surprised even Kevin. He pictured it like Robot Wars: paste six bots into a page and press play. It isn’t a page. The six bots go into one text file in the Pi’s hr2/api folder, and you start the table with one command from there:

python3 student_table.py class_bots.txt

Add --duplicate to the end for the round robin, where everyone plays the same cards. Results print on the screen and are saved in student_runs. The kit ships with class_bots.txt, a ready-made class of four student bots and two house bots, so the first run needs no writing at all.

You don’t need six people, either. One student can write all six bots, or fill the empty seats with house bots by adding a line like # === HOUSE: grinder ===. That makes the student table the Pi’s own Robot Wars: your bot against the house, offline.

A paste-your-bots page on the Pi, like the website’s, is on the idea list for a later release.

What's in the box

The release is one file, about 46 MB. Everything you need, and nothing that isn't Kevin's to give.

PartWhat it does
The websiteThe same table, review pages and analysis tools as the site, opened from a browser on the Pi itself.
The ledgerA copy of the game database, so the review tools have real games in them from the first day.
The student kitThe student table from Part 22, the example bots, a sample class file and a README. Every file is yours to edit.
A class of oneYou don’t need a class. One student can write all six bots and run the whole table alone.
The do-over buttonreset_pi.sh: puts things back the way they shipped. More on it below.
The spoiler folderWorking answers and a checklist of the course’s hidden lessons. Behind a STOP sign.
The licensesKevin’s license, plus the license of every outside library inside.

It runs with no internet and no account, and it listens only to the Pi itself. Nothing on it is reachable from the network.

One way to install it, and why

We tried several ways to get the table onto a Pi this summer. One of them is now the only supported way: the Pi builds the table itself, with Docker, from the release file.

Docker runs the table in containers, sealed boxes that each hold one piece: the web server and Java in one, the database in the other. When you install, the Pi reads the recipe in the release and downloads those pieces fresh from their official sources, built for the Pi’s own chip. Here’s why that won out:

What about the other ways?

Other wayWhy it isn’t the official one
A ready-made card image you just flashFastest for a classroom, but Kevin would become the distributor of Tomcat, Java and PostgreSQL, with their license notices to carry. Maybe someday. Not in this release.
Copying the website’s containersBuilt for a different chip. Runs, slowly, under emulation.
Installing Java, Tomcat and PostgreSQL directly on the PiWorks, until one of them updates and the 2006 code doesn’t like it. That’s the 2015 problem again.

None of these are wrong. Comparing them is a good student project. Do it on a spare card, not the one that works.

Do a full deploy

If you have an older Pi build from this summer, don’t install on top of it. Start fresh, ideally on a new card. The old build and the new one use the same names for their containers and database, and a half-old, half-new Pi is the hardest kind to debug. A new microSD card costs about ten dollars and keeps the old one as a fallback.

No spare card? Then wipe just the old build, not the whole card. Raspberry Pi OS stays as it is; you stop the old table, delete its containers, its database and its Docker images, and move its folder out of the way. That’s what Kevin did on October 24, and it gave the same clean start without needing another computer to reflash the card.

What you need:

ItemNeed
BoardRaspberry Pi 4 or 5. 4 GB of memory works; 8 GB is better.
Operating systemRaspberry Pi OS, 64-bit. The 32-bit version can’t run it.
StorageA 32 GB card at least. A USB SSD is faster and lasts longer.
InternetOnce, during the install, to download the pieces. Never again after that.

First check you really are on 64-bit. This should print aarch64:

uname -m

Then install Docker and give yourself permission to use it:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

Log out and back in. Then put the release file in your home folder as hr2-pi-release.tgz, unpack it into ~/hr2, and follow the README inside: build, start, load the database, and play a hand in the browser. The first build takes a while on a Pi. Time it; it’s a good number to know before you plan a class around it.

Keep the release file where it is. The do-over button rebuilds from it.

What the first real install taught us

On October 24 Kevin installed the release on his Pi the way a kid might: the release file on a USB stick, the commands read off a phone and typed by hand. From wiping the old build to a hand dealt in the browser took under an hour. Then he turned off the Wi-Fi and played again. Everything worked offline: the table and Game Review for old games, including the cheat games from Part 20 and Jeff’s battles from Part 17.

Then he hacked his own Pi. First the honest class from class_bots.txt, to see a normal result. Then the same class with Peeker sitting in, from the spoiler folder’s door3_test.txt. Peeker read the dealer’s memory and walked away the big winner, on a real Pi, with no internet. The door Part 22 promised is really there.

The commands were the hard part, not the software. Every stumble was a typing trap a student will hit too:

TrapWhat happenedThe fix
A line break in a long commandThe command split in two, and the second half meant nothingType long commands in shorter pieces
The ~ keyHard to find, and in a different place on some keyboardsA plain cd goes to your home folder too
Double dashes--clean lost a dash and became five different optionsCount the dashes; most options need two
A space after a dash- lh was read as two file namesNo space between a dash and its letters
A capital letterThe phone typed Python3; only python3 existsLinux treats capitals as different letters
A space in a file nameA second download was named … (1), and cd saw two namesRename it, or let the Tab key fill names in

Two more things looked like errors and weren’t. Docker warned that the Pi’s kernel can’t enforce memory limits, which stock Raspberry Pi OS never does; the table runs fine without them. And loading the database reported some ignored errors, which a fresh load usually does; Game Review showed every game we checked.

The lesson for the next release: shorter commands, fewer dashes, and ideally one command that does the whole install.

The do-over button

This Pi is meant to be broken. Rewrite the bots, edit the pages, mess up the database. When you want a clean start, from the hr2 folder:

CommandPuts backUse it when
./reset_pi.sh kitThe student kit, as shippedYou’ve edited the example bots into something you can’t fix. Fastest, smallest.
./reset_pi.sh dbThe game databaseThe review pages show nonsense, or you want the original games back.
./reset_pi.sh siteThe websiteYou changed pages inside the running site and want them undone.
./reset_pi.sh allEverythingNothing else worked, or you’re handing the Pi to the next student.

Each one asks you to type yes before it changes anything. Start with the smallest one that might fix the problem. all is a full rebuild and takes the longest.

Keep your data

The do-over button puts things back. These keep the things you don’t want put back.

OptionWhy
Your saved runs are kept automatically. Every student-table run is saved in api/student_runs, and every reset, even all, copies them out first and puts them back.Those runs are your evidence. Part 22’s second half, catching a classmate, depends on them.
Copy your runs and bots to a USB stick.Memory cards fail, especially ones running a database. A copy somewhere else survives the card.
Back up the database if you’ve played games on the website you want to keep (see below)../reset_pi.sh db and all put back the database as shipped. Your own games go with it unless you saved them.
Use three cards (next section).A whole working Pi you can swap in, in a minute, when an experiment goes wrong.

To save the database to a file in your home folder:

docker exec legacy-postgres pg_dump -U admin -F c ology > ~/my_games.dump

Copy my_games.dump to your USB stick with your runs. Loading it back is the same restore step the README uses for the shipped database, with your file in place of it.

The three-card plan

Cards are cheap, and a working Pi isn’t. If you can, label three and give each a job:

CardJobRule
1. Known goodBuilt, tested, a hand dealsNever experiment on it
2. WorkbenchYour everyday experimentsBreak it freely
3. SpareA copy of card 1, or a blank for trying another way to installRefresh it when card 1 changes

To copy a card, use SD Card Copier (Raspberry Pi menu, Accessories) with a USB card reader, or Raspberry Pi Imager from another computer. If the workbench card gets into a state the do-over button can’t fix, swap in the spare and keep going.

Licensed, and what that means for you

Kevin’s goal is simple: give it away, and don’t let anyone sell it. HoldemRobots.AI is licensed under the PolyForm Noncommercial License 1.0.0.

The old code leans on about a hundred outside libraries from the Apache Cocoon project and others. Each keeps its own license, and each license file ships in the release. Getting there was a job of its own. The release is built by a cleanup script that works on a copy of the site and stops if any library is missing its license. It also stops if it finds anything that shouldn’t leave the server: payment forms, keys, server addresses, or pieces that weren’t Kevin’s to give away. Nothing ships until every check passes.

It’s also a lesson in itself. Most software you’ll ever ship is mostly other people’s code. Knowing what you’re allowed to do with it is part of the job.

The doors, and the eggs

The three doors from Part 22 are still open on the student table. Here are the hints again, and nothing more:

  1. Door 1. What does a hand cost you if you never play it?
  2. Door 2. In a single game, who speaks first? Does that ever change?
  3. Door 3. Bots and the dealer run in the same program.

Kevin has walked through Door 3 on a real Pi himself (above), so we know it works on the release. The doors are the first of what Kevin calls easter eggs: lessons hidden in the course on purpose, for whoever looks closely. More are coming.

For when you’re stuck, the Pi has a spoilers folder. Its first page says STOP. Behind it are the two working Door 3 bots from Part 22; door3_test.txt, a ready-made class with Peeker sitting in, so you can watch Door 3 work with one command; and EASTER_EGGS.md, a checklist of every hidden lesson so far and where its answer lives.

Why ship the answers at all? Because some students don’t have a teacher, or a class. Kevin pictured one kid, alone with a Pi, being the student and the teacher at the same time. That kid can already fill the table: write six bots, an honest one, a reckless one, one that walks through a door, and run them against each other. Then put on the teacher’s hat and catch the cheater you wrote. That kid should have every part. The answers were never really secret anyway; Part 22 prints them below a spoiler line.

Classroom teachers who want students to struggle longer can delete the folder before handing out the cards. ./reset_pi.sh all brings it back.

Found an egg that isn’t on the list? Write it down. It might be the next one.

Getting one

The offer from Part 12 stands, now with a license that makes it official. A teacher, a coding club, a maker group, a Raspberry Pi meetup, or one curious student: as long as it’s used for good, Kevin will give it away. Write to him:

[email protected]

Where it stands, Oct 24: done

Every step in this article is done. The Pi release is finished, licensed, installed on a real Pi and tested offline. Nothing is left to build for this release.

Written by Kevin Swinson with Claudette, the pen name for Claude, the AI from Anthropic that helped build HoldemRobots.AI. Describes the Raspberry Pi release as of October 24, 2026. This article is not legal advice; the license text in the release is what counts.