A Million Of Rubik's Cube Best Moves
A million of rubik cubes and their best next move.
@kaggle.marcellosemboli_rubik_1m
A million of rubik cubes and their best next move.
@kaggle.marcellosemboli_rubik_1m
This dataset contains a million of Rubik's cube status along with the best next move for each status.
This dataset is generated by this notebook, check it out for more information:
https://www.kaggle.com/code/marcellosemboli/one-million-of-rubik-cube-moves
Notations below are taken from World Cube Association.
A solved cube has 6 faces and 6 colors:
Faces are coded as follows:
Colors are coded as follow:
Each face has 9 tiles (from 0 to 8) for a total of 6 x 9 = 54 tiles.
Names of tiles are U0,..,U8,L0,..,L8,..,D8
A status of cube is a tuple of 54 colors, 9 tiles for each of 6 faces.
According to the python rubik-cube module a solved cube status is:
WWWWWWWWWOOOGGGRRRBBBOOOGGGRRRBBBOOOGGGRRRBBBYYYYYYYYY
In numbers:
000000000111222333444111222333444111222333444555555555
The status of the same cube after L move is:
400400400111022333445111022333445111022333445255255255
See below for other examples.
Rubik's cube has 12 possible moves, 6 clockwise and 6 counterclockwise, coded as follows:
Clockwise
Counterclockwise
Double moves as U2, L2 etc. are not used.
A scramble is a sequence of moves, where subsequent moves are'nt opposite. Sequences of three same moves are excluded as well.
Since the God's number is 20, I will use scrambles of maximum 20 moves and the opposite of last move is the best move for a solve of that scramble.
The dataset is a csv file were each line is a status of the cube, and the best move for that status.
Columns from 0 (the first) to 53 are named after tiles position in status of the cube, and contains the color number.
Last 12 columns are named after moves and are all 0 except the best move is 1.
U0,U1,U2,U3,U4,U5,U6,U7,U8,L0,L1,L2,F0,F1,F2,R0,R1,R2,B0,B1,B2,L3,L4,L5,F3,F4,F5,R3,R4,R5,B3,B4,B5,L6,L7,L8,F6,F7,F8,R6,R7,R8,B6,B7,B8,D0,D1,D2,D3,D4,D5,D6,D7,D8,U,L,R,F,B,D,Ui,Li,Ri,Fi,Bi,Di
For a total of 54 + 12 = 66 columns.
Each row is 132 bytes, one million rows are 132M bytes = 126 Mb.
CREATE TABLE rubik_1m (
"u0" BIGINT,
"u1" BIGINT,
"u2" BIGINT,
"u3" BIGINT,
"u4" BIGINT,
"u5" BIGINT,
"u6" BIGINT,
"u7" BIGINT,
"u8" BIGINT,
"l0" BIGINT,
"l1" BIGINT,
"l2" BIGINT,
"f0" BIGINT,
"f1" BIGINT,
"f2" BIGINT,
"r0" BIGINT,
"r1" BIGINT,
"r2" BIGINT,
"b0" BIGINT,
"b1" BIGINT,
"b2" BIGINT,
"l3" BIGINT,
"l4" BIGINT,
"l5" BIGINT,
"f3" BIGINT,
"f4" BIGINT,
"f5" BIGINT,
"r3" BIGINT,
"r4" BIGINT,
"r5" BIGINT,
"b3" BIGINT,
"b4" BIGINT,
"b5" BIGINT,
"l6" BIGINT,
"l7" BIGINT,
"l8" BIGINT,
"f6" BIGINT,
"f7" BIGINT,
"f8" BIGINT,
"r6" BIGINT,
"r7" BIGINT,
"r8" BIGINT,
"b6" BIGINT,
"b7" BIGINT,
"b8" BIGINT,
"d0" BIGINT,
"d1" BIGINT,
"d2" BIGINT,
"d3" BIGINT,
"d4" BIGINT,
"d5" BIGINT,
"d6" BIGINT,
"d7" BIGINT,
"d8" BIGINT,
"u" BIGINT,
"l" BIGINT,
"f" BIGINT,
"r" BIGINT,
"b" BIGINT,
"d" BIGINT,
"ui" BIGINT,
"li" BIGINT,
"fi" BIGINT,
"ri" BIGINT,
"bi" BIGINT,
"di" BIGINT
);CREATE TABLE rubik_1m_2 (
"u0" BIGINT,
"u1" BIGINT,
"u2" BIGINT,
"u3" BIGINT,
"u4" BIGINT,
"u5" BIGINT,
"u6" BIGINT,
"u7" BIGINT,
"u8" BIGINT,
"l0" BIGINT,
"l1" BIGINT,
"l2" BIGINT,
"f0" BIGINT,
"f1" BIGINT,
"f2" BIGINT,
"r0" BIGINT,
"r1" BIGINT,
"r2" BIGINT,
"b0" BIGINT,
"b1" BIGINT,
"b2" BIGINT,
"l3" BIGINT,
"l4" BIGINT,
"l5" BIGINT,
"f3" BIGINT,
"f4" BIGINT,
"f5" BIGINT,
"r3" BIGINT,
"r4" BIGINT,
"r5" BIGINT,
"b3" BIGINT,
"b4" BIGINT,
"b5" BIGINT,
"l6" BIGINT,
"l7" BIGINT,
"l8" BIGINT,
"f6" BIGINT,
"f7" BIGINT,
"f8" BIGINT,
"r6" BIGINT,
"r7" BIGINT,
"r8" BIGINT,
"b6" BIGINT,
"b7" BIGINT,
"b8" BIGINT,
"d0" BIGINT,
"d1" BIGINT,
"d2" BIGINT,
"d3" BIGINT,
"d4" BIGINT,
"d5" BIGINT,
"d6" BIGINT,
"d7" BIGINT,
"d8" BIGINT,
"u" BIGINT,
"l" BIGINT,
"f" BIGINT,
"r" BIGINT,
"b" BIGINT,
"d" BIGINT,
"ui" BIGINT,
"li" BIGINT,
"fi" BIGINT,
"ri" BIGINT,
"bi" BIGINT,
"di" BIGINT
);CREATE TABLE rubik_1m_3 (
"u0" BIGINT,
"u1" BIGINT,
"u2" BIGINT,
"u3" BIGINT,
"u4" BIGINT,
"u5" BIGINT,
"u6" BIGINT,
"u7" BIGINT,
"u8" BIGINT,
"l0" BIGINT,
"l1" BIGINT,
"l2" BIGINT,
"f0" BIGINT,
"f1" BIGINT,
"f2" BIGINT,
"r0" BIGINT,
"r1" BIGINT,
"r2" BIGINT,
"b0" BIGINT,
"b1" BIGINT,
"b2" BIGINT,
"l3" BIGINT,
"l4" BIGINT,
"l5" BIGINT,
"f3" BIGINT,
"f4" BIGINT,
"f5" BIGINT,
"r3" BIGINT,
"r4" BIGINT,
"r5" BIGINT,
"b3" BIGINT,
"b4" BIGINT,
"b5" BIGINT,
"l6" BIGINT,
"l7" BIGINT,
"l8" BIGINT,
"f6" BIGINT,
"f7" BIGINT,
"f8" BIGINT,
"r6" BIGINT,
"r7" BIGINT,
"r8" BIGINT,
"b6" BIGINT,
"b7" BIGINT,
"b8" BIGINT,
"d0" BIGINT,
"d1" BIGINT,
"d2" BIGINT,
"d3" BIGINT,
"d4" BIGINT,
"d5" BIGINT,
"d6" BIGINT,
"d7" BIGINT,
"d8" BIGINT,
"u" BIGINT,
"l" BIGINT,
"f" BIGINT,
"r" BIGINT,
"b" BIGINT,
"d" BIGINT,
"ui" BIGINT,
"li" BIGINT,
"fi" BIGINT,
"ri" BIGINT,
"bi" BIGINT,
"di" BIGINT
);Anyone who has the link will be able to view this.