# Odder's URL based puzzle scrambler



## Carrot (Dec 27, 2011)

Hello cubers! 

So today I made an URL-based scrambler. This makes it possible to define in the address bar what type of scrambles you want, how many of them you want and how you want to group them.

I'll throw a linky here: http://scrambler.odderen.dk

So how does it work? Well if you just click that link, you'll get no scrambles at all. You need to define the scrambles you want.

The syntax are following:
?puzzle1=N&puzzle2=N&...&group=N

the "puzzle" list is:

222 (random state, suboptimal)
333 (random state)
444 (random moves)
555 (random moves)
666 (random moves)
777 (random moves)
pyra (random state, suboptimal)
mega (random moves)
clock (WCA)
sq1 (random state)

N can be set to any number, if you leave it blank, it will count as 0.
group is set with 5 as default.


Let's say you want:
3x3x3: 28 scrambles
pyra: 14 scrambles
2x2x2: 56 scrambles
Grouped in 7 scrambles
Then you have you use this link:
scrambler.odderen.dk?333=28&pyra=14&222=56&group=7

Let's say you want:
sq1: 5 scrambles
2x2x2: 500 scrambles
Grouped in 50 scrambles
Then you have you use this link:
scrambler.odderen.dk?sq1=5&222=500&group=50





To be honest I have no idea who will be using it, but I thought it would be fun to make this 

(Disclaimer: it's using Mark2 to generate scrambles)


----------



## cubernya (Dec 27, 2011)

Awesome. I just screwed around with it a little, and it works like a charm. The organization is great as well


----------



## Specs112 (Dec 27, 2011)

On the one hand, there's no reason that anyone actually needs this.

On the other hand, it works great. Nice work.


----------



## aronpm (Dec 27, 2011)

JoYE IS AWESOME


----------



## Carrot (Dec 27, 2011)

Specs112 said:


> On the one hand, there's no reason that anyone actually needs this.


 
you never know. But yeah, I don't see what it can be used for.


----------



## Carson (Dec 27, 2011)

May I suggest placing a limit on the number of scrambles? My first thought was, "OOHHHH.... 100,000 SQ-1 scrambles?!"


----------



## Specs112 (Dec 27, 2011)

Carson said:


> May I suggest placing a limit on the number of scrambles? My first thought was, "OOHHHH.... 100,000 SQ-1 scrambles?!"


 
The first thing I did after reading your post was try that.

The second thing I did after reading your post was restart my browser.


----------



## Lucas Garron (Dec 27, 2011)

Specs112 said:


> The first thing I did after reading your post was try that.
> 
> The second thing I did after reading your post was restart my browser.



What browser? A good browser should make it easy to stop.

In any case, this really needs web workers. Easy, transparent web worker usage is on the to-do list for the Mark 2 scramblers.


----------



## ben1996123 (Dec 27, 2011)

Awesome, but when I saw the thread title I thought you meant <U,R,L> gen


----------



## cubernya (Dec 27, 2011)

ben1996123 said:


> Awesome, but when I saw the thread title I thought you meant <U,R,L> gen


 
That's normally shown as <R,U,L>, not <U,R,L>


----------



## Carrot (Dec 27, 2011)

Lucas Garron:

I've now done a little change in the randomSource based on what Chen Shuang told me to do


----------



## CRO (Dec 27, 2011)

Works Great!


----------



## Lucas Garron (Dec 27, 2011)

Odder said:


> the "puzzle" list is:
> 
> 222 (random state, suboptimal)
> 333 (random state)
> ...



2x2x2 might be MRSS, unless you tweaked it.
3x3x3 is MRSS
pyra is MRSS, I think, unless you tweaked it.
clock is obviously MRSS, and it's optimal enough (14 dial turns). 
sq1 is MRSS "suboptimal".

I don't know why people care so much about suboptimal vs. optimal, if the scrambles are short enough. Random-state matters way more, including MRSS vs. naive random-state (Square-1), and using a good random seed.



Odder said:


> Lucas Garron:
> 
> I've now done a little change in the randomSource based on what Chen Shuang told me to do



Coo'. You should use the same MersenneTwister object for all scramblers, though, else they all get the same seed. (Else if you ever have two random scramblers that generate random scrambles similarly, they might generate them the same way, because they might have been seeded at the same time.)


----------



## Stefan (Dec 27, 2011)

Lucas Garron said:


> I don't know why people care so much about suboptimal vs. optimal, if the scrambles are short enough.



... and if they're *long* enough. At least for home training, optimal is bad because you don't want to know in advance that there's a three moves solution. Intentionally suboptimal is better there. I don't think that's actually done here, though, cause I just got a three moves scramble (F U2 R).


----------



## Carrot (Dec 27, 2011)

Lucas is right about scramble types as I stole all the scramblers from Mark2 

Stefan, you got a 3 move scramble with this?


----------



## Stefan (Dec 27, 2011)

Yes, like I said (it was for 2x2x2, in case that was unclear).


----------



## Carrot (Dec 27, 2011)

(I actually skimmed 1000 2x2x2 scrambles before asking without finding any "short" scrambles) Okay, I see what you mean, "13. F' U F R U' " also kinda short. But as I said, it's Mark2 scrambles, so I cannot describe how the scrambler works to be honest.


----------



## cubernya (Dec 30, 2011)

Odder, could you plug a skewb scrambler into this as well? I don't know how well it would work, but just a functional one would work great.


----------



## Mike Hughey (Dec 30, 2011)

theZcuber said:


> Odder, could you plug a skewb scrambler into this as well? I don't know how well it would work, but just a functional one would work great.


 
Odder's also already ahead of you on that. He doesn't have one done yet, but he certainly will soon - he's probably going to use Chen Shuang's optimal random-state scrambler for this.


----------



## Carrot (Dec 31, 2011)

Dunno if I should post or not but thanks to Justin Jaffray's skewb skillz it now supports skewb


----------



## cubernya (Dec 31, 2011)

What's the syntax for skewb?


----------



## Carrot (Dec 31, 2011)

skewb


----------



## cubernya (Dec 31, 2011)

http://scrambler.odderen.dk/?skewb=1

I get a blank page


----------



## benskoning (Dec 31, 2011)

i have a white screen


----------



## cubernya (Dec 31, 2011)

Also, in the weekly competition thread, you mentioned that you designed it so it would be split up into groups. Would you mind sending me a link/source code to that (or even the changes needed to be made to put it into groups)?


----------



## Carrot (Dec 31, 2011)

theZcuber said:


> http://scrambler.odderen.dk/?skewb=2
> 
> I *don't* get a blank page


 
Better?

EDIT: if you really want to see how I make it distribute scrambles I have modified the script (deleted all the forms that is sending stuff etc..) http://scrambler.odderen.dk/weeklyTEST.php (it might cause your browser to crash)


----------



## benskoning (Dec 31, 2011)

still white and blank for me


----------



## Carrot (Dec 31, 2011)

benskoning said:


> still white and blank for me


 
browser? and version?


----------



## benskoning (Dec 31, 2011)

i am using google chrome most recent version


----------



## Carrot (Dec 31, 2011)

benskoning said:


> i am using google chrome most recent version


 
press ctrl+shift+J, click "ressources" does it find any errors? (the scrambler can't show 1 scramble only somehow :/ )


----------



## timeless (Dec 31, 2011)

doesnt load for me on chrome


----------



## lachose (Jan 1, 2012)

I've tried your second example and instead of giving me 500 scrambles for 2x2 and 5 for sq1, it gives me only the 2x2 scrambles. I've also tried to just ask for sq1 scrambles and it's always blank...


----------



## benskoning (Jan 1, 2012)

Odder said:


> press ctrl+shift+J, click "ressources" does it find any errors? (the scrambler can't show 1 scramble only somehow :/ )


 
I still have a white page and it has no errors


----------



## Carrot (Jan 5, 2012)

lachose said:


> I've tried your second example and instead of giving me 500 scrambles for 2x2 and 5 for sq1, it gives me only the 2x2 scrambles. I've also tried to just ask for sq1 scrambles and it's always blank...



Thanks, I fixed this (I didn't see your post before now)



benskoning said:


> I still have a white page and it has no errors



What was your query? and does it work now?


----------



## mycube (Mar 23, 2012)

i can´t generate 3x3 and square-1 scrambles. does anyone know why?


----------



## Mike Hughey (Mar 24, 2012)

mycube said:


> i can´t generate 3x3 and square-1 scrambles. does anyone know why?


 
They seem to work for me. Are you doing this?:
http://scrambler.odderen.dk?333=5
http://scrambler.odderen.dk?sq1=5

By the way, I use this for all the race scrambles that I generate. Thanks, Odder!


----------



## mycube (Mar 24, 2012)

Mike Hughey said:


> They seem to work for me. Are you doing this?:
> http://scrambler.odderen.dk?333=5
> http://scrambler.odderen.dk?sq1=5
> 
> By the way, I use this for all the race scrambles that I generate. Thanks, Odder!


 
Yes I want to use it for a Competition, too. For this I tried to use this link to get all the scrambles I need:
http://scrambler.odderen.dk/?222=14&333=25&444=10&555=9&666=3&777=3&mega=7&pyra=12&clock=5&sq1=5

But it just work if I delete 3x3 and Square-1. Like this: 
http://scrambler.odderen.dk/?222=14&444=10&555=9&666=3&777=3&mega=7&pyra=12&clock=5

And only generating 3x3 or Square-1 scrambles doesn't work. It says that there is a mistake with a script at the website.


----------



## cubernya (Mar 24, 2012)

What browser are you using? I've used the scrambler in Chrome, Firefox, and Safari and it worked fine in all 3


----------



## mycube (Mar 25, 2012)

Firefox on a mac.
But I can get scrambles for all cubes except these two..


----------



## Mike Hughey (Mar 25, 2012)

mycube said:


> Yes I want to use it for a Competition, too. For this I tried to use this link to get all the scrambles I need:
> http://scrambler.odderen.dk/?222=14&333=25&444=10&555=9&666=3&777=3&mega=7&pyra=12&clock=5&sq1=5
> 
> But it just work if I delete 3x3 and Square-1. Like this:
> ...


 
It must be browser-specific or something. I can click on your first link above and it works perfectly, including 25 nice 3x3x3 scrambles and 5 nice square-1 scrambles. Maybe you could try it through a proxy.


----------



## mycube (Mar 25, 2012)

Mike Hughey said:


> It must be browser-specific or something. I can click on your first link above and it works perfectly, including 25 nice 3x3x3 scrambles and 5 nice square-1 scrambles. Maybe you could try it through a proxy.


 
Tried it with Safari and it works. Don´t know why it now doesn´t work with Firefox. A few days ago it gave me 3x3 scrambles with Firefox, too..


----------



## Mike Hughey (Mar 26, 2012)

mycube said:


> Tried it with Safari and it works. Don´t know why it now doesn´t work with Firefox. A few days ago it gave me 3x3 scrambles with Firefox, too..


 
FWIW, I use Firefox, but on Windows 7.


----------



## mycube (Nov 4, 2012)

what happened to the scrambler? can't load any scrambles atm.


----------



## Carrot (Nov 4, 2012)

mycube said:


> what happened to the scrambler? can't load any scrambles atm.



More details of what you where trying to access, please. (like the URL you tried to generate scrambles with) It should work all fine.


----------



## mycube (Nov 4, 2012)

i tried different scrambles. always the same error

for example this link: http://scrambler.odderen.dk?333=5



> Internal Server Error
> 
> The server encountered an internal error or misconfiguration and was unable to complete your request.
> 
> ...



i also tried your example-links. they didn't work, neither.


----------



## Carrot (Nov 4, 2012)

mycube said:


> i tried different scrambles. always the same error
> 
> for example this link: http://scrambler.odderen.dk?333=5
> 
> ...



That error is to blame on my host and not me 

It's working again now. cheers!


----------



## mycube (Apr 8, 2013)

what's with the scrambler? It says "Forbidden

You don't have permission to access / on this server."


----------

