The move directions per position are coded as bits 0.3 in aĪ "1" bit indicates that the move is allowed. One-dimensional array is used instead of a twoīytes are ordered as in a one-dimensional array, so if a = 1 if the position n holds a peg, board = 0 if position n is The peg placement is recorded in array board: How is this game coded? Have a look at the board and the numbering of the peg positions: If no addtional tricks are programmed to speedup the search. In 12 milliseconds and finds more solutions in additional fractionsĪ modern PC with 2,4GHz clock needs about 7.5 secs to solve the puzzle However, solitaire2.exe solves the solitaire puzzle The existence of search techniques, but never studied them.Īpproach is intuitive. Peg-Solitaire version 2 is ready now and has Recently I wrote another program, now in Delphi.Ĭamping in France (without PC) some ideas struck me how to speedup I remember that it took this giant machineĪbout 6 minutes to find the first solution. National supercomputer installed at the Academic Computer Center Was granted permission to run my Fortran program on the Cyber205, the My efforts to write a program that solves peg-solitaire go back to 1993.Ī hardware engineer, for the Control Data Corporation (CDC). This article will focus on the search option. Permutation filter removes similar solutions : Select 1 of 12 preset games, from easy to difficult Place balls at board to create starting position for search My version of Peg Solitaire has the following options: Peg that was jumped over is removed from the game.īelow for a reduced image of an initial- and a solved game. Over it's neigbour (horizontally or vertically) to an empty hole. The final, solved, game has one peg in the center positionĪfter 31 moves have striked the other pegs. Introduction Peg Solitaire is a single player puzzle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |