How exactly does cube timer get their scrambles? I mean is it just a random set of moves or is it something more specific?
How exactly does cube timer get their scrambles? I mean is it just a random set of moves or is it something more specific?
Cubetimer.com? I believe they generate random sets of moves with some constraints to keep small sets of moves from undoing themselves.
Just a random sequence of moves, if I'm reading it correctly. Using a 3x3x3 solver and random position isn't easy in JavaScript.
Okay that makes sense but what about 180 degree turns wouldn't they undo themselves?
There are just two kinds of cancellations that scramble generators need to forbid: U U and U D U. Whether the turn is 90 or 180 degrees doesn't matter, just the face.
Last edited by Johannes91; 05-26-2008 at 10:43 AM. Reason: clarified
I tried to write a solver that's reasonably fast and doesn't use too many moves a while ago, but gave up. I couldn't even get Thistlethwaite's algorithm working decently. Then I tried Haskell, and found it quite easy to implement Kociemba's algorithm and to make it find solutions shorter than 25 moves in less than a second. JavaScript is in my opinion more difficult, because:
* there are no native types, so tables take much more space than they need to;
* it's a very slow language, so without big tables the solver will be slow;
* if JavaScript code takes too long to finish, some browsers will freeze and/or terminate it.
There are many different implementations, of course, and the above points might not be true for all of them. I used SpiderMonkey for testing. And I'm far from an expert at JavaScript, it's very possible that I was just doing something stupid.
That said, it would be possible to connect to a server-side solver.
Last edited by Johannes91; 05-27-2008 at 10:10 AM.
CubeTimer randomly picks a face on each iteration through a loop of the desired number of turns, but there are restrictions:
- Each time a face is turned, the possibility that the same face is selected for turning on a future iteration is disabled
- Once a face is disabled, it will not be turned again until enabled by the turning of an intersecting face
As far as I can figure, there is no chance for a move, or even a series of moves to undo itself. The one thing I'm not real happy with and will probably change soon is that a face does allow an opposite face to still be selected for turning. This is fine for something like U D, because they are in opposite directions, but in cases like U2 D2 or U D', it's the equivalent of just turning the equator.
There are no cases where moves will cancel each other out, but this case takes 2 turns to do the equivalent of one, which means you aren't REALLY getting a full 25 turns, sometimes.
Bookmarks