# Presenting QBX



## emg (Aug 25, 2010)

Hello,

I'd like to present QBX, a JavaScript two phase solver. You can paint your cube and find a solution, solve random cubes, generate (I believe) WCA legal scrambles, step through move sequences, and benchmark your browser's JavaScript.

For now it works in Chrome, Firefox, and I've tested it in a webkit based browser as well. It technically works in IE8, but you have to sit there and tell IE not to kill the page because the script is taking too long, over and over and over.

I would recommend using Chrome, as it is approximately 30x faster than Firefox 3.5 and 15x faster than Firefox 3.6, try the benchmark.

Please play with it, try to break it, give feedback. Let me know what's wrong, what's not intuitive, what features you would like to see in the future.

Enjoy!
-emg


----------



## irontwig (Aug 25, 2010)

The de facto standard notation:
http://en.wikipedia.org/wiki/Rubik's_Cube#Move_notation


----------



## emg (Aug 25, 2010)

Luckily that was a fairly simple fix (deleted one character, changed one more...), although it doesn't support double layer or rotations yet
-emg


----------



## FatBoyXPC (Aug 25, 2010)

There was discussion on this awhile ago, whether it would work in javascript. You've apparently put quite a bit of effort into this 

Good job though! Works well for me!


----------



## rokicki (Aug 25, 2010)

*Performance?*

I'd love to see performance numbers on the various boxes. Maybe just the last number reported.


----------



## Lucas Garron (Aug 25, 2010)

Tom told be about this, but until then, it was on my list of currently impossible things. I thought a practical solver would require either a bulky applet or a web query.
I'd really love to see some profiling, particularly the memory used. And of course, I'd love to see every web timer start using it.

Anyhow, awesome work. :tu

Just one thing:


emg said:


> generate (I believe) WCA legal scrambles


I tend to be very conservative about saying that. I don't really consider anything a WCA legal scramble myself unless it's produced by a program listed here.


----------



## StachuK1992 (Aug 25, 2010)

Woah benchmark:

Chrome - 6780 ms
FF - 157476ms

23x

Also, this is really quite cool!


----------



## emg (Aug 25, 2010)

Lucas Garron said:


> Just one thing:
> 
> 
> emg said:
> ...



Ahh, ok. Well to be clear, it uses the Mersenne Twister as its pseudorandom number generator to generate a cube state and then solves for it.

Out of curiosity, is it possible to have the program evaluated and approved as generating legal scrambles? That's meant to be one of the features.

-emg


----------



## Lucas Garron (Aug 25, 2010)

emg said:


> Out of curiosity, is it possible to have the program evaluated and approved as generating legal scrambles? That's meant to be one of the features.
> 
> -emg


Yes. I once asked Ron, and scrambling programs can be approved at any time.
For evaluation, can you generate a bunch of random cases + solutions and compare them to CubeExplorer output to show they're equally random and short enough?

Incorporate it into this format and post it in the WCA forum, and it'll probably be approved.


----------



## Lucas Garron (Aug 25, 2010)

Lucas Garron said:


> emg said:
> 
> 
> > Out of curiosity, is it possible to have the program evaluated and approved as generating legal scrambles? That's meant to be one of the features.
> ...



By the way, what does "QBX" mean?


----------



## rokicki (Aug 25, 2010)

QBX was my name suggestion which Evan approved (his names may have been better). It's like a riff on Cube Explorer, but it's like its little sibling. QB (cubie) instead of cube, and X instead of explorer. I figured this was better than "JavaScript two-phase solver" which is pretty generic.

So if the name is a fail, that's entirely my doing and none of Evan's.


----------



## brunson (Aug 25, 2010)

The performance is amazing.


----------

