# Cross Solver?



## badmephisto (Oct 23, 2007)

I'd really like to have a program that checks for the fastest possible cross on a given cube, but before I go ahead and write it myself, I wanted to make sure there isn't one already - does anyone know of anything like this? Quick & Dirty Google searches didn't reveal anything...


----------



## Todd (Oct 23, 2007)

fewest moves possible cross isnt necessarily the best.

In another post I gave an example of a scramble which counting double-turns was a 3 move cross, but if you added another 3 moves you also solved 2 C/E pairs.

3 move cross versus 6 move cross+2 pairs


----------



## joey (Oct 23, 2007)

Todd said:


> fewest moves possible cross isnt necessarily the best.



He didn't say it was. He simply asked if there was a program that could do optimal crosses.


----------



## Todd (Oct 23, 2007)

I know he didnt say it was but it would probably be of little value.


----------



## Dennis (Oct 23, 2007)

Write a program that converts scrambles to ACube inputs. Use JNetCube timer to generate a .txt-file with as many scrambles you want. You can run ACube in batchmode and it will generate the solutions in a .txt-file for you.


----------



## Johannes91 (Oct 23, 2007)

I wrote solvers for the first 2 steps of Petrus, but don't remember seeing anything similar for cross.


----------



## AvGalen (Oct 23, 2007)

Stefan Pochmann talked about a program he wrote for his studies on the yahoo forum about a month ago. I remember the program could find optimal pairs and I think (not sure) it could also find optimal crosses.

Also, would you like the program to find the shortest optimal cross, or the shortest optimal cross for a given color (white)?


----------



## Johannes91 (Oct 23, 2007)

AvGalen said:


> Also, would you like the program to find the shortest optimal cross, or the shortest optimal cross for a given color (white)?


I think finding all optimal solutions for all crosses would be most useful.


----------



## Johannes91 (Oct 25, 2007)

I got bored last night and did this: http://funktio.awardspace.com/misc/cross/index.pl.

Edit much later: It's here now: http://laire.dy.fi/old/misc/cross/index.pl.


----------



## AlexandertheGreat (Oct 25, 2007)

Johannes91 said:


> I got bored last night and did this: http://funktio.awardspace.com/misc/cross/index.pl.



wow, that's pretty cool!


----------



## badmephisto (Oct 25, 2007)

Johannes91 said:


> I got bored last night and did this: http://funktio.awardspace.com/misc/cross/index.pl.



impressive! Judging from your other apps though you had a pretty good starter code. I'll definitely use this  
thanks!

EDIT: One suggestion for a pretty nifty fix: Consider an output like this for some cross:
R2 L F B' L2 U'
R2 L' U2 F B' U
L F B' R2 L2 U'
L F R2 B' L2 U'
L B' R2 F L2 U'

Note that last 3 lines are exactly same solutions because the 2nd 3rd and 4th moves commute. It would be nice if the program recognized this and removed all but one from the solutions list.


----------



## Johannes91 (Oct 25, 2007)

Thanks for the nice words! It has gotten many hits already. 



badmephisto said:


> Judging from your other apps though you had a pretty good starter code.


Yeah, it took just 15-30 minutes to get this working (followed by some golfing and -Ofun).



badmephisto said:


> L F B' R2 L2 U'
> L F R2 B' L2 U'
> L B' R2 F L2 U'
> 
> Note that last 3 lines are exactly same solutions because the 2nd 3rd and 4th moves commute. It would be nice if the program recognized this and removed all but one from the solutions list.


I'd say that those are not exactly the same; R2 B' is different from B' R2. Truly identical solutions (e.g., F B' vs. B' F) are already discarded.

Nevertheless, these seem to be quite common (and not interesting) so it would be good to at least add an option to filter them. I'll think about it.


----------



## Joël (Oct 25, 2007)

I just plugged in 4 cross pieces in cube explorer, and it would give me a bunch of crosses:

Also.. Ron's Cube Solver is good for these kind of things:

http://www.speedcubing.com/CubeSolver/CubeSolver.html


----------



## mrCage (Oct 25, 2007)

Johannes91 said:


> I got bored last night and did this: http://funktio.awardspace.com/misc/cross/index.pl.


Hi Johannes 

That also "works" in buggy Internet Explorer, but i have to reload the page to enable the New button each time.

Would it be possible to make that page work with custom scrambles? Or i need to look into your .js code ?? 

Have fun!! Kiitos 

-Per


----------



## joey (Oct 25, 2007)

mrCage said:


> Would it be possible to make that page work with custom scrambles? Or i need to look into your .js code ??



It does, jsut copy + paste your scramble into the box, and click "Show solutions/depths". And it works!

He has written a nice JS cube library.


----------



## Johannes91 (Oct 25, 2007)

Hi Per,



mrCage said:


> Would it be possible to make that page work with custom scrambles?


Like joey said, it should work already. Just paste/write your own scramble and then *Send* it. Eipä kestä.



joey said:


> He has written a nice JS cube library.


Hehe, thanks... JS is open source by definition, but if somebody wants to see any of the files before minification, just email me.


----------



## joey (Oct 25, 2007)

Johannes91 said:


> joey said:
> 
> 
> > He has written a nice JS cube library.
> ...



Isn't it more fun tyring to actually decode it?


----------



## mrCage (Oct 25, 2007)

Hi 

I don't see why you would like it not to work at all in some particular browser. I am developing web pages for my work and one of the main criteria is that my code does work in IE. Sadly about 80% of "mainstream" users are using that bad excuse of a browser, so if my code wont work there i'm in big trouble.

I am now being forced to recode some of my pages from using session cookie (php) to using normal cookies due to IE always losing it after prolonged browsing. I absolutely HATE that, especially since the pages depend on authorization info stored in session variables.

To get back to topic at hand, your page(s) work as intended in the burning fox  Also custom scrambles ... Nice .....!!!!

-Per


----------



## mrCage (Oct 25, 2007)

Hi Johannes 

Just an idea i had. Why not add a link from each of the Petrus step 1 solutions to the step 2 page? This requires to prepend the solution with required xyz and the original scramble to solve the DBL block instead  Not so hard to fix i guess??

(käypä korvaus/vastike)

-Per


----------



## Johannes91 (Oct 25, 2007)

joey: Yeah, surely it's more fun. 



mrCage said:


> Just an idea i had. Why not add a link from each of the Petrus step 1 solutions to the step 2 page?


Because I was/am going to put all the solvers into a single page. But adding those links sounds so easy, I guess I'll do that first.


----------



## mrCage (Oct 25, 2007)

Hmmm ....

Microsoft is dead??? I don't think so, even they make a good attempt to p*** off users with the bloated, slow and extremely buggy software called Vista. My wife has vista and im annoyed every time she opens it up. I can survive with her laptop if we dual boot to xp instead or just use it to watch a dvd 

MS keyboards and mice - generally good, but i use Logitech

Media Player - tolerable, but use VLC or MPlayer if you are serious about videos

WindowsXP - my favorite OS despite all the security issues - it's not hard to get protected

MS Office - quite good in fact - wish it would support open standards better though

IE - deadly buggy and eats your RAM for lunch - makes beautiful rendered pages though - probably works best in quirks mode

Notepad - a joke of an application - it is a ONE day job to code a better editor in Delphi or similar!!

.NET - i never tried, dont want to - i guess i will stick to PHP unless forced otherwise

SQL Server - pretty damn good - very easy to use and powerful administration console - MySQL (and SQLyog) does a good job too and works perfectly with PHP

-Per


----------



## Mr Cubism (Mar 3, 2009)

about cross explorer; it doesn´t work that well. I want the shortest solution (maximum of 8 turns) of this case....but no...... :-(







11 turns......what is this?


----------



## Johannes91 (Mar 3, 2009)

Mr Cubism said:


> about cross explorer; it doesn´t work that well. I want the shortest solution (maximum of 8 turns) of this case....but no...... :-(


Maybe it doesn't like illegal positions?


----------



## JohnnyA (Mar 3, 2009)

Johannes91 said:


> Mr Cubism said:
> 
> 
> > about cross explorer; it doesn´t work that well. I want the shortest solution (maximum of 8 turns) of this case....but no...... :-(
> ...



It's possible to have that position on a cube ... anyay, I can find an 8-move cross for that setup. What about you?


----------



## Johannes91 (Mar 3, 2009)

JohnnyA said:


> Johannes91 said:
> 
> 
> > Maybe it doesn't like illegal positions?
> ...


D'oh, thanks. I was looking at the B-face mirrored. There are two 7f* solutions to the D cross, L B D' R F D L and R D F L D' B R.

Edit: And btw, the program is called _Cube_ Explorer, and the 11f* alg solves the whole cube and not just cross.


----------



## nitrocan (Mar 3, 2009)

Mr Cubism said:


> about cross explorer; it doesn´t work that well. I want the shortest solution (maximum of 8 turns) of this case....but no...... :-(
> 
> 
> 
> ...



That's the solution for the whole cube.


----------



## Mr Cubism (Mar 3, 2009)

yes, misstake from me. Are there any program which solve only the cross fewest turns?


----------



## Mr Cubism (Mar 3, 2009)

> There are two 7f* solutions to the D cross, L B D' R F D L and R D F L D' B R




How did you figured out these two solutions?


----------



## nitrocan (Mar 3, 2009)

You can right click all the stickers except the cross edges, and then click solve.


----------



## Johannes91 (Mar 3, 2009)

Mr Cubism said:


> > There are two 7f* solutions to the D cross, L B D' R F D L and R D F L D' B R
> 
> 
> How did you figured out these two solutions?


I used this.


----------



## realcube (Jul 4, 2011)

http://laire.fi/old/misc/cross/index.pl has gone. Anywhere to find it now?


----------



## wontolla (Jul 4, 2011)

http://laire.fi/jarcs/


----------



## Schmidt (Jul 5, 2011)

Mr Cubism said:


> about cross explorer; it doesn´t work that well. I want the shortest solution (maximum of 8 turns) of this case....but no...... :-(
> 
> 
> 
> ...



F' x2 D2 F should make a nice Y cross with G-O pair already made.

EDIT:The rest of the solution


----------



## Godmil (Jul 5, 2011)

I'm afraid you're a few years too late with that reply.


----------

