The goal of this competition is to develop solving methods for  [5x5x5 Rubic's Cube](https://en.wikipedia.org/wiki/Professor%27s_Cube) (aka Professor's Cube) puzzle as optimal as possible.

The ideal goal is to develop method which will solve the puzzle optimally, i.e. to find solutions with minimal possible number of moves. That is called [God's algorithm](https://en.wikipedia.org/wiki/God%27s_algorithm). Such problems are known to be hard, and such method has not yet found, despite 40+ years the puzzle exists. Neither the [God's number](https://en.wikipedia.org/wiki/God%27s_algorithm) is known. With the advance of technology and in particular machine learning methods it might be the problem of optimal solution is within reach. Try hard and be the first in the humankind history to achieve it.  

The challenge is almost identical to the [Kaggle Santa 2023 challenge ](https://www.kaggle.com/competitions/santa-2023), with the only difference to focus on the single puzzle. The advanced machine learning methods are proposed e.g. in [CayleyPy project ](https://cayleypy.github.io/cayleypy-docs/api.html), [CayleyPy-Cube](https://arxiv.org/abs/2502.13266), [CayleyPy-RL](https://arxiv.org/abs/2502.18663), [CayleyPy-Growth](https://www.arxiv.org/abs/2509.19162). CayleyPy is open-source crowd-sourcing project to develop effective AI-based library for mathematics - you are welcome to contribute - contact us. For the challenge you are welcome to use any methods you prefer, only score matters.

**Computer science perspective - it is a sorting problem**
In our setting, each tile has one of 6 colors like the original 5x5x5 Rubic's cube. That means that states - are the vectors of 150 elements, with 25 elements of color 0, 25 other elements of color 1 and so on up to color 5. The puzzle is considered to be solved if its state is a sorted vector: [0,0,...,5,5]. The transitions between the states (aka the moves) are can be taken from some subset permutations of the tiles.

This setting can be seen as somewhat similar to a sorting problem -- eg the simplest [bubble sort](https://en.wikipedia.org/wiki/Bubble_sort) allows only transpositions of neighbour positions, while in puzzle setup allowed permutations - are exactly those which describe the moves ([example for cubes](https://www.kaggle.com/code/marksix/visualize-allowed-moves)). [Pancakes sorting](https://en.wikipedia.org/wiki/Pancake_sorting) is another example (with Bill Gates involved - not a joke). 

**Broader Mathematical Context - groups and Cayley graphs**
From a mathematical  perspective  it is a typical task in mathematics: decompose an element of a group into a product of given generators ("moves"), or, in the other words, find a path on the [Cayley graph](https://en.wikipedia.org/wiki/Cayley_graph) of a group. For example - [bubble sort](https://en.wikipedia.org/wiki/Bubble_sort) algorithm provides the shortest paths on the the [permutohedron](https://en.wikipedia.org/wiki/Permutohedron) Cayley graph - with nodes all n! permutations, and edges connect permutations different only in neighbour positions - thus represents a permutation as a sequence of neighbour transpositions. Length of the decomposition (path) is called "[word metric](https://en.wikipedia.org/wiki/Word_metric)" in group theory. Research on Cayley graphs is of fundamental importance for mathematics and the field contains many notoriously hard problems, which has been addressed by renowned mathematicians such as [M. Gromov](https://en.wikipedia.org/wiki/Mikhael_Gromov_(mathematician)) ([theorem](https://en.wikipedia.org/wiki/Gromov%27s_theorem_on_groups_of_polynomial_growth)) and [T. Tao](https://en.wikipedia.org/wiki/Terence_Tao) ([posts](https://terrytao.wordpress.com/2010/07/10/cayley-graphs-and-the-geometry-of-groups/)), among others. Moreover, it has numerous applications, ranging from bioinformatics (e.g., estimating evolutionary distance—"[Transform men into mice](https://ieeexplore.ieee.org/abstract/document/492588/)" 😃), to the optimisation of [interprocessor networks](https://ieeexplore.ieee.org/document/21148), and beyond.  Famous computer scientist [Donald Knuth ](https://en.wikipedia.org/wiki/Donald_Knuth) contributed to [improving the algorithm](https://arxiv.org/abs/math/9201304) to solve the problems like that. Such algorithm is implemented in computer algebra systems like [GAP/SAGE](https://doc.sagemath.org/html/en/reference/groups/sage/groups/perm_gps/cubegroup.html), however these methods are [not efficient](https://mathoverflow.net/q/482661/10446) ([notebook](https://www.kaggle.com/code/alexandervc/gap-cannot-solve-rubik-s-cube-444)) on large groups. And the challenge is to improve them. 

**Broader RL Context - RL with severely sparse reward**
The problem is a typical reinforcement learning problem - states of puzzle (nodes of Cayley graph) is a space of states, moves (edges of Cayley graph) - are actions, while rewards (penalties) are always "1", unless you found the solution. 
The cumulative reward (penalty) becomes exactly the length of the path to the solution state. And goal is to minimize it, i.e. to find the shortest path. Value function has very clear and natural interpretation - length of the path. Bellman equation for the value function comes from trivial relation on path length. (See [CayleyPy-RL](https://arxiv.org/abs/2502.18663) for more details). There is a severe  "sparse reward problem", since "always 1" is meaningless reward (only tiny detail that for the solution state reward is not 1, but 0, makes setup meaningful). Thus advancing the challenge you will contribute to development of RL methods overcoming the "sparse reward problem" on extremely huge spaces like 10^33 and beyond.

**Other changeless from our team**
This challenge is one of several challenges we've run to advance the research of Cayley Graphs on varous interesting groups. Some methods from challenge might be easily transferable to the other ones. Here is the full list of what is available:

[Pancake sorting](https://www.kaggle.com/competitions/CayleyPy-pancake)
[Transposons](https://www.kaggle.com/competitions/cayleypy-transposons)
[Reversals](https://www.kaggle.com/competitions/cayleypy-reversals)
[Glushkov problem](https://www.kaggle.com/competitions/cayleypy-glushkov)
[RapapportM2](https://www.kaggle.com/competitions/cayleypy-rapapport-m2)
[Rubik's cube 444](https://www.kaggle.com/competitions/cayley-py-444-cube)
[Rubik's cube 555](https://www.kaggle.com/competitions/cayley-py-555-cube)
[Rubik's cube 666](https://www.kaggle.com/competitions/cayley-py-666-cube)
[Rubik's cube 777](https://www.kaggle.com/competitions/cayley-py-777-cube)
[Professor Tetraminx](https://www.kaggle.com/competitions/cayley-py-professor-tetraminx-solve-optimally)
[Megaminx](https://www.kaggle.com/competitions/cayley-py-megaminx)
[Christophers jewel](https://www.kaggle.com/competitions/cayleypy-christophers-jewel)
[SuperCube from IHES](https://www.kaggle.com/competitions/cayleypy-ihes-cube)

LRX series - [OEIS-A186783 conjecture](https://www.kaggle.com/competitions/lrx-oeis-a-186783-brainstorm-math-conjecture),  [Towards God's algorithm](https://www.kaggle.com/competitions/lrx-discover-math-gods-algorithm) , [Binary states 0/1](https://www.kaggle.com/competitions/lrx-binary-in-search-of-gods-number) - just three moves - L,R - left/right cyclic shifts, X - eXchange positions 0 and 1.   Questions go back to  "one of the founding fathers of Soviet cybernetics" [V.M. Glushkov](https://en.wikipedia.org/wiki/Victor_Glushkov) 1968 seminal work and are still unsolved. See survey [link1](https://library.keldysh.ru/prep_vw.asp?lg=e&pid=8508) , [link2](https://www.kaggle.com/datasets/alexandervc/cayleypy-development-3-growth-computations/data?select=Glukhov_Zubov1999review.pdf) (pages 21-22).

**Similar Challenges**
[Kaggle Santa 2023 challenge ](https://www.kaggle.com/competitions/santa-2023) - several puzzles: cubes, rings, globes. 