Get the latest tech news

The Rubik's Cube Perfect Scramble (2024)


The ChallengeI was playing with my son’s Rubik’s Cubes and tried to scramble a cube randomly so that no two squares with the same color were side by side. Here’s one way to do it: But I wanted a scramble that looked like a random scramble. No matter how many different moves I made, I couldn’t do it. Every time I separated two squares with the same color, two other squares of the same color would touch somewhere else.Looking for an easy answer, I went to puzzling.stackexchange.com and found this

Also, the full tree has 24 branches from the first node (eight corner pieces to place in the first position, each with three different orientations), and 10 of them are dead ends at the first level. Here are the moves to produce the Perfect Scramble (Thanks to Redditor plutrichor for finding this optimal pattern and pointing me to Cube Explorer) : I planned to throw in multi-threading afterward, but once I saw that the program would finish in a reasonable amount of time, laziness kicked in and I just waited for the answer.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rubik

Rubik

Related news:

News photo

Rubik's Cube Solutions, Puzzles, and 8-Balls (2023)

News photo

A Hamiltonian Circuit for Rubik's Cube

News photo

34x34x34 Rubik's Cube