Sunday, May 11, 2025

AI vibe coding Rubik's cube: Sonnet, Claude & Github Copilot

After "solving" Rubik's cube challenge with Google Gemini 2.5 Pro first time
and then solving this again with "second generation" prompt generated by Gemini,
it was time to test the "theory" with other AI tools and models.

DraganSr: AI code: "Vibe Coding" Rubik's cube with Google Gemini 2.5 Pro

DraganSr: AI vibe coding Rubik's cube, Gemini, 2nd generation

So I used the same exact 2nd gen prompt generated by Gemini

Claude.ai was able to generate some code, but "free" account has a limit on length of output.
And even attempts to make code more compact, it was being blocked near end of code.

So I took generated code to VS Code GihHub Copilot, with the same Sonnet 3.7 model, to complete it and make it work. In all, this took 5-6 iterations, with very specific help from me, and the solution worked!

So Sonnet is also very good in coding, in particular when prompted and guided well.
Maybe not as good as Gemini for this task, but close.

Here is the working solution. Can use web browsers "view source" to see the source code.



Interactive 3D Rubik's Cube

Drag to rotate cube view. Scroll to zoom.

Face Rotations
Slice Rotations (3x3x3 only)
Manual Moves Log
Scramble
Scramble Sequence:
Actions
Solution Steps:
Loading...

No comments: