Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.84 KB

File metadata and controls

50 lines (35 loc) · 1.84 KB

Rubik's Cube Solver

GIF


About

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


Installation

  1. Install python 3 from https://www.python.org/downloads/
  2. 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
  3. Clone the repository using git clone https://github.com/oyberntzen/cube-solver.git or you can download the zip
  4. Now the Rubik's Cube Solver is installed and you can scroll down to see more information about how the different programs work

Usage

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")