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.


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!

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

4 thoughts on “Triangle Peg Game – All Solutions

  1. Ed Adasiewicz

    Glad I found your site. I had written a program in GO a while back to solve the Cracker Barrel puzzle but mine incorrectly allowed vertical jumps (i.e. 13 to 1 as a starting move) which resulted in more solutions. Once I changed this then it agrees with all of your solutions. Thanks.


Leave a Reply

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