# Software: kubesolver - easy algorithm generator for 3x3x3



## kubesolver (Apr 10, 2020)

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:


KubeSolver - simple Rubik Cube algorithm generator.



source code & tools:








GitHub - kuba97531/kubesolver: Rubik's cube solver


Rubik's cube solver. Contribute to kuba97531/kubesolver development by creating an account on GitHub.




github.com





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.,


```
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.

```
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'
(...)
```



Spoiler: copy/paste from the first version of a readme.txt



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.


----------



## brododragon (Apr 10, 2020)

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 (Apr 10, 2020)

@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 (Apr 10, 2020)

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.


----------



## ProStar (Apr 10, 2020)

Looks awesome! Does this have the ability to ignore orientations and/or permutations of certain pieces?


----------



## kubesolver (Apr 10, 2020)

ProStar said:


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


----------



## brododragon (Apr 10, 2020)

kubesolver said:


> I suggest that you put all your input into a in.txt file


Where should I put the .txt file?

EDIT: Hmmm.... Now it's working without the text file or print thing...


----------



## ProStar (Apr 11, 2020)

Are you gonna make a Mac version?


----------



## Owen Morrison (Apr 11, 2020)

when I download it and click on it it takes me to my Garmin app and asks me to make a running course...


----------



## kubesolver (Apr 11, 2020)

ProStar said:


> Are you gonna make a Mac version?


Yes
I don't own a Mac but it compiles on Linux so i hope it will work on Mac out of the box.


----------



## shadowslice e (Apr 11, 2020)

Could you run a couple of benchmarks against comparable programs for comparison (eg cube explorer, harcs(ish), ksolve, acube etc)?

Thanks!


----------



## kubesolver (Apr 11, 2020)

ProStar said:


> 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.



shadowslice e said:


> 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.


----------



## brododragon (Apr 11, 2020)

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 (Apr 11, 2020)

You can just send the kill signal. Ctrl-c on windows


----------



## kubesolver (Apr 15, 2020)

Small release 1.0.1

for @brododragon there is a -n switch to limit number of output sequences.
So you can do

```
kubesolver.exe -n 10
```
, and the program will stop after finding 10 sequences. or you can do

```
-d 15
```
 to limit search to max 15 move long sequences.


----------



## PizzaCuber (Apr 15, 2020)

The website link dosent work?


----------



## kubesolver (Apr 15, 2020)

PizzaCuber said:


> The website link dosent work?


Fixed!


----------



## PapaSmurf (Apr 15, 2020)

Could you make it 64-bit if possible? Otherwise it doesn't run on Mac with wine. Or just make a mac version I guess, but it looks really promising!


----------



## paul.edmondson.magician (Apr 20, 2020)

Anyone got a link for A Cube please?

Sent from my CLT-L09 using Tapatalk


----------



## brododragon (Apr 20, 2020)

paul.edmondson.magician said:


> Anyone got a link for A Cube please?
> 
> Sent from my CLT-L09 using Tapatalk





ACube 3.1c Java Version


----------



## N's-cvt (Apr 21, 2020)

@kubesolver
If you can could you please put a WV basic F2L case in the readme I can't quite figure it out


----------



## OreKehStrah (Apr 24, 2020)

I've been using this solver for around 6 months time, and it has worked really well!
It wasn't too complicated to setup or use, which was nice since this is the first program I've used to generate algs.
The developer/op is also very friendly and was very helpful with getting everything setup, and fixed/added more options as I helped test the program.
I think this is a very viable and user friendly way to generate algs!


----------



## abunickabhi (May 11, 2020)

This solver has worked for me very well. I use it to generate 5style algorithms for UF buffer, to improve the 3BLD algs.


----------



## kubesolver (May 11, 2020)

abunickabhi said:


> This solver has worked for me very well. I use it to generate 5style algorithms for UF buffer, to improve the 3BLD algs.


Thanks for trying out my solver. I'm glad it works for you and please let me know if you think it misses some essential functionality.


----------



## ThisNameIsAlreadyTaken (May 11, 2020)

This sounds awesome! But I don't know how to install it or use it... how do you do that on Mac?


----------



## Owen Morrison (May 11, 2020)

Thank you so much for making kubesolver! I never knew how to make running courses before this and whenever I try to open kubesolver it lets me make one on my Garmin app!

But seriously, I have no idea why it does that, I tried to download something else a couple weeks ago and it did the same thing...


----------



## kubesolver (May 11, 2020)

Mac version is a Terminal (console) application. 
Given that most people seem to not be familiar with it I will add instructions how to use it on Mac to the wesite soon.


----------



## kubesolver (May 14, 2020)

Ok. I have updated website kklzhost.com/kubesolver/ with some mac instructions.


----------



## xcross (May 15, 2020)

Is there a way to simulate 2x2 algorithims?


----------



## Sub1Hour (May 15, 2020)

xcross said:


> Is there a way to simulate 2x2 algorithims?


I think that if you ignore edges and centers then yes


----------



## kubesolver (May 15, 2020)

Yes, you can generate 2x2 algs by ignoring the edges.
You can't ignore the centers unfortunately but for most alg sets it doesn't matter I think (e.g. if you search 3-gen algs).


----------



## WarriorCatCuber (May 15, 2020)

kubesolver said:


> Ok. I have updated website kklzhost.com/kubesolver/ with some mac instructions.


@ProStar now you have no excuse not to gen HKPLL


----------



## ProStar (May 15, 2020)

WarriorCatCuber said:


> @ProStar now you have no excuse not to gen HKPLL



I have an old computer and am lazy


----------



## WarriorCatCuber (May 15, 2020)

Should I get this or cube explorer? What are the advantages and disadvantages of both?


----------



## FinnTheCuber (May 15, 2020)

Can it work with a Chromebook?


----------



## kubesolver (May 15, 2020)

WarriorCatCuber said:


> Should I get this or cube explorer? What are the advantages and disadvantages of both?


In my opinion my kubesolver is better for alg generation. It's also very easy to integrate kubesolver with alg explorer so that you immediately get filtering of good candidates. You can use output from my program directly as input to the alg explorer. @PapaSmurf managed to combine it into one tool.

The advantages of Cube Explorer over kubesolver that I am aware of are:
- CubeExplorer is better in optimal solving e.g. for the scramble generation purpose.
- CubeExplorer has a gui so if you're affraid of command line tools and text inputs then kubesolver is not for you



FinnTheCuber said:


> Can it work with a Chromebook?


The binaries on my webpage are for windows and mac, but the source code is pure ansi C so it should compile on any platform that has gcc.


----------



## WarriorCatCuber (May 15, 2020)

kubesolver said:


> The advantages of Cube Explorer over kubesolver that I am aware of are:
> - CubeExplorer is better in optimal solving e.g. for the scramble generation purpose.
> - CubeExplorer has a gui so if you're affraid of command line tools and text inputs then kubesolver is not for you


I share a computer with my family, and would only be allowed one software. How long would it take to generate an alg with kubesolver as compared to CubeExplorer? If CubeExplorer makes more optimal solutions, and is easier to use, then why should I get kubesolver?


----------



## kubesolver (May 15, 2020)

WarriorCatCuber said:


> I share a computer with my family, and would only be allowed one software.


that's a really weird policy. What is the rationale behind it?



WarriorCatCuber said:


> How long would it take to generate an alg with kubesolver as compared to CubeExplorer?


I don't know. I don't know but in both programs the time spent to setup the input data will be much longer than the actual program execution so the speed doesn't really matter in my opinion. Also the program won't generate an alg, but tens, hundreds or thousands of all possible algorithms.



WarriorCatCuber said:


> if CubeExplorer makes more optimal solutions, and is easier to use, then why should I get kubesolver?


if you care about optimal solution for a scramble then use Cube Explorer.

Only use kubesolver if you want to generate a lot of algorithms in search of the most human-efficient one instead of just the one shortest.



> if CubeExplorer (...) is easier to use


I don't think CubeExplorer is easy to use. I believe my program beats it in usability for the purpose of alg generation by a magnitude.
The reason I wrote my own program was that it's so tedious to setup even the simplest case in ksolve or CubeExplorer.
But CubeExplorer has user interface which may be more suitable for some people.


----------



## WarriorCatCuber (May 15, 2020)

kubesolver said:


> that's a really weird policy. What is the rationale behind it?


I honestly don't know.


kubesolver said:


> I don't know. I don't know but in both programs the time spent to setup the input data will be much longer than the actual program execution so the speed doesn't really matter in my opinion. Also the program won't generate an alg, but tens, hundreds or thousands of all possible algorithms.


Ok, thanks, but how long would it take to setup the input data on each solver?


----------



## ProStar (May 15, 2020)

kubesolver said:


> that's a really weird policy. What is the rationale behind it?



Have you had parents? Lots of things don't make sense


----------



## kubesolver (May 15, 2020)

WarriorCatCuber said:


> Ok, thanks, but how long would it take to setup the input data on each solver?


I won't speak about CubeExplorer. You can read readme of kubesolver to get the idea.
If you already are a proficient computer user and understand a cubing notation and are familiar with kubesolver a little then setting something like "generate all RUD G-pemrs" is maybe one minute of work. Then usually less than a minute to generate more algs that you can ever dream to evaluate.

The bottleneck of a process of alg generation will be drilling hundreds of algs to figure out which ones are good.


----------



## WarriorCatCuber (May 15, 2020)

Is it possible to ignore other parts of the cube, like, say, solving corners of the last layer while ignoring the E-slice edges, the U edges and the DF edge?


----------



## kubesolver (May 16, 2020)

WarriorCatCuber said:


> Is it possible to ignore other parts of the cube, like, say, solving corners of the last layer while ignoring the E-slice edges, the U edges and the DF edge?


Yes, please see the readme. There are quite some examples. In particular you can do something like

```
init_empty_cube
add_edge BD
add_edge FD
...
add_corner UFR
...
```

to add those edges and corners that have to solved and the rest can be ignored.
For example solving an x-cross can be done be specifying 5 edges and 1 corner like this:

```
init_empty_cube
add_edge BD
add_edge FD
add_edge LD
add_edge RD
add_edge BL
add_corner BLD
<scramble>
solve
```


----------



## WarriorCatCuber (May 16, 2020)

kubesolver said:


> Yes, please see the readme. There are quite some examples. In particular you can do something like
> 
> ```
> init_empty_cube
> ...


Ok, nice I understand better now. One last question: Does it gen algs with Slice moves and Wide moves?


----------



## kubesolver (May 16, 2020)

yes, Please read the readme. 
You have to specify it with a command set_gen. Examples:

```
set_gen MU
set_gen RrU
```


----------



## WarriorCatCuber (May 16, 2020)

kubesolver said:


> yes, Please read the readme.
> You have to specify it with a command set_gen. Examples:
> 
> ```
> ...


Ah ok thanks a lot. I'll probably download this if I can convince my parents it doesn't contain a virus.


----------



## ProStar (May 23, 2020)

I've downloaded it on my Mac, but I'm confused how to gen algs. The readme references a "in.txt" file, where is that file supposed to be located and what exactly should I be typing in it?


----------



## qwr (May 23, 2020)

A lot of this confusion could be solved by releasing the source code



ProStar said:


> I've downloaded it on my Mac, but I'm confused how to gen algs. The readme references a "in.txt" file, where is that file supposed to be located and what exactly should I be typing in it?



I haven't used the program but it reads from STDIN and outputs to STDOUT and likely the same across all platforms
kubesolver.exe < in.txt > out.txt 

so run it from command line in the directory with the solver and input file


----------



## kubesolver (May 23, 2020)

qwr said:


> A lot of this confusion could be solved by releasing the source code


I honestly don't see how. The sources and build file are on github. search in Google 'github kubesolver'.



> 've downloaded it on my Mac, but I'm confused how to gen algs. The readme references a "in.txt" file, where is that file supposed to be located and what exactly should I be typing in it?


@ProStar 

Did you REALLY read instructions for mac?




__





KubeSolver - simple Rubik Cube algorithm generator.






kklzhost.com


----------



## ThisNameIsAlreadyTaken (May 26, 2020)

Is it also possible to launch on OS X 10.13.6? I mean, when I try to execute some simple example, it says that it was built for 10.15 or something higher. Would there be drastic changes in code?


----------



## kubesolver (May 26, 2020)

@ThisNameIsAlreadyTaken 
I don't know. If you have some basic understanding of programming you might try to build the sources on your machine. I guess it would just work.


----------



## brododragon (May 26, 2020)

Are you thinking of adding a function that takes the colors to figure out how to optimally solve the cube?

Here's how I might do it to make it simple (example is H perm):


Spoiler



> reconstruct color
U FACE:
> W9
L FACE:
> ORO7
F FACE:
> GBG7
R FACE:
> ROR7
B FACE:
> BGB7
D FACE:
> Y7
(Gens algs here)


Should be pretty straight forward, but here's an expanation anyway. First, you call reconstruct color to start it off (configuration can of course be done before that). It gives you the first face to define (face order is ULFRBD), which you define with WOGRBY, top to bottom, left to right. To make things easier, you can use numbers to say how many times you want something to be repeated. WWWWWWWWW = W9 (solid face). That's pretty much it.


More ideas:


Spoiler



A command to define a case but without a few pieces, to which the program would gen algs for all possible cases. I might write a seudo-interface later.

Here's a simple one: make a -d switch that only does optimal. Something like:
> -d optimal
Also, you could make it so you could set the ceiling a few higher than optimal:
> -d optimal 2
Does 2 over optimal.



Anyway, I don't know how hard these would be, but I would love to see these features. Could I mess around with the code?


----------



## kubesolver (May 26, 2020)

brododragon said:


> Are you thinking of adding a function that takes the colors to figure out how to optimally solve the cube?


I thought about but thought that it's useless for my desired audience as for speedcubers it takes less time to find a setup to their desired position than to write stickers colors one by one.



brododragon said:


> A command to define a case but without a few pieces, to which the program would gen algs for all possible cases. I might write a seudo-interface later.


I think it's already there, but maybe I don't understand what you mean.



brododragon said:


> Also, you could make it so you could set the ceiling a few higher than optimal:
> > -d optimal 2


yes, I plan to add this switch as I also think it's useful


brododragon said:


> Could I mess around with the code?


You can find it on github if you google "kubesolver". I don't advertise it as it's the raw code without much explanaition.


----------



## brododragon (May 26, 2020)

kubesolver said:


> I thought about but thought that it's useless for my desired audience as for speedcubers it takes less time to find a setup to their desired position than to write stickers colors one by one.


That's the point of the numbering part (put numbers by a color to repeat it x number of times). Also, despite the fact that finding a setup could be faster, it would be long and extremely tedious to write out. The H perm took me ~5 minutes and that included some of the inventing of the system.


kubesolver said:


> I think it's already there, but maybe I don't understand what you mean.


I could give a scramble, ignore UL, UF, UR, and UB, then it would generate all of ELL.


kubesolver said:


> You can find it on github if you google "kubesolver". I don't advertise it as it's the raw code without much explanaition.


Thanks!


----------



## kubesolver (May 26, 2020)

brododragon said:


> The H perm took me ~5 minutes and that included some of the inventing of the system.


Setting up H-perm in kubesolver took you 5 minutes?
Even if you don't know H-perm by heart you can:
google H-perm,
copy/paste into kubesolver setup.
Like this you can find MU Hperms. (it took me 15 seconds to set it up)

```
set_gen MU
R U2 R' U' R' U' R2 U' R2 U2 R2 U2 R' U
solve

OUTPUT:
(...)
INFO: Searching 7 move solutions...
M2 U M2 U2 M2 U M2
M2 U' M2 U2 M2 U' M2
(...) ..
```
anyway - I have done some dirty tricks to fit the cube state in 128 bits that prevent me from easily accepting user to set arbitrary color stickers on a cube.



brododragon said:


> I could give a scramble, ignore UL, UF, UR, and UB, then it would generate all of ELL.


See the readme. This already works. However instead of removing the pieces you have to add them all to an empty cube (for some reasons I don't want to dwelve into)

For the example you provided when you want to solve all except of U layer edges you can write this:

```
init_empty_cube
add_f2l
add_corners
```


----------



## brododragon (May 26, 2020)

kubesolver said:


> See the readme. This already works. However instead of removing the pieces you have to add them all to an empty cube (for some reasons I don't want to dwelve into)


Thanks!
EDIT: sorry I meant that it gives all algs for all possible states.
I did:
set_gen RU
M2 U2 M2 U2
reconstruct
and it gave me sequences that just solve the cube from a solved state.

Also, I'm having trouble with the -n and -d switch. Whenever I try calling it, the program quits.

EDIT 2: Figured it out. Call it from cmd. Is there a simpler way?

EDIT 3: You can brick you computer by first adding F2L, EO, an. CO, then solving a PLL.

Sorry for all the updates and suggestions, it's probably getting quite annoying.


----------



## kubesolver (Jun 8, 2020)

There is a new update 1.0.5. It addressees some of the suggestions. Also there is a new website address kubesolver.com



Spoiler: changelog 1.0.5



- Fix a problem when some sequences were not printed. (sequences that had equivalent partial sequences to some other sequences)
- Fix a problem with moves that don't change cube state
- Add new option max-depth-after-first-match (da)
- Add option to set all options as commands rather than commmand line argument. Now it's possible to set max nunber of moves or depth in config.
Example:
set n 10 - print first 10 sequences found
set da 1 - only searcg sequences at most 1 move longer than the shortest sequence found
set d 14 - only search sequences at most 14 moves long.



@brododragon. Sorry I missed your previous post somehow. Yes, the program can brick your computer if you try to calculate a full cube from the beginning. The program isn't meant for that honestly. You can use a the solve_two_phase command for that. But it should rather be used for cases which can be solved either in a small number of moves or with small number of generators.




> set_gen RU
> M2 U2 M2 U2


You can;t solve that case with RU because it affects edges in D layer. My program isn't designed to gracefully fail on impossible inputs.


----------



## N's-cvt (Jun 8, 2020)

Unfortunately I can't access the zip file becuase of this:

*Not Found*

The requested URL was not found on this server.


Apache Server at kubesolver.com Port 443


----------



## kubesolver (Jun 8, 2020)

N's-cvt said:


> Unfortunately I can't access the zip file becuase of this:
> 
> *Not Found*
> 
> ...


Sorry, I have fixed a broken link now.


----------



## N's-cvt (Jun 8, 2020)

Thanks kubesolver!


----------



## brododragon (Jun 9, 2020)

kubesolver said:


> There is a new update 1.0.5. It addressees some of the suggestions. Also there is a new website address kubesolver.com
> 
> 
> 
> ...


Ok, thanks.

What do you think about my idea?


brododragon said:


> A command to define a case but without a few pieces, to which the program would gen algs for all possible cases. I might write a seudo-interface later.




Here's some suedo code (at da 1):
init_empty_cube
add_f2l
add_edges_orientation
add_corners_orientation
solve [CO]
1:
...
2:
...
3:
...
4:
...
5:
...
6:
...
7:
...


(gens all CO cases)


----------



## kubesolver (Jun 9, 2020)

brododragon said:


> Ok, thanks.
> 
> What do you think about my idea?
> 
> ...



Yes and no.

I won't add it to the kubesolver itself, but the the main advantage of command-line programs is that they have command-line interface and can easly interact with other programs so it's relatively straightforward to write a program to generate those cases and that will call kubesolver many times to solve all these cases.
I will prepare an example of how to do that for your particular case (if I understand correctly your example is solving second step of 2-look OLL)

p.s. it's "pseudo code" but the P is silent because english makes no sense.


----------



## JohnnyReggae (Jun 9, 2020)

How could you handle inspection rotations so that you can generate for any particular cross colour for example and have that on the D face ?


----------



## Jam88 (Jun 9, 2020)

Will you make an online version because I can't run either on Chromebook


----------



## brododragon (Jun 9, 2020)

kubesolver said:


> p.s. it's "pseudo code" but the P is silent because english makes no sense.


Oops sorry had way too little sleep and stayed up way too long.


----------



## N's-cvt (Jun 9, 2020)

I think I mentioned this suggestion before but if you could include movelimits like (R2 2 times) or (F2 0 times) it would definitely become my main generator but as of now it's so tedious to have the program generate 100 cases and then have to go into a google doc and take out all the algs with an F2 (not a fan of those). I think it would be a great tool to add in V-K.1.0.6


----------



## kubesolver (Jun 10, 2020)

JohnnyReggae said:


> How could you handle inspection rotations so that you can generate for any particular cross colour for example and have that on the D face ?





Spoiler: The way I do it is like this.



So I set up the cross on the bottom, do the scramble oriented in a way that the cross to the solve is on the bottom and solve it.

```
init_empty_cube
add_edge DF
add_edge DB
add_edge DR
add_edge DL
[reverse orientation]
[scramble_moves]
[orientation]
solve
```
If I want a particular orientation for example solve cross for D' U2 L2 D L2 B2 U B2 F2 D' B L2 B2 D2 L' D F' D2 U2 R' with orientation (z') I would do

```
init_empty_cube
add_edge DF
add_edge DB
add_edge DR
add_edge DL
z
D' U2 L2 D L2 B2 U B2 F2 D' B L2 B2 D2 L' D F' D2 U2 R'
z'
solve
```






Jam88 said:


> Will you make an online version because I can't run either on Chromebook


I don't know anything about Chromebook limitations. I don't intend on making an online version.
If there is a gcc and make on a chromebook then you could compile it there.



N's-cvt said:


> I think I mentioned this suggestion before but if you could include movelimits like (R2 2 times) or (F2 0 times) it would definitely become my main generator but as of now it's so tedious to have the program generate 100 cases and then have to go into a google doc and take out all the algs with an F2 (not a fan of those). I think it would be a great tool to add in V-K.1.0.6


I will most likely not add it to the kubesolver solver. I think generation of algorithms and filtering is a different task.
However I plan to add more tools (and hope that other would do as well) that use kubesolver to do more complicated tasks.
It's already possible to write a simple script that in one go generates algs in kubesolver and ranks them with algexplorer and I want to encourage this kind of usecases rather than adding more functionality to kubesolver.

filtering out F2 can be done from a command line with a simple `grep -v F2`


Spoiler: example





```
$ ./kube_solver.out --silent -da 0 < in.txt
r2 D' r D F' R F2 R' F' D' r
r2 R U' F' U r2 R' U F U F'
U2 F' U' r' F U' r F r' U r
U' r' U' r F' r' U2 r' F' r2 F
U R' U' F' U r' D R D' r F
U2 F R' U' R2 U' R2 U2 R U' F'
R U' F' r2 U' F U r2 F U' R'
r' F2 r F2 R' F2 r U R U' r'
r2 D' r U r' D r2 U' r' U' r
U2 F' r' D R' D' r2 U' r' F2 R
U2 F2 R2 F U' r' F r F' R2 F2
$ ./kube_solver.out --silent -da 0 < in.txt | grep -v F2
r2 R U' F' U r2 R' U F U F'
U2 F' U' r' F U' r F r' U r
U' r' U' r F' r' U2 r' F' r2 F
U R' U' F' U r' D R D' r F
U2 F R' U' R2 U' R2 U2 R U' F'
R U' F' r2 U' F U r2 F U' R'
r2 D' r U r' D r2 U' r' U' r
```





What I mean is for example I won't add a specialized cross solver to kubesolver, but I might add a tool to generate crosses that uses kubesolver in the backend.



Spoiler: 
how to use kubesolver from a python program to generate optimal crosses for all orientations



a python prorgam

```
import scramble_util
from solver import Solver
import sys
cross_orientations = [
    "", # white on top
    "x", # green on top
    "x2", # yellow on top
    "x'", # blue on top
    "z", # orange on top
    "z'", # red on top
]

scramble_moves = " ".join(sys.argv[1:])
for orientation in cross_orientations:
    with Solver("kube_solver.exe", ["--silent"]) as solver:
        solver.write_line("set da 0") # find only optimal crosses
        solver.write_line("init_empty_cube")
        solver.write_line("add_edge DF")
        solver.write_line("add_edge DB")
        solver.write_line("add_edge DR")
        solver.write_line("add_edge DL")
        solver.write_line(scramble_util.reverse_move(orientation))
        solver.write_line(scramble_moves)
        solver.write_line(orientation)
        solver.write_line("solve")
        solver.end_of_input()
        print("optimal crosses for orientation " + orientation)
        for line in solver.read_all_lines():
            print(orientation + " " + line.strip())
```
an output:

```
python cross_finder.py "D' U2 L2 D L2 B2 U B2 F2 D' B L2 B2 D2 L' D F' D2 U2 R'"
optimal crosses for orientation
L2 D2 F D L R
B' L2 B D' L R
D' R D F L2 D'
D' R D L2 F D'
L2 D' R D F D'
optimal crosses for orientation x
x B F2 D B F D
x F' D U' L2 B F'
x U' R2 F' D L2 F'
x U' F' R2 D L2 F'
x B2 F' D' B' F' D2
x F U' L2 R2 B' F'
x F' L2 B2 D B' F'
x B2 U' R2 F' D F2
x B2 U' F' R2 D F
optimal crosses for orientation x2
x2 B' U L R2 F
x2 B' L U R2 F
optimal crosses for orientation x'
x' F2 D L D2 B'
x' D' U L2 B' R'
x' D' U B' L2 R'
x' D' B' U L2 R'
x' D' B' R' U L2
optimal crosses for orientation z
z F' D L F' D2 L'
z D F' L F' D2 L'
z D L F' L D2 L2
z D' F' L F' D2 F2
z F' D' L F' D2 F
z L D F' L D2 L'
z L' D B R2 F R'
z D' L F' L D2 F
z L D' F' L D2 F
z F D' R' B2 L' B
optimal crosses for orientation z'
z' R2 F D' B F2 D2
z' L2 R D B R F'
z' L2 R D B F' R
z' L2 R2 F D B F2
z' D2 B' D B2 F' D2
z' L2 D B U R2 F'
z' L2 D B U F' R2
z' L2 D B F' U R2
z' D' B U' L2 D2 B
z' D' B U' F' L2 D2
z' D' B U F' D2 R2
z' R D' B F' D2 R'
z' L2 D2 B' D' B2 F'
z' D2 L2 B' D' B2 F'
z' D' B F' U' L2 D2
z' D' B F' D' B2 D'
z' D' B F' D2 U R2
```


----------



## Jam88 (Jun 10, 2020)

ok


----------



## kubesolver (Jun 11, 2020)

I have added example .bat file that shows how you can combine kube_solver with alg.explorer in one script.

here is the script:


http://kubesolver.com/alg_explore.bat



and here it is in action


https://i.gyazo.com/92bc78844520f5f3a3ec55123d7fc576.mp4


----------



## N's-cvt (Jun 11, 2020)

Nice video, I will probably need it for later when I get python on my computer.
Can you also make a video on how to use the grep command for move limits?


----------



## kubesolver (Jun 11, 2020)

Here is "Unix utilities lesson 101" 

In general there is a bunch of unix-tool command line utilities that are super helpful to work with text files. Many of them have very simple functionality:
cat - a utility to print file contents
wc - a simple utility to count lines or words in text file
grep - positive and negative search for patterns
sed - find and replace
awk - more complex can do what sed and grep can do but requires some programming






grep for Windows


grep {whatisit}



gnuwin32.sourceforge.net





most of these tools you can also download for windows either as standalone .exe files or in bundles (e.g. git for windows contain ports of most simple text-processing unix utils.

In particular grep's most typical usecase is to show only the lines containing particular sequence. To the point that in IT the verb to "grep" something means to find all occurences of particular pattern even with other tool than grep similarly like "to google" does not necessary mean to use google search engine to find it.

anyway - here is an example:


```
> kube_solver.exe -da 4 < in.txt > out.txt 
-- now we have some sequences generated to out.txt file

> wc -l out.txt
303 out.txt
-- wc told us that there 303 lines in the file.

-- now let's grep for sledgehammer
> grep "R' F R F'" out.txt
U' R' F R F' R' U' F' U F R
F2 U' F U' F' U2 F2 U' R' F R F'
F' U2 F R' F R F' U F R' F' R
U' R' F R F' R' U' F' U F R U2
F2 U' F U' F' U2 F2 U' R' F R F' U2
F' U2 F R' F R F' U F R' F' R U2
U' R' F R F' U F' U' L' U L F U'
U' R' F R F' U F' U' L' U L F U

--cool things about command-line utils is that we can combine them:
> grep "R' F R F'" out.txt | wc -l
8
-- there are 8 lines in the result above

> grep "R' F R F'" out.txt | wc
      8      99     264
8 lines, 99 words, 264 characters

>  grep -v "R' F R F'" out.txt | wc -l
295
-- grep has some options you can google and one of them is the negative pattern search with flag -v. So not surprisingly when we select sledgehammer as a negative pattern it will find 303 - 8 = 295 lines.

--and here a more complex example combining many tools in a pipeline. Notice that the output from kubesolver is not redirected to a file, but instead it's being fed directly to grep, and grep output is forwarded to sed which replaces sledge with a word SLEDGE
>./kubesolver.out < in.txt | grep "R' F R" | sed -e "s/R' F R F'/SLEDGE/g" 
U' SLEDGE R' U' F' U F R                                                                                
F2 U' F U' F' U2 F2 U' SLEDGE                                                                           
F' U2 F SLEDGE U F R' F' R                                                                              
U' SLEDGE R' U' F' U F R U2                                                                             
U' R' F R F2 L' U L F R U' R'                                                                           
F' L F R' F R F2 L' F U R U2 R'                                                                         
F' R U2 F U F' U2 R' U' R' F R U'                                                                       
F' R U2 F U F' U2 R' U' R' F R U                                                                        
F' U F R' F R F2 L F' L' F U F                                                                          
F2 U' F U' F' U2 F2 U' SLEDGE U2                                                                        
F' U2 F SLEDGE U F R' F' R U2                                                                           
U' SLEDGE U F' U' L' U L F U'                                                                           
U' SLEDGE U F' U' L' U L F U                                                                            
R' F R F2 L F' L' F L' U L F U'                                                                         
R' F R F2 L F' L' F L' U L F U                                                                          
U' R' F R F2 L' U L U2 L' U' L F                                                                        
U' R' F R F2 L' U L F R U' R' U2                                                                        
R' F R F2 R U' L' U R' U L F U'                                                                         
R' F R F2 R U' L' U R' U L F U
```


----------



## canibanoglu (Jun 13, 2020)

Do you have the source somewhere public?


----------



## brododragon (Jun 13, 2020)

canibanoglu said:


> Do you have the source somewhere public?


Yes, it's named kubesolver on GitHub.


----------



## kubesolver (Jun 15, 2020)

I have added a link to github repo in the first post.

I would like to share another example of how a command-line interface gives some extra flexibility that a GUI solver with fixed-features cannot.

In the github project I have added tools that show how to use engine to do some custom things.
For now there are python scripts to find a cross on an arbitrary scramble.

Another tool is called "generate_training_scrambles.py" and is a tool I use myself during training sessions as it gives a little extra over cs-timer training features. CStimer has plenty of nice features like last-slot, OLL only with a set of particular OLL, but what I wanted was a little different.

I wanted to train few particular OLLS, but I wanted the scramble to start with some simple insert so that I can train transition from F2L -> OLL, and additionally I wanted to force a PLL skip.

The way I can do it with kubesolver is to write a simple program to generate solutions I want to execute (generating random simple LS insert, then random AUF, then random OLL from the ones I want to pratcice) and generate a scramble for that.

for example let's say I want a R U R' or R U' R insert into sune/antisune into PLL skip or JPerm. I would write a program like that:



Spoiler: python code





```
from util.solver import Solver
from util.scramble_util import fix_sequence
import random

pll = [
    "(R U R' F') (R U R' U') R' F R2 U' R'", # I can remove this like if I want to force a skip
    "",
    ]
oll = [
    "R U R' U R U2 R'",
    "R' U' R U' R' U2 R",
    ]
last_slot = [
    "R U R'",
    "R U' R'",
]

auf = [" ", " U ", " U2 ",  " U' "]

setup_groups = [
    auf,
    last_slot,
    auf,
    oll,
    auf,
    pll,
    auf
]

while True:
    setup = " ".join([fix_sequence(random.choice(g)) for g in setup_groups])
    with Solver("kube_solver.exe") as s:
        s.write_line("set n 1")
        s.write_line("set_gen RUFB")
        s.write_line(setup)
        s.write_line("solve")
        s.end_of_input()
        with open("OLL_drill_exercise.txt", "a") as myfile:
            for line in s.read_all_lines():
                line = line.strip()
                if line and not line.startswith("INFO"):
                        myfile.write(line)
                        myfile.write(" ")
                        print(line)
            myfile.write("\n")
        print()
```




The program will generate sequences into a file OLL_drill_exercise.txt and after I have enough of them I can input them as my input to cstimer session for practice.



Spoiler: sequences of auf + simple insert + auf + sune / antisune + jperm or skip



B' F R' F' R B U' R2 B' R' B2 U' B' R'
R U2 R2 U' R F' R' F U F' R F
R U2 R' U' R U2 R' U
U B' U2 B U B' U B R U R'
U2 B' U2 B U B' U B R U' R' U
U2 F R U R' F R' F' R U' R' F' R
U R F2 U' R U' F2 U F2 R' U F2 U' R'
U2 R U' F' U' F U' F' U2 F R'
F' U2 F U F' U F R U R' U2
U' B' U2 B U B' U B R U R'
U' R U2 R2 U' F U F' R F U' F'
U' B U2 B' U' B U' B' R U' R' U2
U2 R U R2 U' R U' R' U2 R
F' U' F2 R B' R B R2 F2 U F U
U2 R' U' R U2 B U' F' U2 B' R' U2 R U F
F U2 F' U' F U' F' R U' R' U
B' R2 U R2 U' R2 U' R2 B R' U' R2 U R
R U2 R' B R2 U2 R' U' R U' R' U' R' B'
U' B U2 B' U' B U' B' R U' R' U2
B' U2 B U B' U B U' R U R' U
R B U' B' U' F R2 U' R2 U R2 U F' R'
F' U' F2 R B' R B R2 F2 U F U
R' B' R U' R' B R2 U' B' U2 B U' R'
U B F U2 F' U' F U2 B' U F' R U2 R' U2
U2 R' U2 R U R' U R2 U' R' U2
F' U B U' F U B' R U R'
F U R U' R F' U2 F' U' F2 R' F2 U' F R2
R U' F' U' F U' F' U2 F R' U2
R U B F' U2 B R2 B2 F R U2 B' F2 U2 B F2
R2 B2 R' B U R F' U F2 R F2 U' F R' B R'
R2 U B' F' U' B U F U' R' U' B' U2 B R'
U2 R U2 R' U' R U2 R'
U2 B U2 B' U' B U' B' R U R' U
U2 R F2 U' R U' F2 U F2 R' U F2 U' R'
F' U2 F U F' U F U R U R' U2
F U' B' U F' R U' R' U' B R U' R' U
F R' F' R B U' B2 F' U F U' B2 U B'
U' R U2 B R' F' R B' R' F U' R U R'
B' U2 B U B' U B U2 R U R' U
U R' U2 R U R' U R2 U R' U


----------



## N's-cvt (Jun 17, 2020)

Do you know a the way to make the generator do QTM=Quarter Turn Metric?


----------



## kubesolver (Jun 17, 2020)

there is no way at the moment - how important is this?

it's relatively easy to sort the output sequences by qtm so I'm not sure if I want to implement it.


----------



## N's-cvt (Jun 17, 2020)

Personally it is really important, I'm not sure about the rest of the users but I'm positive they would use it, I think it would be a fun and a nice feature to implement, just a simple add_qtm would be cool.


----------



## kubesolver (Jun 17, 2020)

Ok, I will add it. It's not a super-trivial change however. There are some shortcuts in my code that assume htm. In particular the way I forbid sequences of cancelling moves like R R2, R L R etc.
I will have to rethink the design of this part of a program.


----------



## N's-cvt (Jun 24, 2020)

So after learning some more grep I have learned how to exclude moves like F2, but how would I code it to say I want the algs with only 1 F and 1 F'? I could use perl or python and utilize regular expressions but I wanted to see if there was a simpler more intuitive way to do it?


----------



## kubesolver (Jun 24, 2020)

grep uses regular expressions. so you can do it still with grep.





grep ^[^F]*F[^\'2][^F]*F\'[^F]*$ out.txt

This expression means:

^ - the beginning of the line 
[^F]* - arbitrary number of characters which are not F
F[^\'2] - F followed by a character that is not an apostrophe nor a 2
[^F]* - arbitrary number of characters which are not F
F\' - F'
[^F]* - arbitrary number of characters which are not F
$ - the end of line


----------



## Alexander (Jul 3, 2020)

Thank you for that wonderfull program.

I ran in to some things



Spoiler: in.txt



init_full_cube
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve_two_phase


the in.txt with or with out the: init_full_cube"

i get 


Spoiler: out.txt



INFO: KubeSolver 1.0.5 (C) Jakub Straszewski 2020
INFO: Setting max number of output sequences to 1000000.

L F2 D2 L2 R' B2 U' F2 L B' 
U' R2 D' B2 D R2 D' L2 F2 U2 B2 U' F2 D


the out.txt i get a break in the solution as you can see at B'and U' (2 lines)

when i try an only corners


Spoiler: in.txt



init_empty_cube
add_corners_orientation
add_corners_permutation
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve



the output error i get:


Spoiler: out.txt



INFO: KubeSolver 1.0.5 (C) Jakub Straszewski 2020
INFO: Setting max number of output sequences to 1.

ERROR: can't add more than 6 corners permutation due to implementation detail



when i change the in.txt like this:


Spoiler: in.txt



init_empty_cube
add_corner DBL
add_corner DBR
add_corner DFR
add_corner DFL
add_corner UBL
add_corner UBR
add_corner UFR
add_corner UFL
F2 L2 F' D2 L2 F' R2 B2 D2 L2 U2 L' D L B2 R' D' U' R F2
solve



i get a correct output with no errors:


Spoiler: out.txt



INFO: KubeSolver 1.0.5 (C) Jakub Straszewski 2020
INFO: Setting max number of output sequences to 1.

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...
F' L' D B2 R D' L D2 R'


----------



## kubesolver (Jul 3, 2020)

Thanks for trying out my program. Much appreciated.



AlexanderO said:


> the out.txt i get a break in the solution as you can see at B'and U' (2 lines)


Yes, I will remove the break in the next version. However making an efficient two phase solver is not on my todo. https://github.com/cs0x7f/min2phase is much better for that. I might eventually add min2phase solver as a dependency to kubesolver.


AlexanderO said:


> ERROR: can't add more than 6 corners permutation due to implementation detail


The proper way to add all corners is add_corners.

add_corners_orientation and add_corners_permutation should never be used together (I might add an error message indicating that). You should first specify corners that you want to solve exactly (e.g. 4 bottom layer corners) and add_corners_xxx indicates that all other corners must be either permuted or all must be oriented.

add_corners_orientation should be used e.g. for solving OLL. and add_corners_permutation for solving CP stage of beginner petrus.


----------



## Username: Username: (Jul 5, 2020)

After you completed the downloading and setup and blah blah blah things like that, it's really easy to make algs with it, I'm currently genning algorithms for WCLL and some other set, overall, a great program


----------



## Alexander (Jul 5, 2020)

trying to made a UI for kubesolver. not perfect yet but when it is i will share it. compile it for windows i can not complie it for mac yet i have to figger that how to do that.


----------



## kubesolver (Jul 5, 2020)

Based on the picture of a GUI I have two comments:
1) it's missing the -da setting which is (how many more moves than optimal should be searched -da 0 stops search at the depth of the first found sequence)
2) the command init_to_current_state cannot be used in such a simple manner, the idea is that you have to setup some moves first, call init_to_current_state and then setup some moves again.
It can be used e.g. to do e.g. "last slot + force Pi ZBLL alg"

and you would do it by:
init and add f2l, and last layer orientation.
< moves to setup the pi case OLL.>
init_to_current_state
<reverse moves to setup the pi case OLL>
<scramble>
solve


----------



## N's-cvt (Jul 5, 2020)

Could you also include the --silent and -n commands especially the -n I use that one quite often when I don't know how many moves the algs will be


----------



## Alexander (Jul 6, 2020)

1. I will add the "da" setting
2. i shall see what i can do with that option 


kubesolver said:


> Based on the picture of a GUI I have two comments:
> 1) it's missing the -da setting which is (how many more moves than optimal should be searched -da 0 stops search at the depth of the first found sequence)
> 2) the command init_to_current_state cannot be used in such a simple manner, the idea is that you have to setup some moves first, call init_to_current_state and then setup some moves again.
> It can be used e.g. to do e.g. "last slot + force Pi ZBLL alg"
> ...



The -n setting is aleady in there the --silent setting never used it. i just find out what is does  will be added 


N's-cvt said:


> Could you also include the --silent and -n commands especially the -n I use that one quite often when I don't know how many moves the algs will be


----------



## kubesolver (Jul 6, 2020)

@AlexanderO I will probably also add some GUI to my program at some point but it will probably be a simple wrapper over the command line program execution.





I might also add some tools like the two python tools that are in the repo already (cross finder, training scramble generator etc.) But I will try to not duplicate your features if you intend on developing your GUI more.


----------



## Alexander (Jul 6, 2020)

kubesolver said:


> I might also add some tools like the two python tools that are in the repo already (cross finder, training scramble generator etc.) But I will try to not duplicate your features if you intend on developing your GUI more.



If many are going to use it i will be developing it more i guess every thing is possible.

i have send you a copy of the file to check it out it looks like this now


----------



## kubesolver (Jul 6, 2020)

I think the more you develop it the more chance people will be using it


----------



## Devagio (Aug 15, 2020)

Hey, I've been willing to try this.
I cloned the repository in my alg_gen folder (windows 10), however I'm having some trouble running the makefile, that I've put in the spoiler.



Spoiler: Error



C:\Users\Yash M Mehta\Desktop\alg_gen\kubesolver>mingw32-make
mkdir -p obj_win
cube3.c
cube3r.c
cube_initialization.c
In file included from src/c/solver_cube_compression.c:7:
src/c/solver_cube_compression.h:8:5: error: unknown type name '__uint128_t'
8 | __uint128_t packed;
| ^~~~~~~~~~~
src/c/solver_cube_compression.h:19:44: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
19 | void unpack_ce(cube *c, int8_t *last_move, __uint128_t compressed);
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.h:20:1: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
20 | __uint128_t pack_ce (cube *c, int8_t last_move);
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.h:22:25: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
22 | int8_t unpack_last_move(__uint128_t compressed);
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:39:25: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
39 | int8_t unpack_last_move(__uint128_t compressed) {
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:43:44: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
43 | void unpack_ce(cube *c, int8_t *last_move, __uint128_t compressed) {
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:75:1: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
75 | __uint128_t pack_ce (cube *c, int8_t last_move) {
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c: In function 'pack_ce':
src/c/solver_cube_compression.c:79:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
79 | __uint128_t retVal = last_move;
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:84:21: error: '__uint128_t' undeclared (first use in this function); did you mean '__uintptr_t'?
84 | retVal |= ((__uint128_t)(corners_)) << shift; shift += 3;
| ^~~~~~~~~~~
|  __uintptr_t
src/c/solver_cube_compression.c:84:21: note: each undeclared identifier is reported only once for each function it appears in
src/c/solver_cube_compression.c: In function 'check_packing':
src/c/solver_cube_compression.c:102:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
102 | __uint128_t packed = pack_ce(&c, last_move);
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:103:5: warning: implicit declaration of function 'unpack_ce'; did you mean 'pack_ce'? [-Wimplicit-function-declaration]
103 | unpack_ce(&other_c, &unpacked_last_move, packed);
| ^~~~~~~~~
| pack_ce
src/c/solver_cube_compression.c: In function 'compare_packed_cubes_only_cube_state':
src/c/solver_cube_compression.c:123:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
123 | __uint128_t p1 = ((solver_cube_packed *)s1)->packed >> 8;
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:124:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
124 | __uint128_t p2 = ((solver_cube_packed *)s2)->packed >> 8;
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c: In function 'compare_packed_cubes_full':
src/c/solver_cube_compression.c:136:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
136 | __uint128_t p1 = ((solver_cube_packed *)s1)->packed;
| ^~~~~~~~~~~
| __uintptr_t
src/c/solver_cube_compression.c:137:5: error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?
137 | __uint128_t p2 = ((solver_cube_packed *)s2)->packed;
| ^~~~~~~~~~~
| __uintptr_t
makefile:121: recipe for target 'obj_win/solver_cube_compression_d.o' failed
mingw32-make: *** [obj_win/solver_cube_compression_d.o] Error 1
_


_

How should I fix this?_


----------



## kubesolver (Aug 16, 2020)

Devagio said:


> error: unknown type name '__uint128_t'; did you mean '__uintptr_t'?


If you're not / don't want to get familiar with the art of building and compiling you can just download the executables from kubesolver.com.

If you do want to then the issue you have is caused by the fact that your gcc doesn't have __uint128_t type.. I've succesfully compiled the project with several MinGW-W64 gcc. What is your compiler?


----------



## Devagio (Aug 16, 2020)

kubesolver said:


> If you're not / don't want to get familiar with the art of building and compiling you can just download the executables from kubesolver.com.
> 
> If you do want to then the issue you have is caused by the fact that your gcc doesn't have __uint128_t type.. I've succesfully compiled the project with several MinGW-W64 gcc. What is your compiler?


I use mingw-32 afaik.
I’ll install mingw-w64 and try again, then let you know.


----------



## brododragon (Dec 8, 2020)

How is this going?


----------

