Sunday, May 11, 2025

AI vibe coding Rubik's cube: GPT-4.1, ChatGPT & GitHub Copilot

After previous experiments of visualizing and solving Rubik's cube,
by using Gemini 2.5 Pro, and Sonnet AI models
I tried the same with ChatGPT, by using the 
same "second generation" prompt generated by Gemini

DraganSr: AI vibe coding Rubik's cube, Gemini, 2nd generation
that is also used for
DraganSr: AI vibe coding Rubik's cube: Sonnet, Claude & Github Copilot
and all started from 
DraganSr: AI code: "Vibe Coding" Rubik's cube with Google Gemini 2.5 Pro

Of all tested models, ChatGPT was the fastest to generate the code, 
and generated code was very compact. And it almost worked.
But even after about 10 iterations, and a lot of help, it still could not solve the cube.

To give it more help, I switched to VS Code with GitHub Copilot,
with selected the same GPT 4.1 model.
That improved the code a bit, fixed visual rotations, 
but the "solve" is still hit-and-miss, mostly miss.
Had to stop spending time on this, so here it is:
looks good, but not solving good.
Gemini wins, again.

View source to see the source code.

Interactive 3D Rubik's Cube

Drag to rotate cube view. Scroll to zoom.

Face Rotations
Manual Moves Log
Scramble
Scramble Sequence:
Actions
Solution Steps:
Loading...

No comments: