Mahjong

Play four-player Mahjong free against three AI opponents. Draw, discard and claim tiles to build four sets and a pair. Simple Hong Kong-style rules.

How to Play Mahjong

  1. You and three CPU players each hold 13 tiles. Your goal is a complete hand: four sets and a pair. A set is a chow (three in a row in one suit), a pung (three of a kind) or a kong (four of a kind).
  2. On your turn you draw a tile from the wall automatically, then click a tile in your hand to discard it.
  3. When someone discards a tile you can use, buttons appear. Claim it for Mahjong!, a pung or a kong from anyone, or a chow from the player before you. A set you claim stays face up on the table.
  4. Complete your hand and press Mahjong! to win the hand. Better hands score more, and the highest total after 4 hands wins the match.

Frequently Asked Questions

What CPU strategies are available?
Smart follows the rule-based AI priority order and picks randomly among moves with similar scores — strong but varied. Best always takes the highest-scored move for the top-priority rule. Random picks any legal move with no rules or scoring, and rarely completes a hand.
How does the rule-based AI choose a move?
It works down a priority list: win if it can, declare a kong that does not set its hand back, claim a discard only when that brings its hand closer to complete, and otherwise pass. When discarding, it keeps its hand as close to complete as it can, and among equal choices it keeps the hand open to the most tiles still unseen.
Can the AI see my tiles?
No. It knows only what a player at the table knows: its own hand, every set on show, every discard, and how many tiles are left in the wall. It counts what it can see to work out which tiles are still out there, and it never looks at your hand or the order of the wall.
How is a hand scored?
A winning hand earns faan for what it contains: 1 each for a self-draw, a concealed hand, all chows, a dragon pung, your seat wind or the round wind; 3 for all pungs or a half flush; and 6 for a full flush. The hand starts at 1 point and doubles with each faan, so 1 faan is 2 points and 2 faan is 4, up to 64 points at 6 faan. Win on a discard and you take double the hand's value from the discarder alone. Win by self-draw and you take its value from all three opponents.
Which rules does this version use?
A simplified Hong Kong style, played for points only. There are no flower tiles and no minimum hand value, so any complete hand can win. Special hands such as seven pairs and thirteen orphans are not included, and nobody can rob a kong. The deal passes every hand, so each player is East once in a 4-hand match.
What happens if the wall runs out?
The hand ends with no winner and nobody scores. Play moves on to the next hand, and the deal passes as usual.
What is a good way to play?
Early on, throw away lone honour tiles and isolated tiles at the ends of a suit, and keep pairs and neighbouring numbers. Those shapes can become sets in more ways. Prefer a wait that many unseen tiles can complete, and check the discards before you decide: a wait for a tile already gone three times is nearly dead. Claiming is fast, but a claimed set gives up the concealed hand bonus.

Related Games

DominoesChinese ChessBackgammon