Solving Rubik's cube with different algorithms

asked 2024-11-25 13:15:24 +0100

updated 2024-11-28 11:01:43 +0100

FrédéricC gravatar image

Hello, I am interested in solving a Rubik's cube and I found the solve method of the Rubikscube class. As far as I understand, different parameters correspond to different algorithms. However, I encountered a problem where different algorithms (including the optimal one) give the same non-optimal solution and take the same amount of time to work. I would be glad if you could help!

Dietz for "R U R U"
CPU times: user 4.31 s, sys: 21.8 ms, total: 4.33 s
Wall time: 5.04 s
'U^2*L*F*U*R^2*U^-1*R^-1*U^2*R*F*L^-1*F^-1*B*D*F^-1*D*F*B^-1*U^-1*L^-2*U*D^-1*B^-1*D^-1*L^-1*D*L*B^2*D*B*L*B*U*B^-1*U^-1*L^-1*B^-2*(D^-1*B^-1*D*B)^2*D*L^-1*D^-1*L*B^-2*D*B*D^-1*B*D*B^-2*D^-1*B^-1*L*U*B*U^-1*B^-1*L^-1*D^-1*B^-1*(D*B)^2*L^-1*D^-1*R^-1*L*B^-1*R*D*B^-1*D^-1*B*L^-1*D^-1*B^-1*D*B*L*D^-1*B^-1*D^2*L^-1*D^-1*L^-2*B^-1*L^-1*D*B*L*B^-1*L^-1*D^-1'


Optimal for "R U R U"
CPU times: user 3.7 s, sys: 15.3 ms, total: 3.71 s
Wall time: 4.22 s
'U^2*L*F*U*R^2*U^-1*R^-1*U^2*R*F*L^-1*F^-1*B*D*F^-1*D*F*B^-1*U^-1*L^-2*U*D^-1*B^-1*D^-1*L^-1*D*L*B^2*D*B*L*B*U*B^-1*U^-1*L^-1*B^-2*(D^-1*B^-1*D*B)^2*D*L^-1*D^-1*L*B^-2*D*B*D^-1*B*D*B^-2*D^-1*B^-1*L*U*B*U^-1*B^-1*L^-1*D^-1*B^-1*(D*B)^2*L^-1*D^-1*R^-1*L*B^-1*R*D*B^-1*D^-1*B*L^-1*D^-1*B^-1*D*B*L*D^-1*B^-1*D^2*L^-1*D^-1*L^-2*B^-1*L^-1*D*B*L*B^-1*L^-1*D^-1'
edit retag flag offensive close merge delete

Comments

May be we should check that package "rubiks" is installed - may be it is otherwise calling GAP - see here: https://doc.sagemath.org/html/en/reference/groups/sage/groups/perm_gps/cubegroup.html (https://doc.sagemath.org/html/en/refe...)

But not very clear to me

Alexander Chervov gravatar imageAlexander Chervov ( 2024-11-26 18:04:11 +0100 )edit