Developed by Nik | Final Year B.Tech (ECE), NIT Agartala
- Overview
- Key Features
- System Architecture
- Installation & Setup
- User Manual
- Algorithmic Core
- Analytical Engine
- Reinforcement Learning Agent
- Performance Metrics
- Project Structure
- Future Roadmap
- Contact & License
AIM (Autonomous Intelligent Model) is a dual-engine Rubik’s Cube intelligence system that unifies classical algorithmic solving with modern reinforcement learning research.
It is not just a cube solver— it is a simulation lab, built for experimentation, visualization, optimization, and AI behavior analysis.
AIM provides:
- ⚡ A high-performance solver capable of instantly solving any NxN cube (2×2 → 30×30)
- 🤖 A Q-Learning agent that learns how to solve a 2×2 cube from scratch
- 🎨 A Cyber-Tech Streamlit interface for real-time logs, visual cube states, charts & training analytics
-
Universal cube size support: 2×2 to 30×30
-
Reverse-Scramble with Move Optimization
-
<0.01s solution latency
-
Intelligent move cleanup:
R R'→ removedU U→U2F F2→F'
-
Real-time visual cube net rendering
-
Tabular Q-Learning implementation for 2×2
-
Adjustable hyperparameters (α, γ, ε)
-
Training visualization with:
- Reward convergence plots
- Epsilon decay analysis
-
Supports user-defined scramble depth & batch episodes
-
Model testing after training
- Dark futuristic theme
- Scrollable system logs
- Clean sidebar controls
- Professional analytic visualizations
- N×N matrix representation
- Uses
numpy.rot90()for efficient face rotations - Maintains full move history
- Reverse-Scramble + Optimizer for instant solutions
- State-Hash → Q-Values mapping
- Bellman Update function
- Training loop handling: Action → Environment Step → Reward → Q-Update
- Exploration vs. Exploitation balancing
- Python 3.8+
- pip package manager
git clone https://github.com/your-username/aim-rubiks-solver.git
cd aim-rubiks-solverpip install streamlit numpy pandasstreamlit run app.pyThe app starts at: http://localhost:8501
-
Choose Cube Order (N)
-
Click Scramble Cube
-
Click Solve Cube
-
Observe:
- Move Optimization
- Execution Time
- Visual Cube State
- Set batch size & scramble depth
- Start training
- Watch reward convergence graph rise
- Test the agent’s learned policy
For a scramble:
R U F
The inverse solution is:
F' U' R'
Then an optimizer refines:
R R'→ removedR R→R2R R2→R'
This produces minimal, elegant move sequences.
-
State (S): Flattened color hash of cube
-
Actions (A): 12 face turns
-
Reward (R):
+100for solving-0.1per move
Q-Update Rule:
Q(S,A) ← Q(S,A) + α [ R + γ max(Q(S'),A') − Q(S,A) ]
The agent gradually discovers efficient solve paths.
| Engine Type | Cube Size | Success Rate | Avg. Time |
|---|---|---|---|
| Analytical | 3×3 | 100% | ~0.001s |
| Analytical | 20×20 | 100% | ~0.005s |
| RL Agent | 2×2 | ~85% | Varies |
RL performance depends on training duration and scramble depth.
AIM-Rubiks-Solver/
│── app.py # Main Application
│── README.md # Documentation
│── requirements.txt # Dependencies
└── assets/ # Images / diagrams
- 3D Cube Visualization (Three.js / PyDeck)
- Deep Q-Network (DQN) for 3×3 learning capability
- Kociemba’s Two-Phase Algorithm integration
- Exportable solution logs
- Performance benchmarking suite
Developer: Nik Role: Final Year B.Tech (ECE) Institution: NIT Agartala
License: MIT License
Made with ❤️ and Python.