Skip to content

Instantly share code, notes, and snippets.

View abaldwin99's full-sized avatar

Alex Baldwin (Old Account) abaldwin99

View GitHub Profile
@abaldwin99
abaldwin99 / triangle_game.py
Last active November 28, 2017 15:31
Cracker Barrel Peg Game / Triangle Game Solution
"""
A small script that finds the solution to the cracker barrel peg game / triangle game.
Instructions along with one of the game's solution can be found here:
http://www.joenord.com/puzzles/peggame/
The solution is determined by building a game tree and using a depth-first search algorithm.
Game Tree: https://en.wikipedia.org/wiki/Game_tree
Depth First Search: https://en.wikipedia.org/wiki/Depth-first_search