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

Java Scrambler

Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
I wrote a tiny scrambler application in Java (3x3 only). Check it out: http://www.vanderblonk.com/wp-content/uploads/rubiks-cube-scramble-generator.zip

New: generates N scrambles of length L
Show: shows animated java applet for last scramble or selected text
Clear: clear list

Source code is in the zip file.

Hope you like it. The nice thing about the scramble routine is that it doesn't use a while loop to prevent cancelled moves...
 
Last edited:
Joined
Dec 23, 2009
Messages
951
Location
Michigan, USA
WCA
2010MINE01
YouTube
Visit Channel
When I download it and extract the files, it does nothing. I'm so stupid :fp

EDIT: To tell you guys what I am doing to make it easier for figure out the problem (I am using Google Chrome): I click on the link in the first post. The newly downloaded zip file shows up at the bottom of the Chrome window. I click on that, which brings up the file on the "downloads" section of my computer. At the top of that window I press "Extract all files". When the extraction window appears, I click extract files. The exact same "downloads" window pops up again, the only difference is that there is no "Extract all files" button at the top of the window. That button was replaced with a "Burn" button. If I click on the "dist" or "src" folders, it just brings me to a bunch of other folders, and so on.
 
Last edited:

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel
"Unable to launch the application."
com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/C:/Users/Michiel/Documents/NetBeansProjects/Algopher/dist/launch.jnlp
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The nice thing about the scramble routine is that it doesn't use a while loop to prevent cancelled moves...
Does that matter?

Also, what advantage does your offer? I mean, considering all the other scrambles we already have.


Um... it gave me this:
F2 B F2 L D' R U' F2 U L U' L2 R F R D U R' L D2 F D2 R2 L U

Could you make a print function?
If you just want to print a lot of scrambles, there's also this (reload to get new scrambles):
http://stefan-pochmann.info/spocc/other_stuff/tools/scramble3x3/
Or the one below, if you don't care about formatting.

Amazing! :)
Can produce 500 scrambles, no problem, and within 3 seconds (Estimate). Impressive!
You must not be a programmer. Try this:
http://stefan-pochmann.info/ptimer/500scrambles.html
How long does that take for you?
 
Last edited:
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
Stefan, I noticed the error quite soon, but was busy fixing it and adding features instead of checking the forum to see if anyone had spotted the problem. I should've known you would be the first. Anyway, it's fixed and I added an option for a generated visualcube image that shows the scramble. I still have some problems getting that to work in IE though, but it feels pointless to solve that.

As to what's the point, there is no point, just that I was fiddling with Java. Also, not using a while loop matters to me, so it matters, just because I say so. :-D

So I guess I should now convert it to C to see how fast it would churn out algorithms, and then assembly... Well, maybe not..

Oh, and my scrambler doesn't add anything that your scrambler doesn't do I guess. I started it because I wanted a mobile application that gave me scrambles. Do you know of any other that run on regular Java (J2ME so not Android, Iphone, Crackberry etc)?
 
Last edited:

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel
So I guess I should now convert it to C to see how fast it would churn out algorithms

Are you serious? You think generating the algs is a bottleneck? Note how even my simple javascript scrambler produces 500 scrambles pretty much instantly.

Do you know of any other that run on regular Java (J2ME so not Android, Iphone, Crackberry etc)?

I think this one does (haven't tried it myself):
http://m.cubing.dk/
 

mrCage

Member
Joined
Jun 17, 2006
Messages
655
I have a more functional Javascript scrambler at http://mzrg.com/miniSites/scramblers/megascrambler.html, but yours is pretty cool. Mine is old though and at some point I should update it with the latest scramblers in qqTimer.

I like the 3x3x3 noobs scrambler!:cool:

On the serious side, sometimes a client side scrambler is better, and sometimes a server side one fits the bill better (online competitions for instance)...

Per
 

qqwref

Member
Joined
Dec 18, 2007
Messages
7,834
Location
a <script> tag near you
WCA
2006GOTT01
YouTube
Visit Channel
Per: Server side might be useful for very computation-intensive scrambling, like (near-)optimal 3x3 or Square-1. For online competitions, it would probably be best to generate a static page (with the scrambles) ahead of time, and then have the competitors load that.

Stefan: Scrambling algs themselves are certainly not a bottleneck in 3x3 (at least with random moves), but they definitely can be in other cases, such as CubeExplorer type 3x3, optimal 2x2/pyraminx, some bandaged puzzles, etc.
 
Joined
Apr 22, 2006
Messages
54
Location
Oranjestad, Aruba
WCA
2003BLON01
YouTube
Visit Channel
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.
 
Top