Rasmus Suonio

A Figgie bot that counts cards and reads the market

An exact Bayesian card counter that trades Jane Street’s card game, live on figgie.com and in a Python simulator.

Building Since Nov 2026
Live profit, 142 rounds
+$6,958 (play money)
Last 41 rounds
+$81 a round (±$18)
Live tests in profit
Every one since v3
  • Python
  • JavaScript
Flow diagram: the bot's own cards, every bid and offer, the trade tape and the clock feed three steps (count the cards, value every card, trade), with side inputs from reading the other players and learning from the table.

Figgie is Jane Street’s card-trading game. Four players each get ten cards from a 40-card deck in which one suit is secretly the goal, then trade with each other for four minutes in an open market. Every goal card pays $10 at the bell, and the rest of the pot goes to whoever holds the most of them. This bot plays it, live on figgie.com against the site’s Hard bots and in a simulator against opponents written to beat it.

The full write-up tells the story version by version, including the ideas that lost money.

How it thinks #

  1. It counts cards exactly. There are only 12 possible decks, so it keeps the probability of each. Its own hand is the first evidence, and the tape adds hard facts: nobody can sell a card they don’t hold.
  2. It reads the market. High bids are votes for a suit. The cleanest tell is player by player: every Hard bot bids the goal suit up at some point, while a dead suit draws a big bid from only one of them. A bid counts only once it has stood on the book in two different seconds, so a flashed bid can’t steer it.
  3. It prices adverse selection. Early in a round, whoever buys from it probably knows more, so its offers are priced as if they do, and it never sells a card for less than the option of holding it.
  4. It values the majority bonus. Once it holds half the goal suit, the next card decides between a tie and a win, and it pays up for it.
  5. It learns from the table. An online Bayesian logistic regression learns which cheap offers resell within seconds, from every offer on the tape, and at each bell it updates how far to trust each market signal at that table.

Results #

Across 142 live rounds it made $6,958 in play money. Every live test since v3 has been profitable, and over the last 41 rounds (v11 to v13.3) it averaged $81 a round, ±$18 at 95% confidence, with 34 of 41 rounds in profit. The newest version opens its own tables and runs unattended: its first long session made $810 over 11 rounds at three tables.

Version Live rounds Per round ±95% What changed
v1 9 −$29.0 ±35 Exact card counting, naive market-making
v3 10 +$42.3 ±35 Won’t sell a card before the market reveals the goal
v8 10 +$33.5 ±34 Weighs whether every opponent bid a suit up
v10 10 +$60.3 ±34 Buys cheap dead cards and resells them, with a kill switch
v12 10 +$79.9 ±34 Learns which cheap offers resell, from the tape
v13 10 +$98.9 ±32 Learns which market signals to trust at a table
v13.3 11 +$73.6 ±37 Reacts to each quote at once; runs unattended

Ten rounds is a small sample: most single steps between versions are inside the noise, so decisions were made on paired simulations (the same deals for both versions) and replays of logged rounds, with live tests as the final check.

What it still gets wrong #

  • Colluders who know the goal beat it. Three of them take about $60 a round in the simulator whatever it believes, because they sell it dead cards and buy its goal cards.
  • Its opponents are bots, not people. figgie.com’s bots are predictable in ways people aren’t.
  • A better forecast didn’t pay. A model that read each opponent’s tells put more probability on the true goal and still lost $2 a round in simulation, because the bonus goes to whoever commits.

How it’s built #

The game engine, the probability model, a simulator with fifteen kinds of opponents and the analysis tools are about 4,400 lines of standard-library Python. A test bench, the arena, plays every change in paired sessions at 21 tables with separate seeds for tuning, choosing and reporting. The live bot is a 2,900-line userscript that carries a line-for-line JavaScript port into the page, and a harness checks that both versions compute the same probabilities and send the same orders.

It only trades at private tables where every other seat is a figgie.com bot, for play money, uses only what a player can see and places at most four orders a second.