Why the digital puzzle Mahjong solitaire is a mathematical nightmare in disguise
In short: Despite using the same tiles as the traditional four-player Chinese game, Mahjong solitaire is an entirely different beast. It is a deceptively simple matching puzzle that hides complex computational challenges beneath its surface. While you clear pairs from the board, you are actually navigating a problem of significant algorithmic difficulty.
At its core, Mahjong solitaire is a matching game where 144 tiles are stacked in a four-layer configuration. Players must identify and remove exposed tiles—those that can slide left or right without obstruction—to reveal the layers beneath. The objective is to clear the board entirely, but the game ends in defeat if no more exposed pairs remain. While often perceived as a relaxing pastime, the game is computationally intense. Determining the optimal strategy to maximize the probability of clearing all tiles is PSPACE-complete, and if a player could look at hidden tiles, the problem becomes NP-complete.
The game’s history is as intriguing as its mechanics. Created in 1981 by Brodie Lockard on the PLATO system, it was originally titled Mah-Jongg. When Activision released the game for home computers in 1986, they marketed it as being derived from an ancient Chinese tradition called the Turtle. Lockard, however, never made this claim. The game became a massive commercial success, selling approximately 10 million copies. Over the decades, it has appeared under various names, including Taipei and Mahjong Titans, and has been integrated into numerous operating systems and consoles.
Modern digital versions often introduce features to soften the game's inherent difficulty. Many implementations include an undo function or a shuffle option for when no moves remain, ensuring that most boards are solvable. Despite these aids, the default layout—famously known as the turtle—remains challenging. Analysis of ten million games revealed that about 3 percent of these layouts are impossible to complete, even if a player were granted the ability to see every hidden tile from the start. This confirms that even with perfect information, the game remains an NP-complete puzzle.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: Mahjong solitaire
- Also: Wikidata — Mahjong Solitaire · CC0
- Also: Wikidata — mahjong solitaire · CC0
To cite this card, link to https://intellectplus.co.uk/app/sport-mahjong-solitaire.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Games · More in Sport & Games · Latest · A–Z · All topics