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.
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 website | The Pi | |
|---|---|---|
| The poker engine | The 2006 engine, fair version | The same engine |
| Review and analysis | Every game, hand by hand | The same tools |
| Bots you write | Robot Wars: paste your bot into a page in the browser | The student table: up to six bots in one text file, run from the terminal |
| AI agents | The thinking seat and the heads-up table, explaining every move | Not included |
| Internet | Needed | Not 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 play | Where | How | Internet |
|---|---|---|---|---|
| 1 | Play it yourself, against nine robots | Website | Click through the Advanced Hold’em Simulator | Yes |
| 2 | Robot Wars: your bot against the house bots | Website | Paste your bot into a page in the browser | Yes |
| 3 | Heads-up against the AI agent | Website | Play in the browser; the agent explains its moves | Yes |
| 4 | Play it yourself, against nine robots | Pi | The same simulator, in the Pi’s browser | No |
| 5 | The student table: up to six bots against each other | Pi | One text file, run from the terminal | No |
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.
| Part | What it does |
|---|---|
| The website | The same table, review pages and analysis tools as the site, opened from a browser on the Pi itself. |
| The ledger | A copy of the game database, so the review tools have real games in them from the first day. |
| The student kit | The student table from Part 22, the example bots, a sample class file and a README. Every file is yours to edit. |
| A class of one | You don’t need a class. One student can write all six bots and run the whole table alone. |
| The do-over button | reset_pi.sh: puts things back the way they shipped. More on it below. |
| The spoiler folder | Working answers and a checklist of the course’s hidden lessons. Behind a STOP sign. |
| The licenses | Kevin’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:
- The versions are frozen. Java 8, the Tomcat 8.5 web server and PostgreSQL 15, pinned. Part 12 told the story of the 2015 rebuild that never stood up because every piece around the old code had moved. Pinned versions mean it stands up the same way next year as it does today.
- It’s native. The website’s server uses a different kind of chip. Copying its finished containers to a Pi would mean running them under emulation, which is painfully slow. Building on the Pi gives you the fast version.
- It keeps the licensing honest. Tomcat, Java and PostgreSQL come straight from the people who make them, with their own licenses. The release only carries what Kevin can license himself, plus the libraries the old code needs, each with its license attached.
What about the other ways?
| Other way | Why it isn’t the official one |
|---|---|
| A ready-made card image you just flash | Fastest 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 containers | Built for a different chip. Runs, slowly, under emulation. |
| Installing Java, Tomcat and PostgreSQL directly on the Pi | Works, 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:
| Item | Need |
|---|---|
| Board | Raspberry Pi 4 or 5. 4 GB of memory works; 8 GB is better. |
| Operating system | Raspberry Pi OS, 64-bit. The 32-bit version can’t run it. |
| Storage | A 32 GB card at least. A USB SSD is faster and lasts longer. |
| Internet | Once, 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:
| Trap | What happened | The fix |
|---|---|---|
| A line break in a long command | The command split in two, and the second half meant nothing | Type long commands in shorter pieces |
The ~ key | Hard to find, and in a different place on some keyboards | A plain cd goes to your home folder too |
| Double dashes | --clean lost a dash and became five different options | Count the dashes; most options need two |
| A space after a dash | - lh was read as two file names | No space between a dash and its letters |
| A capital letter | The phone typed Python3; only python3 exists | Linux treats capitals as different letters |
| A space in a file name | A second download was named … (1), and cd saw two names | Rename 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:
| Command | Puts back | Use it when |
|---|---|---|
./reset_pi.sh kit | The student kit, as shipped | You’ve edited the example bots into something you can’t fix. Fastest, smallest. |
./reset_pi.sh db | The game database | The review pages show nonsense, or you want the original games back. |
./reset_pi.sh site | The website | You changed pages inside the running site and want them undone. |
./reset_pi.sh all | Everything | Nothing 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.
| Option | Why |
|---|---|
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:
| Card | Job | Rule |
|---|---|---|
| 1. Known good | Built, tested, a hand deals | Never experiment on it |
| 2. Workbench | Your everyday experiments | Break it freely |
| 3. Spare | A copy of card 1, or a blank for trying another way to install | Refresh 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.
- You can use it, study it, change it, break it and share it, for anything that isn’t commercial. The license names personal study, schools and charities as fine.
- You can’t sell it, or sell something built on it.
- When you share it, keep the
licensesfolder with it. That’s how the next person learns what they can do, too.
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:
- Door 1. What does a hand cost you if you never play it?
- Door 2. In a single game, who speaks first? Does that ever change?
- 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.
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:
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.
- The release is built and licensed (Oct 23), and every cleanup check passed.
- Installed and running offline on a real Pi (Oct 24): a hand dealt with the Wi-Fi off, Game Review working, the student table saving its runs, and Door 3 open as intended.
- Updated release (Oct 24): the spoiler folder with the Door 3 test files, and a student README with typing tips and the ways back, now ship inside the release.
- The do-over button works:
./reset_pi.sh allinstalled the updated release on the real Pi, and a hand dealt afterwards.
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.