Questions tagged [eight-peg-puzzle]

An eight peg puzzle is a simple puzzle moving eight pegs of two different colors in a line with nine holes.

An eight peg puzzle is a simple puzzle moving eight pegs of two different colors in a line with nine holes, each color peg moving only in one direction, with the goal of swapping the two colored pegs groups positions, by moving a peg into an adjacent empty spot, or jumping into it over a different color peg.

Source.

1 questions
0
votes
5 answers

Trying to solve the peg jump puzzle in Prolog

There are 8 pegs in nine holes. At beginning, the four red pegs on the left and the four blue pegs are on the right, and one empty hole between them. The puzzle is to move all the red to the right, and blue pegs to the left(in other opposite). These…
liumang
  • 109
  • 4