Dodge the Queen against a real search engine
Press New Game to deal
North
West
East

Play Hearts Online vs the Computer

Play Hearts — the classic four-player trick-taking card game — directly against three computer opponents, free, in your browser, with no download and no sign-up. You sit South and play the face-up hand; the AI plays West, North and East. Each deal you first pass three cards, then the holder of the two of clubs leads. Follow suit when you can, avoid winning tricks that hold hearts (one point each) or the Queen of Spades (thirteen), and try to finish with the fewest points. Beginner plays loose, punishable cards, Medium plays a solid heuristic game, and Hard runs a determinized Monte-Carlo engine. Legal cards are highlighted, and your wins are tracked per difficulty.

How the AI thinks

Hearts is not a perfect-information game like chess or Othello — you can see only your own thirteen cards — so the opponent here cannot use plain minimax. Instead the Hard level uses determinized Monte-Carlo: it repeatedly deals the cards it cannot see into the other three hands in plausible ways, respecting who has already shown void in a suit and remembering the cards it passed and to whom. Each imagined deal is a complete, perfect-information game, so the engine can simply play it out to the last trick with a fast heuristic and count the penalty points. Averaging over many such deals gives each candidate card an expected cost, and it plays the card with the lowest one. Crucially, every playout is scored after the shoot-the-moon adjustment, so the same simple objective makes the AI duck the Queen, dump points on the leader, defend against an opponent who is collecting hearts, and — when its own hand is strong enough — go for the moon itself. The whole engine runs locally in your browser, in a background worker thread so the page stays responsive, and nothing is sent to a server. It is a strong, honest opponent, though we do not claim it plays perfectly.

How to play Hearts — the rules

Tips to beat the AI

FAQ

Can I play Hearts online against the computer?
Yes — that is exactly what this page is. Pick a difficulty, pass three cards, then click a highlighted card to play. Works on desktop and mobile, free, with no account.

How does the AI decide its moves?
At Hard it uses determinized Monte-Carlo — it deals the unseen cards many ways, plays each imagined game to the end, and picks the card with the lowest expected points. Playouts are scored after the moon adjustment, so it defends the moon and can shoot it too.

What does shooting the moon mean?
Taking all 26 points in a single hand. Instead of 26 you score 0, and all three opponents take 26 each — a big swing if you can pull it off without dropping a single point.

Why is the Queen of Spades so important?
She is worth thirteen points — half the hand — so avoiding the trick she lands in is central to the game. Keep low spades to duck, and pass her away when the pass allows.

Is it free? Does it work offline?
Completely free, no download, no sign-up. The engine runs client-side, so once loaded the game keeps working without a connection. More AI games: AI Chess, AI Checkers, AI Othello or AI Backgammon.

More AI games on LK Forge