Shanghai is a solitaire game played with Mahjong tiles, originally in a turtle-shaped layout (although numerous others have since been devised), where the object is to clear all tiles by removing them in matching pairs. Activision released the game for Apple Macintosh in 1986 and trademarked the name Shanghai. There are numerous versions available, ranging from the compact (but fully functional) Taipei by Microsoft to the sophisticated Kyodai. Some of the more sophisticated ones include other solitaire games played with the same tiles, such as Rivers.Good versions (e.g., the aforementioned Taipei and Kyodai) construct the layout in such a way that it's always initially possible to win, although it might be extremely difficult. Unfortunately, not all versions are good.Most of these games are called "Mahjong" or some variant, which is wrong; their only connection to Mahjong is that they're played with the same tiles, in the same way that Bridge is played with the same cards as Rummy. In both cases, the resemblance ends there. The name "Mahjong solitaire" is sometimes used as a generic name for this game.There was some debate on the exact origins of the game. The official story is that it was invented by Brodie Lockard at the University of Illinois in 1981, but others say it was based off an older children's game called "Demolish the Turtle" from China.Vegard Krog Peterson has a comprehensive guide to these games.