About a year ago, an AI told me it could solve a Rubik’s Cube. It sounded confident. So I built a robot around that idea. Months later, the robot could solve the cube perfectly. The AI could not.
The idea
I built an open-source cube-solving robot: a camera reads all six sides, code translates colors into cube notation, and motors execute the moves. With the deterministic Kociemba solver library, it worked every time. Then I swapped in AI to generate the solving sequence, the whole point of the project, and it simply couldn’t.
I tried fine-tuning on about 200,000 solved examples, but a cube has around 43 quintillion states, so the model couldn’t generalize. I tried having AI write and run code that calls the solver, but the environment couldn’t install the library.
Why it matters
- AI is probabilistic. It predicts likely outputs from patterns. Solvers like Kociemba compute exact answers.
- Combine, don’t replace. The insight isn’t swapping algorithms for AI. It’s knowing how to use both.
- Make sure the juice is worth the squeeze. AI adds complexity and cost, so use it where it truly adds value.
Guilty of the AI hammer
Fair criticism: I went in with an AI hammer looking for nails. I see organizations doing the same thing. My final architecture was simple: vision reads the cube, a deterministic solver computes moves, and the robot executes.
The best systems are built when we know exactly where AI belongs.
Join the conversation: see the comments on LinkedIn.
Read the full transcript
hey I’m Matt.
About a year ago I started a project because an AI told me something interesting. It said it could solve a Rubik’s Cube.
It even explained the syntax it would use and how the cube state would be represented. It sounded very confident.
So I built a robot around that idea.
But here’s the twist.
After months of work, the robot could solve the cube perfectly… but AI could not.
Let me explain.
I built an open source Rubik’s Cube solving robot. I wrote code to photograph all six sides of the cube and translate the colors into cube state notation.
Once the cube state was known, the robot needed a solving sequence. Then the robot would physically rotate the cube and execute those moves.
Getting the mechanics right took a lot of trial and error. Motors, timing, alignment.
For testing I used a well known Python library called Koh-SIM-buh. It uses a deterministic algorithm that can solve a cube very efficiently.
And everything worked.
The robot scanned the cube, computed the solution, and solved it perfectly.
Then came the big moment.
I removed the Kociemba solver and asked AI to generate the solving sequence instead.
And it simply could not do it.
Keep in mind, using AI to solve the cube was the entire point of the project. And it just could not do it.
AI could talk about solving the cube. It could explain the cube. But it could not reliably generate the correct solving sequence.
So I started experimenting with other AI approaches.
First I tried model fine tuning. I generated about 200,000 training examples containing scrambled cube states and their correct solving sequences.
The goal was to train the model to learn how cubes get solved.
But a Rubik’s Cube has about 43 quintillion possible states.
Two hundred thousand examples barely scratches the surface of that problem space.
The model simply could not generalize my tuning to solving the cube.
Then I tried another approach.
Instead of asking AI to solve the cube, I asked it to write and run Python code that calls the koh-SIM-buh solver library.
In theory this should work perfectly.
But in practice the Gemini environment could not properly install and execute the solver library.
So that attempt failed too.
And that is when the project stopped being about a Rubik’s Cube and started reinforcing some important AI fundamentals.
This project reminded me of something experienced engineers already know.
AI is incredibly powerful, but it is probabilistic. It predicts likely outputs based on patterns.
Algorithms like the koh-SIM-buh cube solver are deterministic. They compute exact answers.
The real insight is not replacing algorithms with AI.
The real insight is knowing how to combine them.
Now I want to pause for a second.
You could criticize me and say, Matt, you went into this project with an AI hammer looking for AI nails.
And I would accept that criticism.
But this project highlights something I see happening in organizations right now.
Sometimes teams try to force AI directly into a problem, when the better approach is to step back and look at the whole technology stack.
AI should be used where it truly adds value.
Using AI also tends to make systems more complex and more expensive to operate, so you want to make sure the juice is worth the squeeze.
In my project the final architecture ended up being very simple.
The vision system reads the cube.
A deterministic solver computes the moves.
The robot executes the solving.
AI can help developers write code faster. It can reason about system design. It can dramatically increase productivity.
But not every problem should be handed entirely to AI.
Sometimes the smartest systems combine AI with proven algorithms.
That is the real lesson from this little Rubik’s Cube robot.
AI is incredibly powerful.
But the best systems are built when we know exactly where AI belongs.

Leave a Reply