Skip to content

benjisidi/Cardinal-Chains-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cardinal Chains Solver

This is an ongoing project to develop and implement an algorithm to computationally solve the puzzle game Cardinal Chains, made by Daniel Nora.

The game essentially boils down to solving the Hamiltonian Path problem, with some additional simplifying features.

Usage

  • Download the Cardinal Chains demo (or buy the game, it's fantastic) from here.
  • Download the project directory
  • Open Cardinal Chains and navigate to the level you wish to solve (Currently solves 1-20 excluding 10)
  • Run ChainsOCR.py

Dependencies

File Structure

File/Folder Contents
Graph.py Holds the Graph object, which stores the graph representation of each level, along with methods to construct the graph from a 2d matrix, display it in a Tk window, and simplify and solve it.
ChainsOCR.py Holds the ChainsOCR object, which contains methods to "read" each level from the game window and move the mouse once a solution has been computed by Graph.
graph_tester.py Simple script for testing the Graph object's draw function.
performance_benchmark.py Script comparing solving a level by attempting some logical simplifications of the graph, and simply brute-forcing it.

Future Improvements

  • Known issue in failing to solve level 10 due to not being able to identify an end-point.

  • Currently can't solve multi-coloured levels. This will require significant work.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages