# Devil Algorithm for 2x2x2 (R U moves)



## Cubemir (Dec 25, 2011)

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...


----------



## Owen (Dec 25, 2011)

Wow, how did you find it? Brute force?


----------



## Sa967St (Dec 25, 2011)

Crazy. 
Awesome job!


----------



## Cubemir (Dec 26, 2011)

Owen said:


> Wow, how did you find it? Brute force?



Of course I used a bit of a computer


----------



## aaronb (Dec 26, 2011)

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


----------



## cubernya (Dec 26, 2011)

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 (Dec 26, 2011)

theZcuber said:


> 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


----------



## kinch2002 (Dec 26, 2011)

theZcuber said:


> 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>


----------



## Zane_C (Dec 26, 2011)

Very cool stuff! :tu


----------



## aronpm (Dec 26, 2011)

theZcuber said:


> Then 3x3 (that'll be interesting)


 
Good luck storing that on your computer


----------



## cubernya (Dec 26, 2011)

aronpm said:


> Good luck storing that on your computer


 
Time to go raid the Library of Congress


----------



## Lucas Garron (Dec 27, 2011)

theZcuber said:


> 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 (Dec 27, 2011)

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.


----------

