Camp 9 · Workbook p. 69 · Badges: Tell Spotter, Show Runner, Kit Builder, Decoy Finder

Camp 9 · The Back Room: Is This Your Dog?

You have a starter kit and one job: pick a tool and build it. This time it's all new Python, with only the poker engine underneath borrowed from the kit. Five AI players, five dog names, every thought recorded. Can you build it, test it, and still tell the truth about what you show?

The parable: The Dog Trader's Best Morning

Every fall a trader came through the river country with a wagon of retrievers. He set up by the marsh at dawn, and the buyers watched from the bank while his dogs worked. Every duck came back. Every whistle was obeyed.

A young farmer had his money out before the sun was up. His grandfather, who had raised duck dogs all his life, put a hand on his arm.

"What time did he start them this morning?" the old man asked. The trader smiled. He had worked those dogs since long before light, and he only waved the buyers down once they were doing well. The farmer had been watching a good morning, picked out and served up as if it were any morning.

The grandfather pointed at the dogs, none of them wearing a collar. "That one is from the Pruitt kennel. That one's a Mason dog." The trader asked how he could tell. "A collar tells you a name. The way a dog carries a bird tells you its family."

Then he told his grandson what to ask for. "The papers, so you know what you're buying. A walk with the dog on a plain wet afternoon, with you holding the leash. And a week at home before you pay."

The trader agreed to all three. The farmer took the plainest dog in the wagon, and it was the best dog he ever owned.

A second story, from Kevin's granddad: How Much for the Dog?

Kevin's granddad raised duck dogs and took them to field trials. This was the joke he liked to tell.

At a retriever trial, every dog gets its turn. The handler sends it out, and the dog has to find the decoy and bring it back.

That day the decoys were hard to find. One dog after another went out, hunted around, and came back with nothing.

Granddad's dog couldn't stand it. Every time another dog came up empty, it broke, ran out there, and brought the decoy in. It wasn't its turn, so it got a penalty. Then it did it again, and again, until the judges disqualified it.

When the trial was over, the referee walked over to Granddad and asked, "How much for the dog?"

The jump: from the story to the table

In November 2026, Kevin gave himself the same job a coder gets on a new client: take a starter kit and choose one tool to build. His starter kit was the HoldemRobots code from the Raspberry Pi. His tool was Dogs Playing Poker. The five AI players from Camp 4's tournament sat down at one table as five nameless duck dogs, and every thought they had was saved.

Everything new was written fresh in Python: the five-dog table, the program that picks the hands to show, and the viewer. The only old code is the engine underneath, the dealer that shuffles and deals and the runner that calls each player and checks the chips. Nothing in the engine was changed.

The trader's tricks and the grandfather's questions were all there:

  • The papers. Reading the code first found two problems nobody was looking for. One line was throwing away the players' thinking, and their instructions still said the game had two players.
  • A walk on a plain afternoon. 1,100 free hands with pretend dogs that misbehave on purpose caught a real bug: five dogs can raise back and forth past an old safety limit of 80 moves.
  • A week at home. A pilot of 100 real hands showed the cost and speed before the big run. Then 1,400 more hands played on November 5. Every one passed the chip check, and every move came with a reason.
  • The good morning. The show plays the best 500 of 1,500 hands, picked afterward for excitement. The viewer feels live, but nobody is thinking while you watch. Every word in every bubble was written days earlier.
  • The family in the way it works. Every name is hidden, even the A–E letters. But one dog, Teal, thinks out loud for pages while the other four answer in a line. The habit gives it away.
  • How much for the dog? The automatic checker flagged Teal 12 times. All 12 were Teal doing the job well: working out where the blinds sit, and counting the cards left in the deck. A scorecard can penalize the very dog a person watching would want to buy. That's why a person reads every flag. It's also how to shop for an AI. A leaderboard is the judges' scorecard: it tells you who followed the contest's rules. The referee bought the dog he watched find the decoy when the others couldn't. Before you buy an AI, hand each one your own hard-to-find decoy, a real problem from your own work, and watch which one brings it back.

Watch the finished tool. The dogs are playing right now at DogsPlayingPoker.ai (also dogsplayingpoker.holdemrobots.ai). Hand 2 is the one from Kevin’s video. With Peeker on, Marsh wears the crown while holding a 5 and an 8, then makes a straight. Pause it before the flop and ask the class who will win. Then ask why it matters that somebody knew. See the teacher notes for running it in class.

If you only read this page. A starter kit gives you an engine; the tool you build on it is yours. Read the code before you change it, practice where mistakes are free, run a small trial before a big one, and have a person read every warning. When you show the results, say what was picked and what was recorded. Hiding a name doesn't hide an identity.

Middle SchoolThinking Cards

The idea: every decision has a reason, and the way you explain yourself is a fingerprint.

  1. Play the stay-or-fold game from Camp 1 in groups of five. Before every decision, each player writes a Thinking Card: the decision and why. Done when: every decision has a card.
  2. Pick one player in each group to be the long-winded one. That player writes at least three sentences on every card. Everyone else writes one line.
  3. Give each player a dog name at random, and write it on their cards in place of their real name. The teacher keeps the list of who's who sealed in an envelope.
  4. Swap card piles with another group. Read their cards and guess which classmate is behind each dog. Write down what gave each one away.
  5. Now stage a show. From your own group's hands, pick the three most exciting ones to read aloud to the class. Write down the hands you left out.
  6. Open the envelope.

The hard question: after hearing only your three best hands, what would the class believe about how your group plays? Is it true?

High SchoolStage the Show

The idea: a highlight reel is a choice, and every choice changes what the audience believes.

  1. Open the score sheet of the show’s 500 hands (show_hands.csv, on the Kits shelf) in a spreadsheet. Each row is one hand: the pot, whether it reached a showdown, how many dogs were left, and tags like "all-in" or "bluff worked." Done when: you can sort it by pot.
  2. Write your own excitement rule. Decide how many points a showdown, a big pot, an all-in or a bluff is worth, and add a score column.
  3. Pick your top 50 hands. Watch three of them at DogsPlayingPoker.ai: type the hand number into the wrench panel. Did your rule pick what you’d want to watch?
  4. Compare your show with the whole night. In all 1,500 hands, 263 reached a showdown, about 1 in 6. In Kevin's show of 500, 231 did, almost half. What share did your 50 have?
  5. Kevin kept 50 quiet hands "so it feels like a real night." They’re marked quiet in the sheet. Add a few quiet hands of your own, and explain how you chose them.
  6. Write the one-sentence label you'd put at the start of your show so nobody is fooled.

Hand in: your scoring rule, your 50 hands, the comparison from step 4, and your label.

CollegeYour Starter Kit, Your Tool

The idea: keep the engine you were given, and build your new tool beside it, never inside it.

  1. Start from the kit. Install the Raspberry Pi release, turn the Wi-Fi off, and run one class table game from Camp 4. Done when: you have a game's logs on disk.
  2. Choose your tool. Pick one thing to build on top of the logs: a replay viewer, a hand picker, a "who's bluffing" report, or your own idea. Write one paragraph on who will use it and why.
  3. Read the papers. Before you write a line, read the log files and the code that writes them. List every field you plan to use and what you think it means.
  4. Check what the names promise. Kevin's logs had a field called seq that looked like the order of moves in a hand. It wasn't: it counted each player's own moves. The order in the file was the real order. Check every field you rely on against something you can see, like the hand history.
  5. Leave the engine alone. Your tool reads the logs and writes its own files. If you need the engine to do something new, write it down as a request instead.
  6. Practice where it's free. Test your tool on a game of pretend bots first. Make at least one bot that misbehaves on purpose: one that raises forever, or one that sends back nonsense.
  7. Prove it with arithmetic. Find one number your tool can rebuild on its own and check it against the log, like every pot from the betting. Kevin's picker matched all 1,500 pots.

Hand in: your tool, the field list from step 3, the bug your pretend bots caught, and the check from step 7.

Advanced AI StudiesNames, Flags and "Live"

The idea: a project that hides names, checks answers automatically and replays the past has three honesty problems. Solve each one on paper.

  1. Names. Every dog's name was drawn at random and sealed, yet one dog's long thinking gives it away. List the habits that could identify an AI player with no name on it: length, word choice, timing, mistakes. When is figuring out who's behind a name a fair lesson, and when is it an invasion of privacy? Write a rule for your class.
  2. Flags. Teal was flagged 12 times and did nothing wrong. Seven flags came from the phrase "button is dealer," which the checker read as a dog talking to the dealer. Five came from Teal counting the cards left in the deck. Rewrite the checker's rules to stop those false alarms without missing a real one. Then say who still reads every flag, and why.
  3. "Live." Televised poker feels live but airs on a delay, and the audience sees the cards early. Kevin's viewer has a Peeker switch that crowns the winner before anyone bets. Write a short disclosure policy for any replay shown as if it were happening now.
  4. The real job. Now picture a coder doing this for a business that has run on the same software for 20 years. Customers and paychecks are on the line instead of chips. Which of the three problems gets more serious, and what would you add to the test drive?

Hand in: your class rule on names, your rewritten flag rules, your disclosure policy, and your answer to question 4.

Your turn

  1. The trader only waved the buyers down once his dogs were doing well. Where have you seen a good morning served up as if it were any morning?
  2. Teal thinks out loud for pages and the other dogs answer in a line. Would you trust the long answer more, or less? Why?
  3. The referee asked "How much for the dog?" after it was disqualified. What's the decoy you'd send an AI after before you'd pay for it?

Bring it back

Dogs Playing Poker is the finished tool, free to watch at DogsPlayingPoker.ai, and it’s now the AI table for every camp. The Raspberry Pi release is the starter kit and the class table. Camp 1's stay-or-fold game is for Thinking Cards, Camp 3 for dressing robots as dogs, and Camp 4 for the tournament these five players came from. Take the referee's question to "Shopping for AI: Which AI Catches the Cheat?" The article "Is This Your Dog?" in the Erik the Coder series tells the whole story of the build.