# deepSubDiver's Square-1 Scrambler



## Michiel van der Blonk (Oct 10, 2010)

[
The discussion originally began in in this thread by Michiel. I'm moving it here to separate discussion for the sake of both programs.
Michiel didn't participate in the discussion, but since this is a modified copy of the old thread, this post needs to remain (due to the forum software).

-Lucas
]


----------



## deepSubDiver (Oct 15, 2010)

dillonbladez said:


> [...] Now if only there was one for square 1...


 http://83.169.19.211/sq1/
Enjoy


----------



## Mike Hughey (Oct 15, 2010)

deepSubDiver said:


> http://83.169.19.211/sq1/
> Enjoy


 
I haven't been following the WCA Forum for a long time, so I don't know - has this particular scrambler been discussed by the WCA? I think it has been mentioned before there that they would like to have something like this, and here it is! In any event, I really appreciate it; I've never fully trusted the 40 move scrambles anyway (seemed like they favor non-parity slightly), and it will be nice to be able to have scrambles that are a little shorter for all of my BLD attempts.

Has anyone verified (by reviewing the code, or statistics, or both) that this is a valid random state scrambler?

Edit: I just counted - this thing generates scrambles that are about 30% shorter than the 40 move scrambles. Nice! Not only would it be fairer; it would also help speed up competitions.

Edit 2: I sure hope this proves to be a valid scrambler - it brought me good luck. I just got my first ever sub-4 square-1 BLD solve with the first scramble I ever tried from this scrambler: 3:43.16 (1:43 memorization)! And it was a pretty rare case that I hadn't ever solved before: case 2 (star on one side, edges on the other side 2-6, probability 16/3678).


----------



## Michiel van der Blonk (Oct 15, 2010)

Stefan said:


> Are you serious? You think generating the algs is a bottleneck? Note how even my simple javascript scrambler produces 500 scrambles pretty much instantly.
> 
> I think this one does (haven't tried it myself):
> http://m.cubing.dk/



No, I am not serious. I knew it would tick you off. No way I am going to program C (maybe never again). 
Thanks, I'll try it, it looks good.


----------



## deepSubDiver (Oct 15, 2010)

Mike Hughey said:


> [...] Has anyone verified (by reviewing the code, or statistics, or both) that this is a valid random state scrambler?


I can verify this myself, it uses random permutations of each piece and finds a solution for that state. I think Lucas Garron once did a statistical research on hon random sq1 scrambles can be and especially about their distribution.


----------



## Mike Hughey (Oct 16, 2010)

deepSubDiver said:


> I can verify this myself, it uses random permutations of each piece and finds a solution for that state. I think Lucas Garron once did a statistical research on hon random sq1 scrambles can be and especially about their distribution.


 
Did you see the latest posts by Lucas here? Did you do option 1 here (the correct option - from your description, it sounds like you might have, but it's hard to be sure), or did you do option 2 or 3?

It's interesting that Lucas mentions that the official scrambler does star shapes more commonly than it should, and then I got 3 star shapes out of my first 10 scrambles using your scrambler. But of course, that might just be luck.


----------



## deepSubDiver (Oct 16, 2010)

I continuously add random pieces from a pool, appending them to my current state. I think this corresponds to option 3.


----------



## Mike Hughey (Oct 16, 2010)

Oh. Oops. Perhaps you should see if you can switch to option 1.


----------



## blade740 (Oct 17, 2010)

Mike Hughey said:


> I haven't been following the WCA Forum for a long time, so I don't know - has this particular scrambler been discussed by the WCA? I think it has been mentioned before there that they would like to have something like this, and here it is!


 
The biggest problem is that, being PHP, this scrambler is even less portable than cube explorer. You wouldn't be able to just download the script and run it without installing a web server and PHP. Basically, the only way to get scrambles would be to have an active internet connection.

I agree, though. This scrambler would be much better than what we have now.


----------



## dillonbladez (Oct 17, 2010)

deepSubDiver said:


> http://83.169.19.211/sq1/
> Enjoy


 
...:O
it happened. Thanks!


----------



## Diniz (Oct 17, 2010)

deepSubDiver said:


> http://83.169.19.211/sq1/
> Enjoy


 
Scrambles seems to easy... Oo
Or maybe iam getting lucky hehe


----------



## Mike Hughey (Oct 17, 2010)

blade740 said:


> The biggest problem is that, being PHP, this scrambler is even less portable than cube explorer. You wouldn't be able to just download the script and run it without installing a web server and PHP. Basically, the only way to get scrambles would be to have an active internet connection.
> 
> I agree, though. This scrambler would be much better than what we have now.



I guess I was wondering how hard it would be to move the code to something more portable. If deepSubDiver would be interested in it, that is.


----------



## deepSubDiver (Oct 17, 2010)

blade740 said:


> The biggest problem is that, being PHP, this scrambler is even less portable than cube explorer. You wouldn't be able to just download the script and run it without installing a web server and PHP. Basically, the only way to get scrambles would be to have an active internet connection.
> 
> I agree, though. This scrambler would be much better than what we have now.


The scrambler is a .NET application, not PHP. All I do in PHP is sending requests to the service and parsing the results.

I will have a look into porting it into js in the forthcoming weeks. Keep tuned!

/edit: Oh, and thanks for seperating this discussion from the old thread, Lucas.


----------

