Triangle Peg Game – All Solutions

Many years ago I wrote a web posting of how to solve the Cracker Barrel golf tee triangle board peg game puzzle. This is now located on this blog in a preceding post here.

In updating that blog for a solution of finish hole equals to the starting empty hole, I was troubled that the solution provided by reader Merv Eberhardt included a solution for 4 of the possible 5 starting holes, but did not include a solution for the evil hole #5

Related, I had never been able to get to the goal position or “magic diamond” from a starting position of 5, 8 or 9. Recall that once 3 moves are complete for all the other starting positions, the solution to the puzzle is the same in all cases. I mean, a solution to the puzzle is the same in all cases, there are lots of variations on the solution to the puzzle. The nice thing about the solution discussed in the prior blog is that after 3 moves, all the solutions are the same no matter where you started, except position 5 which is same as 5, 8, 9. Goal position or “magic diamond” is listed below.

I asked that if anyone could figure out how to get to the goal position from start position 5, please let me know. Today: I know there is no such solution.

Wrote a program

Troubled that I did not have a finish position equal starting position for hole #5, I wrote a program to solve the puzzle. Solve it yes, but I mean solve ALL of the variations.

From any position, you can jump up-left, up-right, left, right, down-left, down-right. The program starts with one position empty and then solves ALL of the possible solutions for that position, and then moves onto the next starting position, until all of the solutions are known. As a programmer, this was itself a good puzzle, much like playing the game.

The answers are

  1. There is no path to the magic diamond from starting position 5 (5, 8, 9)
  2. There is no finish in same hole as started for position 5 (5, 8, 9)

Some other neat stuff came out of the exercise though! Among the more interesting observations is that while there are 1,550 solutions to starting hole 5, every single one of them finishes with the last peg standing in position 13! This means that in reality there are very few solutions to starting position 5.

Statistics

Just as the starting holes of 1, 11 and 15 are really the same puzzle rotated, there are numerous methods of solving the puzzle which are just variations of the same solution. If you switch a couple jumps in sequence, or jump in opposite directions, you can produce many more solutions which are really the same solution.

How many solutions are there for each starting hole? Glad you asked!

Start-PegWinnersLosers
12976017739865
2148809213994
3148809213994
48525835180925
515504528807
68525835180925
7148809213994
815504528807
915504528807
10148809213994
112976017739865
12148809213994
138525835180925
14148809213994
152976017739865
Total438,984227,632,755228,071,739
Peg game winning solutions and losing positions

Solutions posted online

In case anyone else wants to tear this apart, I have posted in CSV form, ALL of the 438,984 solutions to the game. You can download here. This file is 45MB in size.

Joe Nord

Leave a Reply

Your email address will not be published. Required fields are marked *