Cribbage Online
Game Overview
Classic Cribbage online. Play against an AI opponent on a clean wooden board.
About Cribbage Online
Cribbage is a card game from 1630s England, supposedly invented by the poet Sir John Suckling, and it has been almost unchanged for nearly four hundred years. A board with pegs, two players, the goal is to reach 121 points first, scored by laying down cards that make fifteens, runs, pairs, and a few other patterns. There's a peg board because the scoring during a hand happens too fast for paper. If you grew up playing cards with grandparents, you probably played a hand of cribbage at some point.
The game has two phases. First, you and your opponent each get six cards, keep four, and toss two into the "crib" â a four-card pile that belongs to the dealer at the end of the hand. Then you play those four cards back and forth, scoring small points for hitting 15, 31, runs, and pairs as you go. Finally, you count up your hand for points (and the dealer counts the crib). Whoever passes 121 wins.
Our version plays against an AI that actually knows the game. The discard-to-crib decision is the most important strategic moment in cribbage â keep cards that work together in your hand, but don't hand the dealer two cards that combine for points in his crib. The AI evaluates roughly a dozen candidate discards each turn, scoring each by expected hand value and expected crib damage. It's not perfect â there are end-game positions where it makes a slightly defensive choice that costs it a point or two â but it plays strongly enough that beating it consistently means you really do know what you're doing.
If you've never played cribbage before, the easiest way to learn is to play a few hands and let the scoring guide you. Pairs are worth 2 (three of a kind is 6, four of a kind is 12). Runs of three or more are worth one per card. Any combination that adds to 15 is worth 2. A flush in your hand is worth 4 (5 if the starter card matches the suit). And the rare "his nobs" â a Jack matching the suit of the starter card â is worth 1.
Build notes. The peg board renders on a canvas with each peg drawn as a small ellipse with a slight shadow. We deliberately kept the wood texture and the green felt feel because cribbage is one of those games where the table matters. The hand-scoring logic was the trickiest single function I have ever written â there are roughly twenty distinct scoring patterns and several of them interact in non-obvious ways. The unit tests for that function are longer than the function itself.
Frequently Asked Questions
What's worth more, 'fifteen' or a pair?
Both are 2 points. Runs of three are 3 points, and you score points individually for each scoring combination â so three 5s and a 10 is six fifteens (12) plus a pair royal (6), which is 18.
What's the highest-scoring hand?
29 points: four 5s and a jack of the same suit as the cut card. It happens roughly once in 200,000 hands, so don't hold your breath.
Does the AI cheat?
No â both sides are dealt from the same shuffled deck and the AI only sees its own cards and the cut card, exactly like you do.
What does 'his heels' / 'his nobs' mean?
His heels: if the cut card is a Jack, the dealer scores 2 immediately. His nobs: if you hold the Jack of the same suit as the cut card, you score 1 when counting your hand.
Similar Games to Explore
Embed this Game
Want to feature this game on your own website? Copy the code below: