Scrambling A Rubik’s Cube With Animation Nodes

Hey,
I’m trying to use the Animation Nodes addon to procedurally scramble and solve a Rubik’s Cube.
I’ve got the basic mechanics of rotating the sides working, but I can’t find a way to make AN “remember” previous rotations, as demonstrated in the video. I’ve spent over 40 hours just on this problem, and tried several things that wound up not working. The closest I got was having it re-calculate all previous rotations from scratch with each new rotation step. However, after 9+ different rotations, it became unworkably slow.
I’ve included written documentation in the .blend file describing what different parts of the node-tree are doing.
Thank you very much for your input; I know this one’s a bit technical.

Rubik’s Cube 5th Try v2.82.blend (1.8 MB)

Hey, have you checked this thread out over at StackExchange ?

1 Like

No idea if the following is possible and if so how efficient, but here goes nothing…

Is it possible to script this ?
Each indivigual cube of the rubrik’s would be a six item, 4 dimension array. Each ‘item’ would be a side/color of a single cube, then with-in the item there would be the row and column number for solved rubiks and a row and column number for current position. Or maybe two dimensions, solved coordinates and current coordinates. Long ago i did a tile based game in VB6 and from what i remember i did it similare to this, but that was on a 2d flat board, not a 3d cube. Anyway, thought i would toss it out there. Hummm… guess you would need more then just row and col, you would need row, col and col-depth.

1 Like

Thank you, that looks useful.

Probably. I have almost no experience with scripting, but it should be simple enough. Yesterday I started looking into making “set parent” and “clear parent” nodes.