This is the official repository for Rubiks Cube Solver.
Rubiks Cube Solver is program that scans a Rubik's Cube and gives a optimal solution to solve it.
This repository is licensed under the GNU General Purpose License. A copy of the license is provided in this project under the name COPYING.txt. Please visit https://www.gnu.org/licenses/ for license details. The solutions given by the program aren't the most efficient, but are still reasonably optimal.
The solver can be run by using its original source code or by using a .exe file.
- Clone/fork this repository or download the .zip file (by clicking on the green "Code" button and clicking "Download ZIP").
- Make sure that you have a Python version of 3.6.x or later. You will also need the pip package installer.
- Use pip to install the following packages: opencv-python and kociemba. You can do this by running the following command:
pip install opencv-python kociemba
. You may need to download Visual Studio C++ Build Tools for the kociemba package if you get an error while installing it. - The source code is now ready for you to modify and run. The main file to run is
main.py
. Enjoy!
- Download the .zip file from the releases section of this GitHub page.
- Unzip the file and click on
main.exe
to run the solver. Enjoy!
- Once you have the script running, the first step is to scan the cube.
- Start by scanning the face with the white center towards the camera and the blue face facing upwards.
- Once the colors are detected correctly, move the slider to the next position.
- Rotate the cube so that the red face is facing the camera and the white face is facing upwards.
- Repeat Step 3.
- Rotate the cube so that the green face is facing the camera and the white face is facing upwards.
- Repeat Step 3.
- Rotate the cube so that the yellow face is facing the camera and the green face is facing upwards.
- Repeat Step 3.
- Rotate the cube so that the orange face is facing the camera and the white face is facing upwards.
- Repeat Step 3.
- Rotate the cube so that the blue face is facing the camera and the white face is facing upwards.
- Repeat Step 3.
- The camera screen and the slider should close. You will be left with a message on the command prompt window.
- The solve solution will be printed in standard cubing notation.
- Follow the solution with white on the top and green in the front.
- If done correctly, your cube should be solved!