Odder.. edit your post =D
Odder.. edit your post =D
I think so, because my original code generated scrambles beginning with R on multiple occasions.
Last edited by Odder; 01-03-2012 at 04:58 AM.
Its algorithm can be describe as:
generate random moves
and then check it, let RR->R, LL->L, RL->LR, and UD, FB as well
is it really wrong?
I'm pretty confident that I'm right. But I'm already looking for a place to hide when you prove me wrong.
(a=rand 6)!=b&&a!=b+3
same as:
a!=b and a!=b+3
well, a!=b is obvious..
a!=b+3 can be described like this:
setA=[U,R,F], setB=[D,L,B]
then we have: setA[x]+3=setB[x], where x is the position.
but setB[x]+3 != setA[x].... (as 5+3 != 2)
this means that for any moves in setA, there is 4 valid next-moves, but for setB we have 5.
The goal for the scrambles is to have:
5 valid moves, unless we have just had two opposite moves in a row, then it should be 4
Last edited by Odder; 01-03-2012 at 05:17 AM.
why should valid moves of setA be the same as of setB
if we only allow "LR" but disallow "RL", of course setA is difference to setB...
Imagine you have the move R
R doesn't allow the next move to be L, therefore you can't get RL.. (RL is not converted to LR) (which leaves 4 valid moves only)
now take L
L does allow the next move to be R... (5 valid moves, YAY!!)
Last edited by Odder; 01-03-2012 at 05:24 AM.
Bookmarks