This is a project that I have been working on for some years. This repository includes:
- A rubik's cube model/simulation for calculating how the cube looks like when you make a move
- A rubik's cube solver that can calculate which moves that should be done to solve the cube
- A 3D representation of the rubik's cube that can visualize the moves that need to be done
- A camera program that can find out which colors that are on the cube faces
The program is made in python using pygame, pyopengl, cv2, numpy and colormath
- Install python 3 from https://www.python.org/downloads/
- Install the dependencies with pypi. Run the commands in terminal:
pip install numpy
pip install cv2
pip install colormath
pip install pygame
pip install pyopengl
- Clone the repository using
git clone https://github.com/oyberntzen/cube-solver.git
or you can download the zip - Now the Rubik's Cube Solver is installed and you can scroll down to see more information about how the different programs work
The model (Model.py)
This program is a simulation and it calculates how the Rubik's cube will look like if you make a move. Here is an example:
import Model
cube = Model.Cube()
cube.rotate("green")
cube.rotate("yellow")