Skip to content

tentone/rubix-solver

Repository files navigation

Rubix Solver

  • Rubix cube solver using computer vision.
  • Identifies the state of your rubix cube and helps you to solve it.
  • Step by step instructions to solve the rubix cube.

Setup

  • Install dependencies from the install.sh file.
  • Install OpenCV from github (pre-built binary or from souce).
    • Can use the install-opencv.sh script available on the repository
  • Run the code using cmake or the run.sh script.

Vision Algorihtm

  • The vision algorithm is quite simple and is composed of three main steps.
  • We look for clusters of quads that compose the face of the cube.
  • Each quad is tested for color using HSL filtering.
  • Finally the quads are sorted based on the position.
  • The faces are identified by their center color.

Solve Algorithm

  • The original 3x3x3 Rubik's cube has 43.252.003.274.489.856.000 possible combinations.
  • Theoritically a rubik's cube can be solved in 20 moved from any position.
  • The algorithm implemented to solve the rubix cube in the system uses a brute-force approach.
    • Some optimizations are performed to remove ambigous movements.
  • The depth of moves is limited by performance of the algorithm.
    • The max depth of moves can be changed in the GUI. By default 10 is used.
  • An alternative algorithms such as the Thisletwaite's algorithm could be used instead.
  • The cube movements use the notation presented in the picture bellow.

License

  • This project is distributed under MIT license available on the repository page.

About

Rubix cube detector and solver using computer vision.

Topics

Resources

Stars

Watchers

Forks

Languages