cubular is an automatic solver for a 9x9x9 cube, that has a specific arrangement of digits from 1 to 9, and can be manipulated by moves of rotating 3x3x3 sub-cubes. The solver must take any puzzle state and figure out moves to return it back to the initial state.

This cube and puzzle challenge originated from CGCC (a site that hosts programming competitions) and was unanswered for 4.5 years. The number of possible puzzles is so large that a brute-force approach would never finish, so any answer to the challenge would need to figure out a method for solving it.

I did just that — I wrote a Rust program to simulate the puzzle, and started playing with it. Eventually, I figured out how to solve some parts of the cube – first a single piece in the corner, then a whole layer. Solving just the first layer takes hundreds of moves! I continued to develop a method to identify and codify similar approaches for the different steps towards the solved cube.

At that point, I had written a valid answer to the challenge — a Rust program that would take a scrambled puzzle and output the moves to solve it. However, submitting just the code didn't feel like enough, so I starting writing an explanation of what, exactly, the method was.

In the end, writing the explanation took significantly longer than writing the solution itself — partly because I designed the explanation to be accessible even to those who have never touched a twisty puzzle. To this end, I created an interactive playground for the puzzle, where one can explore how the cube works, and added several custom, interactive illustrations of the solving process to the explanation.

Including an extensive explanation in my answer allowed others to understand and engage, and enhanced the site more than just the code itself would have. In the end, my answer received numerous awards, including the "Best Explanation" category in Best of CGCC 2021!