• 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!

Optimal 2x2 Scrambles for CCT (for versions <=0.9.4)

masterofthebass

Premium Member
Joined
May 13, 2007
Messages
3,923
Location
Denver, CO
WCA
2007COHE01
YouTube
Visit Channel
Thanks to Tim Sun (who basically translated Jaap's code), I was able to put together a cct scramble plugin for random state, optimal 2x2. Just put the .class file in the scramble plugins folder of your CCT directory.
 

Attachments

  • TwoScramble.class.zip
    2.5 KB · Views: 111

gpt_kibutz

Member
Joined
Apr 9, 2009
Messages
196
Location
World
Where can I get CCT 0.9.5? Because my CCT is 0.9.3 and that file doesn't seems to work...
EDIT: Found it, nevermind
 
Last edited:

masterofthebass

Premium Member
Joined
May 13, 2007
Messages
3,923
Location
Denver, CO
WCA
2007COHE01
YouTube
Visit Channel
hmm... Apparently version 0.9.5 already has this, but this plugin will work for earlier versions of CCT (I'm running 0.9.4).

Wasted my time, fool!

I really didn't want it for cct. I already told you that.

who basically translated Jaap's code)

Does anyone have a link to this code? I can't seem to find it.

check the source of the official scrambler.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
http://www.worldcubeassociation.org/regulations/scrambles/scramble_cube_222.html

that's the scrambler you get when you look in the regulations.

Correct me if I'm wrong but technically that isn't a random-state scrambler.

The function which does the scramble is as follows:
Code:
function mix(){
    initbrd();
    for(var i=0;i<500;i++){
        var f=Math.floor(Math.random()*3+3) + 16*Math.floor(Math.random()*3);
        domove(f);
    }
}
...which basically applies 500 random moves to the cube. I know this because I made use of Jaap's solver for the 2x2 scrambler in cTimer, but I had to write supporting code to generate random cube states (code here). Of course, the statistical difference between a 500-move scramble and a random-state scramble will be negligible on a 2x2, but using 500 random moves just seems like an inefficient hack. :(
 
Last edited:
Joined
Apr 29, 2006
Messages
1,802
Correct me if I'm wrong but technically that isn't a random-state scrambler.

The function which does the scramble is as follows:
Code:
function mix(){
    initbrd();
    for(var i=0;i<500;i++){
        var f=Math.floor(Math.random()*3+3) + 16*Math.floor(Math.random()*3);
        domove(f);
    }
}
...which basically applies 500 random moves to the cube. I know this because I made use of Jaap's solver for the 2x2 scrambler in cTimer, but I had to write supporting code to generate random cube states (code here). Of course, the statistical difference between a 500-move scramble and a random-state scramble will be negligible on a 2x2, but using 500 random moves just seems like an inefficient hack. :(

It just means that the programmer doesn't really understand what random-state refers to. It's also very very easy to generate a random position; I don't understand why you guys are using such convoluted methods. >_>
 
Last edited:

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
It just means that the programmer doesn't really understand what random-state refers to. It's also very very easy to generate a random position; I don't understand why you guys are using such convoluted methods. >_>

Hmm, is my randomCube() function a bit bloated?? I couldn't think of a more direct algorithm than that :confused:
 
Joined
Apr 29, 2006
Messages
1,802
It just means that the programmer doesn't really understand what random-state refers to. It's also very very easy to generate a random position; I don't understand why you guys are using such convoluted methods. >_>

Hmm, is my randomCube() function a bit bloated?? I couldn't think of a more direct algorithm than that :confused:

Given that Jaap's solver just uses two numbers for the position, you should just be randomly generating those two numbers. I don't know what Dan did to modify the code for CCT, but this is how I generated a random position in the original scrambler:

int p = (int)(Math.random()*5040), o = (int)(Math.random()*729);
 
Last edited:
Top