This source gives a more detail analysis of solutions for the "Cracker Barrel" or triangulated representation of Peg Solitaire. "Peg Board Puzzle Solution Page." Daniel M. This source describes Peg Solitaire in a triangular hex grid, and gives a documented example of the source code. "Uninformed Search." Gettysburg College Computer Science. This source explains the uses of depth-first search and details its algorithm. "Depth First Search (DFS)." Depth First Search (DFS). The argument to your solve (pegs) function will be a jagged 2-dimensional array of 5 rows. Everything is done except for the solve () function where the actual back tracking part is contained, this is proving conceptually really difficult for me. My program takes in a txt file that contains a starting board. All test input will be solvable triangles of side length 5 with one random hole empty. 1 I'm currently trying to write a program that will be able to find the solutions for the game peg solitaire using back tracking. Matos uses a tree to represent the pegs instead of a graph and gives computation type for implementing this algorithm with different representations of Peg Solitaire. Your task is to write a solve (pegs) function which returns an array of all possible solution states in any order given an initial board configuration. Matos goes into detail about using the Depth-First Search to solve the Peg Solitaire problem. "Depth-first search solves Peg Solitaire." Computer and Information Science Papers CiteSeer Publications ResearchIndex. It also implies that the Depth First Search as one of the most effective solutions. It also includes different representations of Peg Solitaire other than the "Cracker Barrel" design. This source offers background information on several different techniques in solving Peg Solitaire. The Board can be represented as a tree in order to implement how to traverse it.ĭepth First Search Algorithm DepthFirstSearch(Board b, Peg start) ĭarby, Gary. The basic game begins from a full board with one peg missing. This design is similar to an equilateral triangle where each edge has the same number of pegs, and each row has one more peg than the row above it. Since you can always move the position of where there is no peg there are thousands of different solutions to this simple yet complex game. Tech-X Corporation Abstract and Figures We consider the one-person game of peg solitaire on a triangular board of arbitrary size. Jumping over them, similar to the game of Checkers.ĭesign is the triangular peg board, often referred to as the “Cracker Barrel” design. The purpose of the game is to eliminate all pegs by Peg Solitaire Single-player board game with pegs that can come in Peg Solitaire with Depth First Search B Y: I R I S G A R C I A
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |