With Lights Out, all final board states are the same because the board must have all tiles turned off by the end of the game. You can remove a pebble by moving any of its nearby pebble to a nearby empty cell/hole. SAT Encoding for Peg Solitaire We will now introduce an encoding for Peg Solitaire described by Do, Chuong of Stanford that we adapted to our Lights Out encoding (Do). The objective of the game is to remove as much pebbles/pegs as you can. The following matrix illustrates the initial board layout of classic Peg Solitaire. The following matrix illustrates the initial board layout of BrainBoard. This book is not an introduction to programming or Java. Before the game starts, the initial board of Peg Solitaire contains 32 pegs with an empty hole at the center, whereas BrainBoard game starts with 36 pebbles and 9 empty holes. Once a project is complete, the user will have a complete solitaire implementation that can be. BrainBoard contains 45 holes, whereas Peg Solitaire contains 33 holes. BrainBoard uses 9x9 matrix and removes 3x3 matrix in all four corners. Peg Solitaire is a game played on a board consisting of a number of holes. Check if there is a still a peg that can be moved, if there isn't one exit the function. The original Peg Solitaire board uses 7x7 matrix and removes 2x2 matrix in all four corners. lowing programming languages: C/C++, Java, Perl, Matlab, Lisp, or Python. My solve () method works like this: move peg on location x,y in a direction (up, down, left or right) check if the board is in the desired state, if so, print board and moves taken and exit the program. If anybody can achieve one pebble at end of the game, please comment in this article. Also, it is not yet sure whether the number of pebbles can be reduced to less than two in the game. The jump can only be a distance of 2 spaces, over the stationary peg, into the open spot. A peg may only jump another peg, if the peg lands in an empty spot after jumping the stationary peg. The board layout of BrainBoard is much difficult to solve than the original board layout of Peg Solitaire. A Java Implementation of the Peg Solitaire game The goal of the game is an end board configuration consisting of just one peg left.