FARKLE

Six dice, press your luck.

Play itfarkle.hobel.dev

FARKLE in play

Throw six dice. Set aside at least one scoring die, then choose: throw what is left, or bank what you have. Throw nothing scoring and you farkle — the whole turn goes back to the house.

Three modes over one shared table: online with up to eight players on a four-letter code, against bots, or as a pure scorekeeper for when the dice are real and already on the table.

A hand is always read the way that pays most. Four 1s is 1,100 — a triplet plus a single — not the flat 1,000 for four of a kind, because the scorer searches partitions rather than applying precedence rules, and precedence rules get this wrong on exactly the hands people remember.

Worth knowing

The bot's thresholds are solved, not tuned

Exact value iteration over the real game — every distinct throw of 1 to 6 dice, collapsed to 462 multisets, solved to a fixed point. The shape is the interesting part: one die is a two-thirds chance of losing everything, yet its threshold (350) is higher than two dice (300), because a single scoring die clears the table and hands back all six, and six fresh dice are worth 602 points on their own. Six dice never bank at all.

Why the usual bot is wrong

The myopic break-even rule most Farkle bots use gives 38 / 113 / 313 / 912 / 2,930. It prices every throw as if it were the last one you would ever make, so it banks far too early and never discovers either of the facts above.

One rules module, three runtimes

The shared engine runs in your browser's solo game, in the droplet's online room, and in the test suite, which is what keeps the modes from drifting apart. It holds no timers, because only the caller knows whether a human is watching, and it is plain JSON throughout — which is what lets the server snapshot a table mid-turn to disk on SIGTERM and hand everyone their dice back after a deploy.

Scoring is checked exhaustively

A property check proves every keep the move generator offers is one the referee accepts, across all 46,656 throws of six dice, plus 400 complete three-bot games asserting each terminates, no move is illegal and no score goes backwards. A wedged table is the worst bug this game can have: it strands eight people with no way out.

Screens

Built with

ReactTypeScriptwsNodeValue iterationDocker + Caddy

Play FARKLE