• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Can someone help me make a custom scrambler?

Shiv3r

Member
Joined
Mar 16, 2016
Messages
800
Location
San Diego or thereabouts
WCA
2016LEWI04
YouTube
Visit Channel
The first and most important scrambler I need is this:
A 4x4 scrambler that only scrambles <l,r,U>(pretty much the equivalent of F2B+CMLL solved on 4x4).
The reasons are because 1) I have to drill the Lewis Method's step 5 a lot, and 2) I want to make some step 5 example solves and I want to post the scrambles in the description so people can follow along. (step 5)
If you want more of a challenge, an X-cube scrambler would be nice. I got one from a non-cuber friend a few days ago, and I have a hard time actually scambling is well.

Thanks fellow coders!
EDIT: Im sorry, this is the first time I have posted in the software thread. If there is another thread this should go in, please tell me. thanks!
 

YTCuber

Member
Joined
Jun 30, 2015
Messages
203
Paste the following into your browsers console and you will get a 4x4 lrU scramble.
Code:
function rndEl(b){return b[~~(Math.random()*b.length)]}function rn(b){return~~(Math.random()*b)}function scramble(b,e,h,f){var c,d,g=[],a=[];f||(f={});if(!(2>b.length||1>e.length)){for(c=0;c<b.length;++c)for(d=0;d<e.length;++d)g.push(""+b[c]+e[d]);for(;a.length<h;)a.push(rndEl(g)),1<a.length&&f[a[a.length-1][0]]==a[a.length-2][0]&&a.pop(),2<a.length&&a[a.length-1][0]==a[a.length-2][0]&&a.pop();return a.join(" ")}}alert(scramble(["l","r","U"],["","'","2"],40,{l:"r",r:"l"}));

For X-Cube:
Code:
function rndEl(b){return b[~~(Math.random()*b.length)]}function rn(b){return~~(Math.random()*b)}function scramble(b,e,h,f){var c,d,g=[],a=[];f||(f={});if(!(2>b.length||1>e.length)){for(c=0;c<b.length;++c)for(d=0;d<e.length;++d)g.push(""+b[c]+e[d]);for(;a.length<h;)a.push(rndEl(g)),1<a.length&&f[a[a.length-1][0]]==a[a.length-2][0]&&a.pop(),2<a.length&&a[a.length-1][0]==a[a.length-2][0]&&a.pop();return a.join(" ")}}alert(scramble("UDRLFBufbl".split(""),["","'","2"],60,{R:"L",L:"R",F:"B",B:"F",D:"U",U:"D",u:"d",d:"u",f:"b",b:"f"}));
A small letter represents the outer layer, a big one inner+outer layer. The program does 60 moves, but you can change that by replacing the 60 with any number >3.
 
Last edited:

Shiv3r

Member
Joined
Mar 16, 2016
Messages
800
Location
San Diego or thereabouts
WCA
2016LEWI04
YouTube
Visit Channel
Paste the following into your browsers console and you will get a 4x4 lrU scramble.
Code:
function rndEl(b){return b[~~(Math.random()*b.length)]}function rn(b){return~~(Math.random()*b)}function scramble(b,e,h,f){var c,d,g=[],a=[];f||(f={});if(!(2>b.length||1>e.length)){for(c=0;c<b.length;++c)for(d=0;d<e.length;++d)g.push(""+b[c]+e[d]);for(;a.length<h;)a.push(rndEl(g)),1<a.length&&f[a[a.length-1][0]]==a[a.length-2][0]&&a.pop(),2<a.length&&a[a.length-1][0]==a[a.length-2][0]&&a.pop();return a.join(" ")}}alert(scramble(["l","r","U"],["","'","2"],40,{l:"r",r:"l"}));

For X-Cube:
Code:
function rndEl(b){return b[~~(Math.random()*b.length)]}function rn(b){return~~(Math.random()*b)}function scramble(b,e,h,f){var c,d,g=[],a=[];f||(f={});if(!(2>b.length||1>e.length)){for(c=0;c<b.length;++c)for(d=0;d<e.length;++d)g.push(""+b[c]+e[d]);for(;a.length<h;)a.push(rndEl(g)),1<a.length&&f[a[a.length-1][0]]==a[a.length-2][0]&&a.pop(),2<a.length&&a[a.length-1][0]==a[a.length-2][0]&&a.pop();return a.join(" ")}}
alert(scramble("UDRLFBufbl".split(""),["","'","2"],60,{R:"L",L:"R",F:"B",B:"F",D:"U",U:"D",u:"d",d:"u",f:"b",b:"f"}));
A small letter represents the outer layer, a big one inner+outer layer. The program does 60 moves, but you can change that by replacing the 60 with any number >3.
I have a chromebook, will this still work? thanks btw.
EDIT: I don't think I understand what you mean by "Browser's console", can you please elaborate? I am inexperienced with actual applications in coding but I know how to code pretty well.
 

YTCuber

Member
Joined
Jun 30, 2015
Messages
203
As long as you have a browser installed yes. For chrome: press Ctrl+Shift+J
 

YTCuber

Member
Joined
Jun 30, 2015
Messages
203
Can you please tell @Teoidus to spell my username correct?
The site now prints the scramble under the buttons instead of alerting it.
 
Last edited:

Shiv3r

Member
Joined
Mar 16, 2016
Messages
800
Location
San Diego or thereabouts
WCA
2016LEWI04
YouTube
Visit Channel
Xcuse me, gonna talk again.
One thing you missed about the X-cube is that if an extended face is not complete(meaning not shapeshitfed and having like "holes") it Cannot turn. So therefore, it is probably a better idea to at the beginning just twist all the 4 extended faces a random direction and then do a 3x3 scramble, which I probably will do from now on.
 

YTCuber

Member
Joined
Jun 30, 2015
Messages
203
I don't own a XCube, so I couldn't check whether my scramble program is working correctly.
The problem with your scrambling method is, that if you solve the inner 3x3, you always have a skip of the extended faces.
Is it correct, that I can apply moves from <R2,L2,B2,F2,D,U,l,b,r,f> to the solved state and don't get blocked moves? If so, these moves followed by a 3x3x3 Scramble would be the full scramble.
 
Top