Logi Toli is a simple puzzle consisting of a arrangement of tracks containing six sliding pieces. The tracks form the shape of an elongated letter H, but with a small side track in the centre. At the start three orange pieces fill the vertical section of track on the left, and three yellow pieces fill the vertical section on the right. The aim is to slide the pieces along the tracks until the orange pieces have swapped places with the yellow.
From this:
to this:
The puzzle is easy, so you could set yourself the extra challenge of using as few moves as possible, or to minimise the total distance travelled by the pieces.
This puzzle is listed in L. E. Hordern's book "Sliding Piece Puzzles", entry B33, where it says that it was called "A Motor-Car Problem" when published in the Strand magazine in 1903, and that a cardboard version called "Germans vs. Allies" was sold in 1918.
If your browser supports JavaScript, then you can play the Logi Toli puzzle by clicking the link below:
You could consider the puzzle to have 10 piece locations - 3 on each of the outside vertical sections, 3 more on the horizontal track, and one on the small central side track. These ten locations contain 3 orange pieces, 3 yellow pieces, and 4 empty spots. This can be arranged in 10! / (3!·3!·4!) = 4,200 ways.
With the above counting of positions, a single move would be sliding a piece along a track by a distance of one piece diameter. God's Algorithm can be calculated using this definition, and it turns out that the furthest away you can get from the start position is 66 moves, though the goal position is just 62 moves away from start. The average distance from start is 32.727 moves.
|
|
|
|
The four antipodes are:
A more natural way to define a move is as a shift of one piece by any distance along any path. With this move definition, the furthest away you can get from the start position is 19 moves, though the goal position is just 17 moves away from start. The average distance from start is 10.380 moves.
Depth | #positions |
---|---|
0 | 1 |
1 | 8 |
2 | 51 |
3 | 110 |
4 | 190 |
5 | 142 |
6 | 130 |
7 | 346 |
8 | 314 |
9 | 254 |
10 | 558 |
11 | 652 |
12 | 292 |
13 | 152 |
14 | 424 |
15 | 190 |
16 | 65 |
17 | 171 |
18 | 130 |
19 | 20 |
Total | 4,200 |
Here are some of the antipodes:
The rest of the antipodes are differ from these by horizontal or vertical reflection.
The following solution is optimal in both metrics, i.e. pieces are moved only 17 times, and the total distance moved is 62 piece diameters. There are 8 such optimal solutions, but they are related to each other by the following symmetries: