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

Software: kubesolver - easy algorithm generator for 3x3x3

kubesolver

Premium Member
Joined
Nov 15, 2019
Messages
425
Hi,

I am pleased to anounce a release of kubesolver 1.0.

I've been working on it on and off for few months and even though not perfect I think it's good enough to share with general public. I think it offers something new to the current state of the art in terms of ease of use for algorithm generation.

project website:

source code & tools:

The basic usecase is the ability to specify a cube position using standard notation and generate algorithms specifying generators (all regular moves, wide moves, slices, 180-turns only etc.), for full cube or for earlier stages like OLL, etc.,

Code:
set_gen RUD
R2 D L2 D F2 L D R' D2 L D' R' U2
reconstruct

With this setup KubeSolver will spam thousands of RUD G-perms.
Code:
R' U' R D' U R2 U R' U R U' R U' R2 D U'
D R' U' R D' U R2 U R' U R U' R U' R2 U'
U2 R2 U2 R2 U' R2 D' R2 U R2 U' R2 D U R2 U2 R2
R' U2 R' D' R2 D2 U R' U' R D2 R D R2 U2 R U2
D' R' U' R D' U R2 U R' U R U' R U' R2 D2 U'
D2 R' U' R D' U R2 U R' U R U' R U' R2 D' U'
U2 R U2 R' D R U' R' D' U R2 D2 R' U2 R D2 R2
U2 R U2 R' D2 R U' R' D2 U R2 D' R' U2 R D R2
R2 U R' U2 R D' U R U' R' D U2 R2 U' R' U' R2 U2
U2 R U2 R2 U' R2 D' R2 U R2 U' R2 D R U R U2 R'
U2 R2 U2 R2 U' R2 D' R2 U R2 D R2 D' U' R2 D U' R2
U2 R' U2 R U2 R2 U R2 D' U2 R U R' D U' R2 U2 R
R2 U' R2 U' R2 U2 R2 D' U' R2 U R2 U R2 U2 R2 D U
U2 R2 U R2 D U R2 U2 R2 U R2 U R2 D' R2 U' R2 U'
D R2 U' R2 U' R2 U2 R2 D' U' R2 U R2 U R2 U2 R2 U
R' U2 R2 D' U R U R' D R' U' R' U' R' U2 R' U2 R
U2 R2 D' R' D R' U2 R2 U' R D' U' R2 D R' U2 R2 U2
R U2 R2 U R U R2 U' R' D U' R' U2 R D' R2 U2 R'
R2 U' R2 D' U' R2 D R2 U R2 D' R2 D U' R2 U2 R2 U2
R2 U R' U R' U2 R D' R U R2 D U R2 D' R' D U' R2
D' U2 R2 U2 R2 U' R2 U R2 U2 R2 D U R2 U' R2 U R2 U'
D' R2 U2 R U2 R2 U R U R' D R2 U' R U' R U2 R2 U'
(...)

KubeSolver 1.0
==============
Copyrights & Author: Jakub Straszewski, 2020

General
-------

The program is able to solve 3x3 Rubik's cube.

The most prominent usecase it the ability to easly generate algorithms for particular cases.

The simple two-phase solver is there for completness but it's not particularly good or fast.

Architecture
------------
KubeSolver is a command-line application. It reads commands from standard input and writes output to standard output.

Example usecases:
----------------

1) Basic alg generation
in.txt:
F R U R' U' F'
kubesolver.exe < in.txt > out.txt
out.txt:
INFO:Kubesolver 1.0 (C) Jakub Straszewski 2020
INFO:Searching 1 move solutions...
INFO:Searching 2 move solutions...
INFO:Searching 3 move solutions...
INFO:Searching 4 move solutions...
INFO:Searching 5 move solutions...
INFO:Searching 6 move solutions...
F U R U' R' F'
INFO:Searching 7 move solutions...
INFO:Searching 8 move solutions...
U' R U B U' B' R' U
(...)

kubesolver.exe --silent < in.txt > out.txt
out.txt:
F U R U' R' F'
U' R U B U' B' R' U
(...)

2) This example will reconstruct the given U-perm with MU-gen
in.txt:
set_gen MU
R2 U R U R' U' R' U' R' U R'
reconstruct

3) This example shows how to generate OLL algorithms for sune-case.
in.txt:
init_empty_cube
add_f2l
add_edges_orientation
add_corners_orientation
set_gen RULD
R U R' U R U2 R'
solve

4) This example shows how to solve a yellow cross:
init_empty_cube
add_edge DR
add_edge DL
add_edge DB
add_edge DF
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve
./kubesolver.exe --silent --exit_on_find < in.txt
F2 D' L2 B F'

5) this example shows how to solve a yellow-xcross with a BL slot.
init_empty_cube
add_edge DR
add_edge DL
add_edge DB
add_edge DF
add_edge BL
add_corner BLD
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve

5) this example shows how to solve a cube with 2-phase algorithm.
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve_two_phase
L F2 D2 L2 R' B2 U' F2 L B' U' R2 D' B2 D R2 D' L2 F2 U2 B2 U' F2 D


List of commands:
-----------------
To be done. At the moment examples secion covert most of the api.

Commands for setting up a cube:
------------------
set_gen XXX - specified the list of moves allowed in the algorithm. Examples: RU, rRU (wide moves), MES (slice moves), L2U2R2D2BF (only 180 turns). Defaults to RLUDFB
init_full_cube (default)
init_empty_cube
Note: the command below make only sense after calling init_empty_cube
add_edge xx
add_corner yy
add_edges_orientation - all edges that has not been added explicitely by add_edge will be required to have good orientation (according to the LRUD-gen)
add_corners_orientation - same as edges
add_f2l - adds all edges and corners for bottom two layers.

Commands to solve a cube:
-------------------------
solve - generate algorithms solving given cube state
reconstruct - generate algorithms solving the reverse cube state
solve_two_phase - will solve 3x3 cube using two-phase algorithm ignoring init moves (so it will solve the full cube for specified sequence)

Licence
-------

Free to use for any use. No guarantees or liability of any kind accepted.
 
Last edited:

brododragon

Member
Joined
Dec 9, 2019
Messages
2,274
Location
Here
I already know who made it when I see that 'k'.

On a more serious note, this seems awesome, but I can't get it to work. I decide to try genning a RU H-Perm. This is what I typed in:

set_gen RU M2 U M2 U2 M2 U M2 reconstruct
But I got nothing out:
INFO:Searching 1 move solutions... INFO:Searching 2 move solutions... INFO:Searching 3 move solutions... INFO:Searching 4 move solutions... INFO:Searching 5 move solutions... INFO:Searching 6 move solutions... INFO:Searching 7 move solutions... INFO:Searching 8 move solutions... INFO:Searching 9 move solutions... INFO:Searching 10 move solutions... INFO:Searching 11 move solutions... INFO:Searching 12 move solutions... INFO:Searching 13 move solutions... INFO:Searching 14 move solutions... INFO:Searching 15 move solutions... INFO:Searching 16 move solutions... INFO:Searching 17 move solutions... INFO:Searching 18 move solutions... INFO:Searching 19 move solutions... INFO:Searching 20 move solutions... INFO:Searching 21 move solutions... INFO:Searching 22 move solutions...
 

kubesolver

Premium Member
Joined
Nov 15, 2019
Messages
425
@brododragon Thanks for trying it out!
I don't know what is the issue here :(
I run your config on my computer and it works well.
I suggest that you put all your input into a in.txt file
and try running program from command line like this:
kubesolver.exe < in.txt
you could also include (undocumented command) 'print' right before reconstruct to see if my program understood input well.
 

brododragon

Member
Joined
Dec 9, 2019
Messages
2,274
Location
Here
print reconstruct kind of worked. Only problem is, it prints everything it searches.
EDIT: I can't access my computer rn but as soon as I can I'll try in.txt.
 
Last edited:

kubesolver

Premium Member
Joined
Nov 15, 2019
Messages
425
Does this have the ability to ignore orientations and/or permutations of certain pieces?
Only partially unfortunately.
It's possible to specify pieces it has to solve perfectly, and for the unspecified pieces it's possible to say if it should ignore them all or orient them all (separately corners and edges).

It allows to solve things like:
F2L + oriented corners last layer, ignoring edges
EOLine

What is not possible right now is for example:
Solve only corner permutations ignoring orientation.
Solving Line + F2L edge orientation.
It's also not possible to ignore centers (for roux first block for example).
 

kubesolver

Premium Member
Joined
Nov 15, 2019
Messages
425
Are you gonna make a Mac version?
@ProStar Would you like to try to compile it on mac if I share the sources? I plan to put the project opensource on github after I do some code-cleaning but I could send you the current version.

Could you run a couple of benchmarks against comparable programs for comparison (eg cube explorer, harcs(ish), ksolve, acube etc)?
I don't intend to run benchmarks for few reasons.
1) I wrote this program because I didn't find it easy enough to do alg generation with these other programs so I simply don't know how. (but I only found cube explorer and ksolve and not the others, maybe I just wasted time).
2) Performance was not by biggest concern so I doubt my solver is faster.
3) Performance is good enough for practical purposes.
On my very old computer it generates all <=18 moves 3-gen algorithms (e.g. all RUF G-perms) in 10 seconds.
Compared with how much time you need to actually process these 200 algorithms 10 seconds is nothing. Even if the time went down by a factor of 10 it will hardly improve on usability of a program for the purpose of exploring alg sets.
 
Last edited:

brododragon

Member
Joined
Dec 9, 2019
Messages
2,274
Location
Here
Can you make a keyboard shortcut to stop searching? It sometimes will just keep searching for like 10 minutes on 22 move solutions when there's an 8 mover.
 

kubesolver

Premium Member
Joined
Nov 15, 2019
Messages
425
Small release 1.0.1

for @brododragon there is a -n switch to limit number of output sequences.
So you can do
Code:
kubesolver.exe -n 10
, and the program will stop after finding 10 sequences. or you can do
Code:
-d 15
to limit search to max 15 move long sequences.
 
Top