This project aims to solve a Rubik's cube through different methods. A fully functioning web frontend for visualization of the cube state and the solution process (stripped down and modified version of taylorjg/rubiks-cube <3). A corresponding Fast API backend that provides required data to the frontend.
Using the 3 algorithms solves the cube piece by pice. Used as a baseline.
Using A* search though the extremely large state space of all possible rubik's cubes. This is split up in stages to limit possible states to look through (all set up in main.py):
- Scrambled to Edge Orientation (EO)
- EO to Domino Reduction (DR)
- DR to Solved
We later found out we had some wrong domain assumptions because of which stage 2 never finishes, but by splitting them up in stages we drastically reduce the search space and which makes this promising. More tweaks and work needed.
To simply test out the project a docker compose file has been provided. Run it with:
docker compose up -d --build
And open at localhost:3000
which will generate a random scramble and proceed to solve it with the Blind method.
If you wish to work on the project clone the repo. For the backend and logic you will need to set up Poetry, follow the environment.md for further guidance. The different helping objects and functions used to solve the cube are found in backend/Solvers
. Fast API is set up in backend/api.py
. Magicube package is widelly used so might be a good idea to get familiar with it.
For the frontend its a bit of a mess. Most things happen in frontend/src/three-app.js
with additional logic we separated located in frontend/src/customCube.js
Dependencies are installed with:
npm i
And run the frontend from the /frontend folder with:
npm start
The team behind this project is a group of seven students at NTNU Trondheim from various study backgrounds. All a members of Cogito NTNU fall 2024.
![]() Eduard Prokhorikhin |
![]() Einride Osland |
![]() Even Ytterli Tokle |
![]() Gustav Natvig |
![]() Kien Le |
![]() Vetle |
![]() Viljen789 |