A Shanghai solitaire in “Dragon formation”.
Mahjong solitaire, also known as Shanghai solitaire, electronic or computerized mahjong, MahJong solitaire, solitaire Mahjong and, erroneously, as mahjong, is a solitaire matching game that uses a set of Mahjong tiles rather than cards. The 144 tiles are arranged in a special four-layer grid with their faces upwards. A tile that can be moved left or right without disturbing other tiles is said to be exposed. Exposed pairs of identical tiles (Flower tiles in the same group being considered identical) are removed from the grid one at a time, gradually exposing the lower layers to play. The aim of the game is to clear the grid by pairing up all the tiles. The game is finished when either the grid is empty, or there are no exposed pairs remaining.
While Shanghai solitaire can be played using genuine tiles and a special wooden frame for set-up, it is usually played in an electronic form as a computer game. This removes the tedium of the set-up process and the temptation to cheat. Some electronic Mahjong solitaire games offer extra options, such as the ability to change the tile set and patterns from the traditional tiles to flowers, jewels or some other item that may be easier to match up at a glance, to play a series of different layouts with increasing levels of difficulty (usually given Chinese names such as ‘the ox’ or ‘the snake’), or “wildcard tiles” and other tiles that have special functions. These games also have an optional time limit, and offer hints/cheat options such as the ability to have a match found for you, or to backtrack and undo already made moves. Additionally, most implementations of the game arrange the tiles in such a way that the game is solvable in at least one way.
Mahjong solitaire can be played either solo, or with a partner in which case the aim is either to accumulate the most pairs, or to be the last one to match a pair.

