You are on page 1of 6

Solve the Rubik's Cube

Using Deep Learning

Qisheng Zhang
Background
• Rubik's Cube
• 33 − 1 = 26 cubelets
• 6 centers, 12 edges, 8 corners
• 6 × 32 = 54 stickers
• 6 × 4 = 24 orientations
• Demo: https://iamthecu.be/
History
• God's Number
• Half-turn metric
• 𝐹𝐹, 𝐹𝐹 ′ , 𝐹𝐹𝐹, 𝐵𝐵, 𝐵𝐵′ , 𝐵𝐵𝐵, 𝐿𝐿, 𝐿𝐿′ , 𝐿𝐿𝐿, 𝑅𝑅, 𝑅𝑅′ , 𝑅𝑅𝑅, 𝑈𝑈, 𝑈𝑈 ′ , 𝑈𝑈𝑈, 𝐷𝐷, 𝐷𝐷 ′ , 𝐷𝐷𝐷
• http://www.cube20.org/
• Quarter-turn metric
• 𝐹𝐹, 𝐹𝐹 ′ , 𝐵𝐵, 𝐵𝐵′ , 𝐿𝐿, 𝐿𝐿′ , 𝑅𝑅, 𝑅𝑅′ , 𝑈𝑈, 𝑈𝑈 ′ , 𝐷𝐷, 𝐷𝐷𝐷
• http://www.cube20.org/qtm/
Rule-based Approach

• Kociemba's Algorithm
• https://www.jaapsch.net/puzzles/compcube.htm#kocal
• Demo
• Local: https://pypi.org/project/kociemba/
• Online: https://rubiks-cube-solver.com/
Deep Reinforcement Learning Approach
• Paper
• 20 × 24 states
• Centers remain the same after moves
• 12 actions
• 𝐹𝐹, 𝐹𝐹 ′ , 𝐵𝐵, 𝐵𝐵′ , 𝐿𝐿, 𝐿𝐿′ , 𝑅𝑅, 𝑅𝑅′ , 𝑈𝑈, 𝑈𝑈 ′ , 𝐷𝐷, 𝐷𝐷𝐷
• Methods
• Autodidactic Iteration
• Using best next state to train
• State Sampling
• Using distance weight
• Monte Carlo Tree Search
• Using the tree to find the goal state
• Expanding the tree to search the shortest path
Deep Reinforcement Learning Approach
• Links
• Paper
• https://cse.sc.edu/~foresta/assets/files/SolvingTheRubiksCubeWithDeepReinforcementLearningAndSear
ch_Final.pdf
• Code
• https://github.com/forestagostinelli/DeepCubeA
• Demo
• Online: https://deepcube.igb.uci.edu/
• Local: https://github.com/tail-island/rubic-cube
• Visualization
• Hard positions: http://www.cube20.org/distance20s/
• distance-24 positions
• U U F U L' U' F R F D R F L L B U D B' L' U R D' B R
• U U F B B U U D B R' U L' B' U L U' L F' U R' U' D R' D'
• distance-26 positions
• U U F U U R' L F F U F' B' R L U U R U D' R L' D R' L' D D

You might also like