A modern implementation of the DeepCubeA algorithm for solving Rubik's Cube using neural networks and A search with web visualization*
The system comprises two main components:
- Deep neural network: MLP with residual blocks
- Trained with DAVI (Deep Approximate Value Iteration)
- Predicts the number of moves required to solve the cube from any state
- Weighted A search* using J(s) as heuristic
- Beam Search as alternative for fast solutions
- Batch optimizations for state evaluation
- FastAPI REST API server
- PyTorch neural network implementation
- DAVI training algorithm for cost-to-go function
- A solver* with neural heuristic
- Model persistence and evaluation tools
- Runs on
localhost:8000
- React 18 modern web interface
- Three.js 3D Rubik's cube visualization
- Real-time animations of solving process
- Interactive controls for manual manipulation
- Runs on
localhost:3000
# Clone the repository
git clone https://github.com/theosorus/deep-rubiks
cd deep-rubiks
# Build containers
docker compose build
# Launch the application
docker compose upThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- 🌐 Open the interface at
http://localhost:3000 - 🎲 Shuffle the cube with the Shuffle button
- 🧠 Solve with the Solve button - watch the AI work!
- 🎮 Explore: manual rotations, reset, face labels...
- Accuracy: Optimal solutions in >95% of cases
- Speed: Resolution in <1 second for most configurations
- Robustness: Works on scrambles up to 30 moves
- Visualization: Smooth animation of found solutions
This project implements the algorithm described in:
"Solving the Rubik's Cube with Deep Reinforcement Learning and Search"
McAleer et al. (2018)
