i built a simple module to simulate a cube of any choice nxn size you can give it moves it gives you states you can give multiple moves it can give multiple states you can also give starting state and end state it can give you list of possible of moves etc
i also built a small visualizer for myself just because it’s easier as a human to decipher.
i only used cube cubes so it’s less clusterfuck but ig later we can try different shapes (pyramids, mirror, hexagon i used to be a huge nerd about these so trust me there’s an infinite list beyond the normal cubes)
notation and representation
my goal was to keep this like arc agi eval convert the visual/spatial test to a json and have the llm read and solve it so the orientation was pretty straight forward. first of all the faces of the cube were each denoted by their position front was F , back was B, left was L right was R, and up and down were U and D respectively this is the standard notation. i did how ever add a a new rule so for layers from that face to move the starting would be denoted by 0 and the layers inside subsequently would be denoted by the following numbers so, in a 3x3 cube the outermost layer on right is R0 middle one is R1 and left is R2 and vice versa for left. similarly mapping to the other layers. this made it easier for me to instruct middle layer movements if any in bigger cubes. in all solved cubes the orientation of colors are on the same face so it’s easier to code the direction the mapping is :
F -> Green
B -> Blue
U -> White
D -> Yellow
L -> Orange
R -> Red
when representing the cube it’s state are read from left to right top to bottom each cubie (cubie is each piece on that face). in an array format for example the up layer in a solved state it’s white everywhere
"U": [
[
"W",
"W",
"W"
],
[
"W",
"W",
"W"
],
[
"W",
"W",
"W"
]
],
each object in the array is one cubie by it’s color if say it had the left layer on the front face was of all color red it would be
"U": [
[
"R",
"R",
"R"
],
[
"W",
"W",
"W"
],
[
"W",
"W",
"W"
]
],
movement
moves are also denoted by whatever layer we want to move with respect to facing the front face so U moves the upper layer R moves the right layer the way we denote inner layers is also how we move them so in a 3x3 cube R1 moves the middle layer. all of these are clockwise movements to we can also move them anti clockwise with a prime movement R’, L’, U’ are all anti clockwise movements. we do not rotate the cube or allow any such instruction because of the added complexity and confusion for both the human and the LLM.
this now becomes a set like arc agi, i also created three scripts for each type test to generate infinite sets of each around which i can create my agents and test them and so on…