Skip to content

tkcranny/Tyre-Puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tyre Puzzle

At a café in Toowoomba, some friends and I were intrigued by a simple-looking puzzle made to entertain children. It was made of a couple dozen tyres laid out, with coloured planks attaching adjacent ones. The rules were simple: follow the planks in order of Red, Blue, Green, starting from the single tyre next to the rules board, and get to the raised tyre in the centre.

This repo contains a Python solution to the puzzle, using NetworX and a few tricks.

Getting Started

  • Clone the repo
  • Install the python dependencies with Poetry, then enter a shell:
    $ poetry install
    $ poetry shell
    
  • Use solve.py to find solutions, using puzzle files from ./puzzles. E.g.:
    (tyre-puzzle) $ ./solve ./puzzle/puzzle_original.txt --start=A --goal=J
    
  • Run tests with PyTest:
    (tyre-puzzle) $ pytest .
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published