What Is Gin Rummy?

Gin Rummy is a two-player member of the rummy family, the group of draw-and-discard games in which you collect cards into matched groups. It became hugely popular in the United States during the twentieth century and is still one of the most widely played two-hand card games. Its appeal is the tension between patience and speed: every turn you improve your hand by one card, but your opponent is doing the same, and the first player with a tidy enough hand can end things on their own terms.

Our version is a quick, single-hand game against an AI opponent at four difficulty levels. Each hand is a complete game scored with the standard knock, layoff, gin and undercut rules, which keeps sessions short and puts the focus squarely on drawing, discarding and timing.

The Rules

A standard 52-card deck is shuffled and each player receives 10 cards. One card is turned face up to start the discard pile and the other 31 cards form the face-down stock. You always take the first turn.

A turn has two parts. First you draw one card, either from the top of the stock or the top of the discard pile. Then you discard one card face up by clicking it, returning your hand to ten cards. A card you have just taken from the discard pile cannot be thrown back on the same turn. The aim is to arrange those ten cards into melds:

  • Sets - three or four cards of the same rank, such as 8♠ 8♥ 8♣.
  • Runs - three or more consecutive cards of the same suit, such as 4♦ 5♦ 6♦. Aces are always low: A-2-3 is a run, Q-K-A is not.

A card can only belong to one meld at a time. Cards outside your melds are deadwood, scored as follows: aces 1, number cards their face value, and jacks, queens and kings 10 each. You do not have to arrange anything yourself; the Deadwood box above the table shows the lowest total your hand can reach, and the game resolves cards that could fit either a set or a run in whichever way is cheapest.

When a discard leaves your deadwood at 10 or less, a Knock button appears and you may knock or keep playing. Zero deadwood is gin and ends the hand at once. After a knock the defender automatically lays off unmatched cards on the knocker's melds, and the knocker scores the difference in deadwood. If the defender ends equal or lower, that is an undercut: the defender scores the difference plus 25. Gin scores 25 plus the opponent's deadwood, with no layoffs. If the stock gets down to two cards without a knock, the hand is a draw. Whoever scores wins; there is no running score to 100.

Core Strategy

Cut deadwood before you build

Because a hand can end within a few turns, your deadwood total is a running liability. Suppose your opening ten are 7♥ 8♥ 9♥, 4♣ 4♦, K♠, Q♦, J♣, 6♠ and 2♦. You already have one run and a pair, but the three unconnected face cards are 30 points of deadwood. Throw the king first, then the queen and jack over the next two turns unless a draw connects them. By turn four, with a little luck on the fours, you can be at 8 or less while the AI is still sorting out its own hand.

Value flexible cards

Some cards can finish two different melds. In a hand containing 5♣, 6♣ and 6♥, the 6♣ is part of a potential run and a potential set, so any of the 4♣, 7♣, 6♠ or 6♦ completes something. That is four live outs, against two for a simple pair or an open-ended two-card run. When choosing between discards of similar value, keep the card that touches the most possibilities.

Count the cards you can see

Only the top discard is shown on the table, so make a habit of noting what goes by. If two queens have already been thrown, your pair of queens is dead: only one queen remains and the AI may be holding it. A pair whose remaining partners have been discarded is just deadwood in disguise, and the sooner you break it up the better.

Read the AI's pickups

On Easy and Medium the AI takes a face-up card only when it completes a meld straight away. So if it picks up your 9♠, it is holding either two more nines or a spade run that the nine extends, such as 7♠ 8♠ or 10♠ J♠. Avoid throwing nines and touching spades for the rest of the hand. Hard will also take a low card when swapping it for a high one clearly cuts its count.

Know when to knock

Any knock that is not undercut wins the hand, so the right time to knock is usually the first time you can; waiting for gin earns 25 bonus points but no extra win. The exception is late in the hand, or after the AI has made several pickups and thrown only small cards. A defender who has had many turns to tidy up may undercut a knock of 8 or 9, so trim a few more points first.

Common Mistakes to Avoid

  • Hanging on to high pairs. A pair of kings is 20 points until the third king shows up. If the hand ends early, you pay for every one of them.
  • Discarding into a known meld. After the AI picks up a card, the ranks and suit neighbours of that card are the most dangerous discards in the game.
  • Ignoring your own deadwood when you can't knock. After the AI knocks you lay off what you can, and finishing equal or lower is an undercut, so shaving a hand from 18 to 9 can turn a loss into a win.
  • Treating the stock as endless. There are only 31 cards in it and the hand is a draw when two remain. Once it runs low, stop drawing toward long-shot melds.

Playing Against Our AI

The AI knows only what a player across the table would: its own hand, the discards, and which of them you picked up or passed over. It never looks at your cards or the stock.

DifficultyWhat to expect
EasyTakes a melding discard only about 30% of the time, sometimes throws a random card, and knocks on roughly 30% of eligible turns. Hands run long and often end in a draw.
MediumAlways takes a discard that completes a meld, throws whichever card leaves its deadwood lowest, and knocks the first time its deadwood is 10 or less.
HardChooses each discard by how low its hand is likely to be after the next draw, avoids throwing cards that match or touch ones you picked up, and takes low discards that cut its count. It knocks at 10 or less until the stock runs low, then waits for 8 or less to limit undercuts.
AI TrainingNo randomness. It shortlists Hard's five best discards and checks each one two draws ahead against up to 31 possible unseen cards per draw, takes a discard only when it beats the average blind draw, and knocks as soon as it can. Gin Rummy hands are luck-heavy: over 4,800 test hands it won 2,450 to Hard's 2,347, so expect it to be slightly stronger rather than dominant.

At every level the AI goes gin as soon as its deadwood reaches zero.

Frequently Asked Questions

Do I need to arrange my melds myself?
No. Your hand is sorted by suit and rank, and the Deadwood box always shows the best arrangement available. If a card could belong to either a set or a run, the game counts it in whichever meld leaves you with less deadwood.
How are layoffs and undercuts handled?
Automatically. The defender's cards are melded and laid off in whichever way leaves the least deadwood, and the result screen lists the layoffs, both totals and the points scored.
What happens on a tie?
A tie goes to the defender as an undercut. If the AI knocks with 7 and your hand comes to 7 after layoffs, you win the hand and score the 25-point undercut bonus. The same applies to you when you knock.
Should I draw from the stock or the discard pile?
Take the face-up card when it completes a meld or turns a strong two-card combination into a near-certain one. Otherwise draw from the stock. A blind card might connect with anything in your hand, while a speculative pickup forces you to break up something else to make room for it.
Play Gin Rummy Now

Free to play - no account needed