# Devil Algorithm for 2x2x2 (R U moves)

#### Cubemir

##### Member
Today I found Devil's Algorithm (Hamiltonian Cycle) for bandaged 2x2x2 cube (only R U moves). Finally!

http://cubemir.ru/speedcubing/222/Devil_222RU.txt

There are 29160 positions in bandaged 2x2, and this alg goes through every position, but never pass through the position where it already was. So it is 29159 moves long. 29160th move returns the cube in solved state, so it is cycle.

Next time I'll try to find Devils Alg for 2x2x2 (3674160 positions). But it will be much more harder...

Last edited:

#### Owen

##### Member
Wow, how did you find it? Brute force?

#### aaronb

##### Member
Great job, though don't you mean bandaged, not bondaged?

#### theZcuber

So basically it's just every 2x2 position with a 2x1 block solved?

Absolutely amazing though, I'm surprised somebody found this on a desktop(?) computer. Now to find Devil's Alg for all of 2x2! Then 3x3 (that'll be interesting)

#### Cubemir

##### Member
So basically it's just every 2x2 position with a 2x1 block solved?

Absolutely amazing though, I'm surprised somebody found this on a desktop(?) computer. Now to find Devil's Alg for all of 2x2! Then 3x3 (that'll be interesting)
Thanks, but I see cuBerBruce has already found Hamiltonian circuit for all 2x2 positions. But never mind I'll try to find my own one

Last edited:

#### kinch2002

So basically it's just every 2x2 position with a 2x1 block solved?
Not quite. There are many 2x2x2 scrambles that have a 2x1x1 block solved can't be reached by only applying <R,U> moves. This only solves the ones that can be reached with <R,U>

#### Lucas Garron

##### Member
Absolutely amazing though, I'm surprised somebody found this on a desktop(?) computer.
Then you have no idea how powerful computers are (especially when combined with some smart algorithms), and how small this problem really is.

Apparently I haven't posted here, though. Needless to say, it is a great accomplishment to actually find such an alg. Was it done by brute force?

#### Cubemir

##### Member
I have developed a program that on my home computer is able to find one Devil algorithm for the RU subgroup in ~5 minutes. I have not used too much theory, mainly used Warnsdorff's rule, in conjunction with Euler's method, plus a variety of optimizations under this specific problem. I did not spend too much time to develop a theory, I think my computer algorithm can still be significantly improved.

Last edited: