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

aronpm

Member
Joined
Sep 9, 2009
Messages
2,010
Hint: What is this? --> (U2 R2 B2 R2 U2 B2 R2)

(U2 R2 B2 R2 U2 B2 R2) = (B2)

I could expose the whole scramble, but then I would spoil it for all you wannabee pompous retards!

Wow! I never thought that applying random moves would give a non-optimal scramble!

I could expose the whole scramble, but then I would spoil it for all you wannabee pompous retards!
Also **** you.
 
Joined
Apr 29, 2006
Messages
1,802
What is the probability that a 25-move scramble is optimal?

0%, but apparently reThinking the Cube doesn't know that.
 

hr.mohr

Member
Joined
Feb 20, 2008
Messages
447
Location
Odense, Denmark
WCA
2007CHRI02
YouTube
Visit Channel

Tim Major

Platinum Member
Joined
Aug 26, 2009
Messages
5,381
Location
Melbourne, Australia
WCA
2010MAJO01
looks a lot like it to me...

Looks can be deceiving. Are you 100% sure that it is a 25 move RANDOM scramble?

a you 100% sure you aren't a RETARDED person?

Win. Go Dan!
Agreed.

Fail. That scramble only appears random to retards.

Lmao wtf. What is wrong with the scramble?

Lmao wtf. What is wrong with YOU? Are you pretending to be retarded too?

Hint: What is this? --> (U2 R2 B2 R2 U2 B2 R2)

(U2 R2 B2 R2 U2 B2 R2) = (B2)

I could expose the whole scramble, but then I would spoil it for all you wannabee pompous retards!

It's not our fault. When you do enough 2x2, you get scrambles like this every now and then. It's just random chance. If you toss a coin many times, you'd think it's normally 50/50 chance. That doesn't stop there from being ten heads in a row. It's just chance. It' RANDOM.
 

Henrik

Member
Joined
Aug 15, 2007
Messages
494
Location
Fyn, Denmark
WCA
2006BUUS01
YouTube
Visit Channel
http://www.worldcubeassociation.org/regulations/scrambles/scramble_cube_222.html

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


WR: Javier Paris 2x2x2 1.63'' Murcia Open 2008

Scramble:F' D2 L2 B' D' B R' D' R' U L' B' L2 U' L2 U2 R2 B2 R2 U2 B2 R2 D R2 D2

How was THIS scramble generated?

As far as I know the program was designed to just pick a letter and a number. It did not think of a random position for the cube, but just picked a random letter. Only in the later versions of the official scrambler "looked" at the cube and picked one of the random states and the generated a scramble.

thats how I understand the old versions of the scramblers.
 
Last edited:

Lucas Garron

Administrator
Joined
Jul 6, 2007
Messages
3,718
Location
California
WCA
2006GARR01
YouTube
Visit Channel
CCT has 3x3 random-state scrambles? How do I activate them?
Ask Jeremy for his beta version. It's not in the main release because it's slow to load, and I don't think he created a "initialize-kociemba-after-startup" version.

Henrik: You're mainly saying the right thing, but cumbersomely phrased and inaccurate. In particular, current 2x2x2 scrambles are not random-state. Not your fault, but I tend to cringe at wrong information that someone might read and then use/retell as if it were true.
 
Last edited:

Henrik

Member
Joined
Aug 15, 2007
Messages
494
Location
Fyn, Denmark
WCA
2006BUUS01
YouTube
Visit Channel
Lucas:
Yea as my first language is not English, but I do try to phrase the best way I know.

I can speak fluently, but writing and phrasing,,, nope :p

Yea my fault about random-state scrambles in the new version.

I would have hope you or someone else could have said it better than me, so I tried my best.
 
Last edited:

jfly

Member
Joined
Aug 23, 2008
Messages
226
Location
California
WCA
2005FLEI01
YouTube
Visit Channel

I tried it using:
Ubuntu 8.04.4 LTS
Linux 2.6.24-27-generic kernel
Firefox 3.0.17 browser
Sun java 1.6.0_17-b04

... and it crashed the browser :/
Haha, seriously? Lame. Any stack traces or the like to work with? I know you already did something similar with your javascript timer, so you must have some idea of what could go wrong.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
... and it crashed the browser :/
Haha, seriously? Lame. Any stack traces or the like to work with? I know you already did something similar with your javascript timer, so you must have some idea of what could go wrong.

Well what it does is cause the browser to hang, with the CPU sitting at 100%. I've left it for a good few minutes, with no change. Since there's no actual error produced by the applet, there won't be any stack trace.

The only thing I can think of is that perhaps the requirements set for the search algorithm are too high. I think on my implementation, for the call to Search.solution() I use 25 for max depth and 60 sec for max search time. As well as that, I also have a buffer storing generated scrambles so that the solver can feed it in a separate thread while previously generated scrambles can be served to the user instantaneously.
 
Last edited:

jfly

Member
Joined
Aug 23, 2008
Messages
226
Location
California
WCA
2005FLEI01
YouTube
Visit Channel
Interesting. I still don't see exactly why my implementation would hang at 100% for you, but your solution is definitely the better one. How big a pool of pre-generated scrambles do you keep? I wish there was something we could do about the initialization time of the applet. For cct I hacked in the ability to write the pruning tables to disk and read them back upon startup. That gave a bit of a performance boost.
 

Cride5

Premium Member
Joined
Jan 27, 2009
Messages
1,228
Location
Scotland
WCA
2009RIDE01
I keep 4 scrambles in the buffer. The startup is a bit of an issue, but unfortunately saving to disk isn't as easy in a webapp. It requires deploying the program as a signed applet, which means it has much more control over the client's comp. Many folks (including myslef) aren't very comfortable with this.

With regards to the source details ... I've sent you a pm.
 

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:

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);

BUMP: I've finally gotten round to fixing the scramble generator in the light of SK's comments.

For convenience, theres a page to generate the scrambles here:
http://www.ctimer.co.uk/solver2x2.html

And the code which does it is here:
http://www.ctimer.co.uk/solver2x2.js

I've also updated cTimer with the new changes.

Folks are welcome to use the code in solver2x2.js provided permission is sought from Jaap Scherphuis before-hand. To make use of the code, simply include solver2x2.js in your application and make a call to: initSolver2x2() on page load, then use calls to genScramble2x2() to return your scramble.
 

Parad0x13

Member
Joined
Jan 1, 2015
Messages
1
BUMP: I've finally gotten round to fixing the scramble generator in the light of SK's comments.

For convenience, theres a page to generate the scrambles here:
http://www.ctimer.co.uk/solver2x2.html

And the code which does it is here:
http://www.ctimer.co.uk/solver2x2.js

I've also updated cTimer with the new changes.

Folks are welcome to use the code in solver2x2.js provided permission is sought from Jaap Scherphuis before-hand. To make use of the code, simply include solver2x2.js in your application and make a call to: initSolver2x2() on page load, then use calls to genScramble2x2() to return your scramble.

Hey all, I rewrote his code in Objective-C for iOS devices. GLHF!
HTML:
https://github.com/bryanandhallie/Cride5Solver
 
Top