Skip to content
All projects

Case study · Full-Stack Developer · Computer Vision

Cube Solver

camera-based Rubik's cube solver

Hold a Rubik's cube up to the camera and it reads each side on its own, fills in a 3D model as it goes, then walks you to solved in about 20 turns, never more than 22. Made for people who have never solved a cube.

Screenshot of Cube Solver

The problem

Most solvers expect you to type in all 54 stickers and already know cube notation like R U R' U'. The goal was a solver for someone who has never solved a cube: show it the cube, then follow the arrows.

Decisions that shaped it

  1. 1

    No shutter button. The camera reads colours in the browser about ten times a second and captures a side as soon as the reading holds steady for about 0.3 seconds, in any order and held any way up. Once all six sides are in, the app works out which way up each one was held.

  2. 2

    Check the cube before solving it. The app verifies the scanned cube is physically possible. If a colour was misread it says exactly what is wrong ("one corner is twisted in place") and pulses the least-confident stickers so they can be fixed by hand.

  3. 3

    Short solutions without jargon. A built-in two-phase solver finds about 20 turns, never more than 22, played one arrow at a time on a 3D cube at Slow, Normal or Fast speed. Notation is explained only if you ask for it.

  4. 4

    Phones are a first-class layout: three screens (Scan, Check, Solve) behind a bottom tab bar, every control at least 44 px tall, and photo upload for when there is no webcam.

Built with

  • Python
  • FastAPI
  • OpenCV
  • NumPy
  • SciPy
  • JavaScript
  • cubing.js
Next case studyiTantra