EveryCube - Explore all 43 quintillion Rubik's Cube states

Show HN: Scroll through all 43252003274489856000 Rubik's Cube states

EveryCube - Explore all 43 quintillion Rubik's Cube states

EveryCube is a web-based visualization tool that lets you scroll through all 43,252,003,274,489,856,000 possible states of a Rubik's Cube. It offers interactive 2D and 3D views, with presets like the Superflip and Checkerboard patterns. You can navigate through permutations using counters and adjust the display speed. Built by Alen, this project provides a mesmerizing way to comprehend the immense combinatorial complexity of the cube, making it a fascinating resource for puzzle enthusiasts and mathematicians alike.

Scroll through the entire universe of Rubik's Cube states—every single one of the 43 quintillion permutations is at your fingertips.
  1. noduerme

    I wrote a 3d rubiks cube slot machine for my old online casino. It scrambled the cube randomly 4 times and gave the player 60 seconds to solve it by twisting up to 3 times. Lots of weird quaternion math to handle the spinning and shift key twisting at the same time. All with simple geometry in Away3D / AS3.

    The real hard part of designing that game was creating the payout structure. The game paid an equal amount for each "line" of 3 colors in a row on any face after the player made their third move. There was a progressive take and jackpot for a perfect solution. And I specifically wanted to target a zero house edge for the game, to reward the best problem solvers. So the question was, given 4 random twists off a perfect cube, what are the individual chances of getting 64, 63, 62...1 lines of sequential color given the best 3 spins from the initial random state, and then hiw to allocate the payout structure accordingly.

    Probably a billion monte carlo runs and I had a pay table. It was lots of fun. I wish more gambling games rewarded skill that way.

  2. zetanor

    Sweet, can I mint these as NFTs? I don't know how to multiply 43252003274489856000 by 50 USD but I think it could make me a lot of money, and I like money.

  3. jcims

    My scroll wheel covers about 12 states per inch of travel. Did the stubby pencil work and it would take about 9.5 years to scroll through them all if the wheel surface was moving at the speed of light.

  4. dcanelhas

    This is a nice visualization.

    Are there any keyboard keys to just advance one position along the line? I tried the arrow keys but they jumped quite far.

    I don't know how this was generated (BFS and flattening?) it seems adjacent indices aren't just one move apart ... but they could be!

    There is a Hamiltonian circuit for Rubik's cube:

    https://bruce.cubing.net/ham333/rubikhamiltonexplanation.htm...

    Following the circuit would be like Gray codes instead of binary digits. You only flip one bit at a time when going to the next number.

  5. snowwrestler

    Reminds me of a book I recently read:

    https://en.wikipedia.org/wiki/A_Short_Stay_in_Hell

    The numbers produced by permutations are astounding! Especially compared to the (much smaller) numbers in our actual physical universe.

  6. tantalor

    The color interpolation in 2D mode is bad. Instead of interpolating through RGB, you should use OKLCH

    Demo: https://jsfiddle.net/t80eLfc2/2/

    Interpolating in RGB just uses linear interpolation on each channel, so it ends up passing through grey in a lot of cases, and the colors look very desatured.

    Interpolating in OKLCH preserves chroma and instead passes through different hues.

  7. Waterluvian

    Ah nice, it has some of my favourites!

  8. PaulHoule

    Reminds me of that time when, as an undergraduate, my "team" entered a Problem Solving Competition and couldn't choose one of the two problems so we did both in parallel.

    One of us wrote a program in BASIC on a Tandy 1000 that the rest of us estimated would take more than a google years to finish, but he wasn't be dissuaded and let it run the whole weekend.

    I made an analysis that was mostly correct but was off by a factor of four because I mistook a radius for a diameter.

More from this day

2026-08-11