peg solitaire with depth first search n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Peg Solitaire with Depth First Search PowerPoint Presentation
Download Presentation
Peg Solitaire with Depth First Search

Loading in 2 Seconds...

play fullscreen
1 / 8

Peg Solitaire with Depth First Search - PowerPoint PPT Presentation


  • 260 Views
  • Uploaded on

Peg Solitaire with Depth First Search. By: Iris Garcia. Peg Solitaire. Single-player board game with pegs that can come in many different shapes such as: Cross Square Pyramid Triangle The purpose of the game is to eliminate all pegs by jumping over them, similar to the game of Checkers.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Peg Solitaire with Depth First Search' - farrah-head


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
peg solitaire
Peg Solitaire
  • Single-player board game with pegs that can come in many different shapes such as:
    • Cross
    • Square
    • Pyramid
    • Triangle
  • The purpose of the game is to eliminate all pegs by jumping over them, similar to the game of Checkers.
peg board
Peg Board

The simplest peg solitaire design is the triangular peg board, often referred to as the “Cracker Barrel” design.

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.

The Board can be represented as a tree in order to implement how to traverse it.

depth first search algorithm
Depth First Search Algorithm

DepthFirstSearch(Board b, Peg start)

{

If (Grandchild.isEmpty())

Jump();

updateBoard(); //updates empty peg, location, etc.

else

backtrack(); // backtrack to previous and/or try right child

}

references
References

Darby, Gary. "Peg Solitaire Game." DelphiForFun Home. 31 Mar. 2009 <http://www.delphiforfun.org/Programs/PegSolitaire.htm>. This source offers background information on several different techniques in solving Peg Solitaire. It also includes different representations of Peg Solitaire other than the "Cracker Barrel" design. It also implies that the Depth First Search as one of the most effective solutions.

Matos, Armando B. "Depth-first search solves Peg Solitaire." Computer and Information Science Papers CiteSeer Publications ResearchIndex. 31 Mar. 2009 <http://citeseer.ist.psu.edu/600260.html>. This article by Armando B. Matos goes into detail about using the Depth-First Search to solve the Peg Solitaire problem. 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.

Muhammad, Rashid B. "Depth First Search (DFS)." Depth First Search (DFS). Kent State University. 31 Mar. 2009 <http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/depthSearch.htm>. This source explains the uses of depth-first search and details its algorithm.

Neller, Todd. "Uninformed Search." Gettysburg College Computer Science. Gettysburg College. 31 Mar. 2009 <http://cs.gettysburg.edu/~tneller/resources/ai-search/uninformed-java/index.html>. This source describes Peg Solitaire in a triangular hex grid, and gives a documented example of the source code.

O'Brien, Daniel M. "Peg Board Puzzle Solution Page." Daniel M. O'Brien - bootstrap page. 31 Mar. 2009 <http://www.danobrien.ws/PegBoard.html>. This source gives a more detail analysis of solutions for the "Cracker Barrel" or triangulated representation of Peg Solitaire.