Vibe-coding a Rubik's Snake Simulator

It seems that browser-based simulations using three.js have become a kind of de-facto standard for exploring the capabilities of coding models to quickly "one-shot" prototypes and ideas.

Following an idea that i had in the back of my mind for quite a while now -- that the Rubik's Snake puzzle might be an interesting form factor for robotics -- I have started a to experiment with using coding LLMs to write simulation prototypes: on one hand, this allows me to get familiar with the configuration itself, one the other hand it lets me try out LLM-driven coding on a domain that I am somewhat, but not extremely knowledgable about.

Here are two different prototypes I built a few months apart:

  1. My initial attempt at using Perplexity and Copilot, which still took quite a bit of manual editing the core geometry to fix errors and inaccuracies. This allows twisting segments by clicking on the and rotating the model.
  2. The current version was rebuilt from scratch with Gemini 3 (completely through chat), including a few errors refinements. This version supports automatic random twisting as well as checking for "impossible" moves. I have then made a few more edits with Copilot to smooth out errors.

I have started tracking progress of this experiment on github. Eventually, I woud like to see the kinematics and control for a snake run in an environment like Asimov Gym, but as this is just a side project, I just playing around a bit for now.