Great Math Software on Puzzles

By Xah Lee. Date: . Last updated:

What you will find here are computer versions of mathematical puzzles such as Rubic's cube, peg solitaire, tangram, 15-tile-puzzle … etc. Puzzles whoes solution solely rely on logical analysis. If you like mathematical puzzles, you may find this book interesting Puzzles Old and New: How to make and solve themBy Jerry Slocum and Jack Boterman. Buy at amazon The book includes photographs of many many puzzles. It gives you a panorama of all types of physical puzzles.

Magic Polyhedrons

For physical toys, see: Magic Polyhedrons.

David Byrden's java applet David Byrden's java applet
David Byrden's magic polyhedron Java applets.

Puzzler (screenshot) is a Windows program by Noel Dilabough. Puzzler plays all types of magic polyhedrons. Puzzler plays some 20 non-trivial variations of magic polyhedrons, including the five platonic solids with different cuts. The program is great, unique, but the interface is very bad. Extremely frustrating to use. Puzzler is a shareware. (2003-07, 2006-09) Win


MagicCube4D by Don Hatch and Melinda Green. It plays 4-dimensional Magic Cube. It also maintains record of the world's first solvers and a solution database. The source code is also available. () Win Linux Java


4DRubikCube by Ishihama Yoshiaki is a 2x2x2x2 magic cube simulator. Mac Win Java


Combine 2 squares together, you get a rectangle. That shape is called domino. Combine 3 or more squares together, the various shapes are called Polyomino. Combine several equilateral triangls, or regular hexagons, or any polygons, the generalized name for them is polyform.

“Polyominoes” by Kevin L Gong.

polyominoesIcon Polyominoes is a polyominoes fitting game. Written by Kevin L Gong. In this program, you try to fit a set of polyominoes (connected squares) into a given shape. In another mode, two players take turns fitting polyominoes into a give shape. The first without a fitting piece losses. It's almost impossible to beat the computer. Mac, Windows and Java. OSX Mac Java Win

Pentominos Puzzle Solver A pentominos solver, by David Eck. Java

Some excellent intro to polyominoes:

For detailed info about tangram, see: Tangram

iconTangram (4.1, 1999/07. v. 3.2 screenshot) Tangram is a popular tiling puzzle that's probably originated from China. The goal is to arrange a set of seven tiles to match a given shape. This software's interface is beautiful and well-designed. Author is S. T. Han ( Available for both Mac and Windows. URL: Mac Win

A arresting introduction to tangrams can be found in Time Travel and other Mathematical Bewilderments , by Martin Gardner. Buy at amazon It includes a short bibliography.

Peg Solitaire and Discrete Systems

Peg solitaire is a puzzle where there are a number of pieces on the grid, and you are allowed to jump a piece and remove piece jumped over. The goal is to leave just one piece on board.

Poly-Peg by S T Han.

Poly-Peg 1.09 (screenshot) by S T Han. This puzzle is sometimes known as peg solitaire. You remove pieces on a board by “jumping” other pieces over it. The goal is to leave only one piece on the board. PolyPeg lets you edit your own shape of square or hexagonal board and set whether diagonal jump are allowed in square board. It also include a auto solve feature. Latest versions for Mac and Windows can be found in S.T.Han's web site at .Mac Win

pegged Peg Solitaire2
Screenshot Cary Torkelson's “Pegged”. Right: A anonymous program for the Mac in 1990s.

Pegged is a small mac program that plays Peg Solitare. It offers the traditional cross shaped board, but with 7 arrangement of end games. Written by Cary Torkelson in 1991, but still works great under Mac OS X Classic 2003. Local download: pegged.sit.hqx Here's a small anonymous program that plays peg solitare. It has a board different from pegged. pegSolitaire.sit.hqx Mac

For a complete mathematical analysis of Peg-Solitare, see The Ins and Outs of Peg solitaire By J D Beasley. Buy at amazon

Poly-Off 1.09 (screenshot) is another excellent shareware by S. T. Han. The game Poly-Off can be thought of as one type of cellular automata. In a square or hexagonal grid, you switch on or off a cell that will affect neighbor cells. The goal is to switch off all cells. I had lots of fun with this program. For Mac OS and Windows. URL: Mac Win

Poly-Dol v.1.01 (screenshot) by S. T. Han. The puzzle in this program is similar to a commercial program named Cogito. You shift pieces on a board until all the pieces are in certain order. You can only shift pieces in certain row, column, or array of the board. There are dozen boards to choose for play and you can make your own board shapes. I find this program to be much fun. For Mac and Windows. URL: Mac Win

Poly-Tile v.1.04 (screenshot) by S. T. Han. This puzzel is similar to a commercial program named Tesserae, published by In-Line designs Inc. In this puzzle, Tiles of different design are layed over a board. You remove them one at a time by jumping (flipping) adjacent tiles of the same design. The goal is to leave only one tile on the board. I find this game too difficult. It's also hard to analyze because the random initial placement and designs. Like Poly-Peg and Poly-Dol, you can customize your board when you got bored with the given configurations. For Mac and Windows. URL: Mac Win

Backtracking Puzzles

2005-10: Sokoban (倉庫番=warehouse keeper) is a classic game invented by Hiroyuki Imabayashi in 1982. It is a puzzle where the player pushes boxes around a maze to designated locations. For more info, see:

Here's a Sokoban game in JavaScript:

KSokoban screenshot

Sokoban (倉庫番=warehouse keeper) is a classic game invented by Hiroyuki Imabayashi in 1982. It is a puzzle where the player pushes boxes around a maze to designated locations.

MYHOUSE puzzle.

MYHOUSE is a clever and fun logic puzzle, by M Aono. It is a variation of the classic Sokoban. Your goal is to move a bunch of shrimps home. The shrimps move in sync. When one bump into wall, it doesn't move but the rest moves. The red blocks are fire and if one shrimps runs into it you die. Your goal is to align all shrimps in such way to move them home. (2003-09,2009-02) Flash

the 15-puzzle scrambled the 15-puzzle completed
This puzzle is known as the 15-puzzle.
10 tile loyd's lunacy dirty dozen
Three tile-sliding puzzles. Klotski, Loyd's Lunacy, Dirty Dozen.

Klotski is a classic sliding block puzzle. Your goal is to slide the red block all the way to the right side center. Yes, it can be done. This puzzle is dicussed in Scientific American, March 1995 (Volume 272 Number 3 Pages 108-110), Mathematical Recreations by Ian Steward. A beautiful wooden set of this puzzle has been marketed by various companies. This screenshot shows a Mac program but i forgot its name or who wrote it.

Loyd's Lunacy is another block-sliding logic puzzle. The goal is to slide the large square from upper right corner to upper left. Author is Chip Moody. Written in 1990 but still works great under Mac OS X Classic in 2003. This program has a very funny “About” dialogue. loydsLunacy.sit.hqx Mac

Dirty Dozen is a block-sliding logic puzzle. Writen by Nick Triantos in 1993 but still works under Mac OS X Classic in 2003.dirtyDozen.sit.hqx Mac

Logic Puzzles

Mine Sweeper
MineSweeper3D by Robert Webb.

MineSweeper3D by Robert Webb. It is similar to the puzzle Minesweeper that comes with Windows, but MineSweeper3D lets you play it on 3D solids. Very well done. Get it here: (2003-09,2006-09-01) Win

Ask me question on patreon