Table of Contents
Fetching ...

A Machine Learning Approach That Beats Large Rubik's Cubes

Alexander Chervov, Kirill Khoruzhii, Nikita Bukhal, Jalal Naghiyev, Vladislav Zamkovoy, Ivan Koltsov, Lyudmila Cheldieva, Arsenii Sychev, Arsenii Lenin, Mark Obozov, Egor Urvanov, Alexey Romanov

TL;DR

This work introduces a scalable ML-based pathfinding framework for extremely large Cayley-graph representations of Rubik's Cube groups, combining diffusion-distance predictions from a ResMLP network with a beam-search heuristic and a multi-agent voting scheme. Training data are cheaply generated from random walks, enabling diffusion-distance estimates to guide search without reliance on hand-crafted puzzle knowledge. The approach delivers unprecedented results on 4×4×4 and 5×5×5 cubes, surpassing Santa Challenge top solutions and achieving near-optimal performance on 3×3×3 scrambles with substantial gains in training and solving speed. Overall, the method provides a practical, scalable paradigm for graph pathfinding in large finite groups and related planning tasks, with open-source tooling and broad applicability to theoretical and applied domains.

Abstract

The paper proposes a novel machine learning-based approach to the pathfinding problem on extremely large graphs. This method leverages diffusion distance estimation via a neural network and uses beam search for pathfinding. We demonstrate its efficiency by finding solutions for 4x4x4 and 5x5x5 Rubik's cubes with unprecedentedly short solution lengths, outperforming all available solvers and introducing the first machine learning solver beyond the 3x3x3 case. In particular, it surpasses every single case of the combined best results in the Kaggle Santa 2023 challenge, which involved over 1,000 teams. For the 3x3x3 Rubik's cube, our approach achieves an optimality rate exceeding 98%, matching the performance of task-specific solvers and significantly outperforming prior solutions such as DeepCubeA (60.3%) and EfficientCube (69.6%). Additionally, our solution is more than 26 times faster in solving 3x3x3 Rubik's cubes while requiring up to 18.5 times less model training time than the most efficient state-of-the-art competitor.

A Machine Learning Approach That Beats Large Rubik's Cubes

TL;DR

This work introduces a scalable ML-based pathfinding framework for extremely large Cayley-graph representations of Rubik's Cube groups, combining diffusion-distance predictions from a ResMLP network with a beam-search heuristic and a multi-agent voting scheme. Training data are cheaply generated from random walks, enabling diffusion-distance estimates to guide search without reliance on hand-crafted puzzle knowledge. The approach delivers unprecedented results on 4×4×4 and 5×5×5 cubes, surpassing Santa Challenge top solutions and achieving near-optimal performance on 3×3×3 scrambles with substantial gains in training and solving speed. Overall, the method provides a practical, scalable paradigm for graph pathfinding in large finite groups and related planning tasks, with open-source tooling and broad applicability to theoretical and applied domains.

Abstract

The paper proposes a novel machine learning-based approach to the pathfinding problem on extremely large graphs. This method leverages diffusion distance estimation via a neural network and uses beam search for pathfinding. We demonstrate its efficiency by finding solutions for 4x4x4 and 5x5x5 Rubik's cubes with unprecedentedly short solution lengths, outperforming all available solvers and introducing the first machine learning solver beyond the 3x3x3 case. In particular, it surpasses every single case of the combined best results in the Kaggle Santa 2023 challenge, which involved over 1,000 teams. For the 3x3x3 Rubik's cube, our approach achieves an optimality rate exceeding 98%, matching the performance of task-specific solvers and significantly outperforming prior solutions such as DeepCubeA (60.3%) and EfficientCube (69.6%). Additionally, our solution is more than 26 times faster in solving 3x3x3 Rubik's cubes while requiring up to 18.5 times less model training time than the most efficient state-of-the-art competitor.

Paper Structure

This paper contains 15 sections, 3 figures, 3 tables.

Figures (3)

  • Figure 1: Proposed ML solution for Rubik's cube solving: (a) proposed multi-agent solver's process flow; (c) ResMLP neural network architecture; (b) an example of beam search pathfinding on 3$\times$3$\times$3 cube's graph using $W=40$.
  • Figure 2: Influence of model parameters on solution length for 3$\times$3$\times$3 and 4$\times$4$\times$4 cubes (jitter plot): (a) influence of the model size, trainset sizes, and model depth on average solution length; (b) influence of the beam width on average solution length.
  • Figure 3: Average solution length of the proposed multi-agent approach depending on the number of agents composing its output for (c) 3$\times$3$\times$3, (e) 4$\times$4$\times$4, and (f) 5$\times$5$\times$5 Rubik's cubes. Solid line -- random set of the agents, dashed line -- best set. Distribution of solution lengths for (c) 3$\times$3$\times$3, (d) 4$\times$4$\times$4, and (e) 5$\times$5$\times$5 Rubik's cubes for the best ensemble.