Jaap's Puzzle Page

English Sixteen / Swap Squares

Swap Squares

The "English Sixteen" puzzle is peg jumping puzzle that is essentially a two-dimensional analogue of the Leaping Frogs puzzle. The board has two 3×3 grids of holes which share one corner hole. Initially the shared hole is empty, and the rest is filled with eight pegs of one colour in one half of the board and eight pegs of a second colour in the other half. You are allowed to shift a peg to an adjacent hole, or you can jump a peg over another if the hole is immediately behind that. The aim is to swap the colours, moving every peg to the other half of the board in as few moves as possible.

This puzzle is described in Professor Hoffman's "Puzzles Old and New" from 1893.

In some versions of the puzzle you are restricted in your movements by one or both of the following rules:

These restrictions are essentially the same as draughts/checkers, so sometimes this version of the puzzle is played on a checkered board with pieces on the black squares.

A1
B1B2
C1C2C3
D1D2
E1
F1F2
G1G2G3
H1H2
I1

Swap Squares is a version of the puzzle which starts with only 7 pieces in each half - the centre hole of each 3×3 grid is initially left empty. The same restrictions may be applied if you wish. Note that in this game it is possible to shift/jump one piece several times in succession. You may wish to count multiple consecutive shifts/jumps with one piece as a single move, or only count consecutive jumps as a single move.

If your browser supports JavaScript, then you can play the English Sixteen / Swap Squares puzzle by clicking the link below:

JavaScript English Sixteen / Swap Squares Puzzle

The number of positions, 16-peg game:

If there are no restrictions on the moves, then it is easy to calculate the number of positions. There are 17 holes, and 8 pegs of each colour, giving a total of 17!/8!2 = 218,790 positions. If only forwards moves are allowed, then many of these positions are unreachable. It is difficult to calculate the number directly, but a full enumeration by computer showed there are 133,864 reachable positions.

Any direction Forward only
Jump any colour
Forward only
Jump opposite colour
Depth#positions
01
18
212
314
432
558
6121
7178
8284
9494
10794
111,143
121,700
132,386
143,223
154,242
165,677
177,330
188,722
1910,084
2011,501
2112,879
2213,997
2314,804
Depth#positions
2415,433
2514,981
2614,015
2712,849
2811,666
2910,439
309,334
317,858
326,075
334,651
343,459
352,682
361,990
371,401
38914
39557
40348
41202
42137
4366
4432
454
4611
472
Total218,790
Depth#positions
01
18
212
314
424
544
665
788
8132
9190
10328
11472
12664
131,002
141,426
151,948
162,633
173,484
184,420
195,360
206,516
217,684
228,589
239,447
Depth#positions
2410,080
2510,267
269,956
279,314
288,231
297,002
306,078
315,110
323,875
332,948
342,138
351,518
361,061
37757
38430
39255
40144
4176
4240
4324
444
454
461
Total133,864
Depth#positions
01
14
210
314
422
536
653
776
8118
9168
10246
11364
12538
13794
141,160
151,602
162,079
172,694
183,354
194,256
205,330
216,424
227,494
238,460
Depth#positions
249,108
259,514
2610,054
279,899
289,302
298,705
307,454
316,409
324,990
334,132
342,992
352,140
361,498
37965
38625
39374
40216
41105
4248
4324
448
454
461
Total133,864

The number of positions, 14-peg game:

In the 14 peg game, 7 pegs of each colour and 3 empty holes, giving 17!/(7!23!) = 2,333,760 positions if there are no restrictions on the moves. If we restrict to forward moves only, then there are 2,071,392 reachable positions.

Choose the way you want to count the moves below to see the relevant tables.
Every jump and shift counts as a move
Consecutive jumps with the same piece combine as one move
Consecutive jumps and shifts with the same piece combine as one move

Every jump and shift counts as a move
Any direction Forward only
Jump any colour
Forward only
Jump opposite colour
Depth#positions
01
116
290
3262
4547
51,228
62,671
75,158
89,132
915,101
1023,537
1135,273
1250,750
1369,412
1490,229
15112,694
16135,101
17155,505
18171,464
19182,023
Depth#positions
20186,328
21184,389
22174,191
23158,294
24137,663
25115,672
2693,624
2772,941
2853,685
2937,525
3024,949
3115,725
329,319
335,065
342,594
351,020
36441
37132
389
Total2,333,760
Depth#positions
01
112
248
396
4159
5348
6815
71,672
83,304
96,195
1010,967
1118,650
1230,436
1346,728
1467,445
1591,498
16116,713
17140,337
18159,307
19171,645
Depth#positions
20177,471
21176,398
22167,361
23151,684
24131,266
25109,025
2687,616
2767,647
2849,642
2934,505
3022,571
3113,979
328,184
334,307
342,104
35846
36319
3788
383
Total2,071,392
Depth#positions
01
18
230
374
4149
5306
6659
71,348
82,610
94,795
108,309
1113,568
1221,254
1331,660
1444,984
1561,081
1679,713
1799,288
18118,283
19134,985
20148,364
21157,830
Depth#positions
22162,531
23161,645
24154,375
25140,786
26122,463
27102,906
2883,632
2966,060
3049,617
3135,808
3224,486
3315,881
349,968
355,895
363,186
371,628
38720
39341
40136
4125
424
Total2,071,392
Consecutive jumps with the same piece count as one move
Any direction Forward only
Jump any colour
Forward only
Jump opposite colour
Depth#positions
01
116
290
3266
4607
51,648
64,241
79,476
819,135
936,040
1064,090
11104,174
12156,638
Depth#positions
13216,249
14275,231
15315,642
16323,794
17294,625
18230,546
19153,083
2082,372
2134,205
229,839
231,665
2487
Total2,333,760
Depth#positions
01
112
248
3100
4183
5468
61,197
72,860
86,856
915,437
1033,209
1164,740
12113,747
Depth#positions
13179,156
14250,086
15306,156
16325,380
17297,053
18224,970
19142,555
2071,708
2127,203
227,231
23946
2486
254
Total2,071,392
Depth#positions
01
18
230
378
4169
5370
6833
71,834
83,920
97,837
1014,605
1125,614
1242,064
1365,193
1494,950
15129,744
Depth#positions
16165,986
17198,901
18222,164
19231,601
20223,416
21199,062
22159,470
23115,697
2477,828
2547,087
2624,841
2711,631
284,550
291,442
30394
3168
324
Total2,071,392
Consecutive shifts and jumps with the same piece count as one move
Any direction Forward only
Jump any colour
Forward only
Jump opposite colour
Depth#positions
01
116
2102
3429
41,702
56,337
620,128
753,759
8122,795
Depth#positions
9239,240
10381,894
11480,308
12464,233
13331,158
14169,841
1554,538
167,137
17142
Total2,333,760
Depth#positions
01
112
252
3166
4579
52,024
67,011
722,343
862,174
9144,427
10275,035
Depth#positions
11413,490
12472,113
13384,971
14205,664
1566,412
1612,236
172,110
18459
1996
2017
Total2,071,392
Depth#positions
01
18
238
3140
4425
51,242
63,851
711,173
828,420
961,832
10117,880
Depth#positions
11197,718
12288,088
13358,744
14368,721
15302,180
16193,300
1794,948
1833,684
197,735
201,209
2155
Total2,071,392

Solution, 16-peg game:

Without the restrictive rules, the optimal solution is 46 moves (20 shifts and 26 jumps). Unsurprisingly, there are no backwards moves, so the first restriction makes no difference. More surprising is that there are such optimal solutions where jumps are only performed over pieces of the opposite colour. The second restriction therefore also makes no difference to the length of the shortest solution (although there are more optimal solutions if you do not impose the second restrictive rule).

Here is one of many 46 move solutions:

D2-E1 F1xD2 G1-F1 E1xG1 D1-E1 F2xD1 G3-F2 E1xG3 C3xE1 B2-C3 D1xB2 F2xD1 E1-F2 C3xE1 D2-C3 F1xD2 G2-F1 F2-G2 H1xF2 G1-H1 I1xG1 G3xI1 E1xG3 C1xE1 B1-C1 D2xB1 F1xD2 G1-F1 E1xG1 C1xE1 A1xC1 B1-A1 D2xB1 F1xD2 H2xF1 G3-H2 E1xG3 C1xE1 D1-C1 C2-D1 D2-C2 F1xD2 E1-F1 F2-E1 D1xF2 E1-D1


Solution, 14-peg game:

Suppose we only apply the first restrictive rule, so moves are only forwards, and there is no restriction on the colours of pieces we jump over. In this case there are solutions which are optimal whichever way you count the moves. It has 38 shifts/jumps, 24 moves when only consecutive jumps with the same piece are combined to one move, and 18 moves if consecutive shifts/jumps of the same piece are also combined.
Here is one such solution:

B1-C2 F1-E1 H2-G2 D2xF1xH2 G1-F1xD2xB1 C3-D2xF1 E1-F2 I1xG1xE1xC3 C1xE1xG1xI1 A1xC1xE1xG1 G3xE1xC1xA1 D1-E1 F2xD1-C1 B2xD1xF2-G3 H1xF2xD1xB2 C2-D1xF2xH1 G2-F2xD1 E1-F2


Allowing backwards moves does not allow for shorter solutions, except if you combine consecutive shifts/jumps of one piece. In that case, a 17 move solution is possible, for example:

F2-E1 D1xF2-G2 H1xF2xD1x-C2 B2xD1xF2xH1 C3-B2xD1xF2 E1-D1xB2 G1xE1-F1 A1xC3xE1xG1 G3xE1xC3xA1 H2-G3xE1xC3 D2-E1xG3-H2 I1xG3xE1-D2 C1xE1xG3xI1 B1-C1xE1xG3 F1-E1xC1 G2-F1 C2-B1


On the other hand if both rules are in effect (forward moves only, jumps only over opposite colour), then the solutions are all slightly longer - 41 shifts and jumps, 31 if consecutive jumps are combined, and 21 if consecutive jumps and shifts are combined. The solution below is optimal in the first two metrics, and the solution below that in the third metric. There is probably no single solution that is optimal in all three.

B1-C2 D1-E1 F2xD1 E1-F2 D2-E1 F1xD2xB2 F2-G2 H2xF1xD2 G3-F2 G1-F1 E1xG1 C1xE1xG3 G3-H2 C3xE1xG3 A1xC1xE1 B2-C3 D1-C1 F2xD1xB2 B2-A1 H1xF2xD1xB2 I1-H1 G1xI1 H1xF2xD1 E1-F2 C3xE1xG1 D2-C3 C2-D2 D2-E1 F1xD2 G2-H1 E1-D1


B1-C2 F2-E1 D1xF2-G2 C1-D1xF2 A1-B1-C1-D1 E1xC1-B1-A1 F1-E1xC1-B1 G1-F1-E1xC1 D2-E1-F1-G1 C3-D2-E1-F2 B2-C3-D2 G3xE1xC3-B2 H2-G3xE1xC3 F2-G3-H2 D2-E1-F2-G3 H1xF2-E1-D2 I1-H1xF2-E1 G2-H1-I1 D1xF2-G2-H1 C2-D1xF2 E1-D1