# HARCS (JARCS Replacement) - Cube Solver



## mDiPalma (Dec 15, 2016)

JARCS ("Just Another Rubik's Cube Solver") was one of the greatest utilities available to the community, and I doubt anyone who used it would disagree. For those that don't know, it was an online program that would solve the first couple steps of the major (and minor) speedsolving methods optimally and output the solutions. Unfortunately, it has been offline for quite some time. There are several online tools with a fraction of the functionality, and Cube Explorer is extremely helpful, but it takes a while to set up the case you want to solve.

To partially fill the void left behind by JARCS, I made a user-side replacement called *HARCS ("Here's A Replacement Cube Solver")* with most of the features. It's a lightweight little console program with a low memory profile that can optimally solve most of the steps of the major speedsolving methods. I plan to add a lot of functionality to it in the future, based on user feedback.

*It can now fully solve the cube with Petrus, Roux, ZZ, or ANY USER DEFINED METHOD.*

*Versions 8+ are much faster than the previous. 10/10 highly recommend.*

You can download it here [HARCS v0.9e] (includes cpp source files for those that want to take a look or compile it themselves). The controls are described below, and are also displayed by typing "*help*" in the program.

The C++ source is also available on GitHub.

Basic operation and controls (of an old version):







Spoiler: Update History





```
v0.9e (Jan-14-2019)
 -fixed more algsearch bugs (CP and EP)
 -added quarter moves to custom movegroups - put a 1 or 3 after the desired move

v0.9d (Dec-06-2018)
-fixed algsearch EO bugs (centers still must be fixed)
-added half-moves to custom movegroups - put a 2 after the desired move

v0.9c (Sep-27-2017)
-"hacks *" command to branch to depth * for efficient solutions
-"algsearch *" command to generate * algs for each case between steps
-added setting to select browser visualization (ACN or my XMDI)
-permit "load custom" instead of "load custom.txt"
-custom solved states for "analyze" and "hacks"
-fixed several bugs
-added public domain license

v0.9b (Jun-12-2017)
-define cool settings in "settings.txt"
-fixed bug with move cancellations
-added another help page
-"random" command sets a random cubestate
-time breakdown for load/analyze
-"load *" command replaces "custom", give it a .txt file
-switched to uint64_t for some additional portability
-simplified and pushed error notes to the end of analysis
-fixed a bug with set states and analysis
-increased sb prune depth in roux
-"export" command to save raw analysis solutions
-improved performance of 2gen testing
-"histogram *" command to plot movecount histogram of analysis step

v0.9a (May-30-2017)
-brought back 32-bit support for the many nice people

v0.9 (May-28-2017)
-upgraded method analysis: "analyze *"
-adjusted table depths in compiled methods
-removed 3000 lines of old code
-command line arguments (exe followed by usual commands, on one line)
-colored output
-switched to 64-bit
-fixed issues with ZBLL alg list
-fixed many bugs

v0.8a (May-22-2017)
-"analyze *" to calculate stepwise method statistics

v0.8 (Apr-14-2017)
-massive code overhaul for significant performance improvement
-custom solved states for user-defined methods (see readme)
-added direct hexadecimal cubestate prescription
-added democratically-elected icon
-many bugs likely introduced

v0.7b (???-??-2017)
-top secret version only for elite cubers

v0.7a (Jan-25-2017)
-fixed everything I didn't notice I broke in v0.7 (y moves, centers, some depths)
-removed all the " 2' " from the algorithm sets, which don't parse correctly.

v0.7 (Jan-22-2017)
-custom methods support custom movegroups ("movegroup <RUL>")
-support for ALL possible moves (Singmaster Notation) and rotations
-custom methods support solving to AUF ("Udisplacement")
-custom methods support custom algorithm sets ("algset CMLL.txt")
-custom methods support solving CP ("2genreduction")
-fixed bugs in cancellations and cubestate reversions
-include substep names in output for clarity

v0.6 (Jan-17-2017)
-added support for custom user-defined methods (up to 8 steps)
-see the custom_methods_readme.txt for details

v0.5 (Jan-04-2017)
-fixed bug in cancellations
-wide U moves added (u/u2/u')
-removed move penalty for rotations
-added Simon Swanson's full ZBLL alg-set for ZZ/Petrus
-"all" command to fully solve the cube in a single orientation (for zz, this does lb->rb)
-you can now apply sequences in this order:
    Petrus:    2x2x2->3x2x2->eo->f2l->zbll
                      3x2x2->eo->f2l->zbll
    CFOP:   cross->xcross (first pair at FR)
                   xcross
    Roux:    fs->fb->sb->cmll->lse
                 fb->sb->cmll->lse
    ZZ:    eoline->   lb  ->rb->zbll
           eoline->   rb  ->lb->zbll
                   eo3x2x2->rb->zbll

v0.4 (Dec-23-2016)
-fixed bug with movecounts printing in base16 (LOL)
-"view" command to display solution on alg.cubing.net
-ability to apply moves between blocks (your own algs, etc.)
-additional hex value to describe centers
-wide L moves added (l/l2/l')
-added optimal Roux CMLL and LSE. You can edit the algs in CMLL.txt.
    Roux:    fs->fb->sb->cmll->lse
                 fb->sb->cmll->lse

v0.3 (Dec-21-2016)
  -added video
  -fixed bug with [RUFB] movegroup
  -all optimal solutions now generable (at small RAM expense)
  -trivial congruent solutions removed (we match cubeexplorer)
  -you can now apply sequences in this order:
    Petrus:    2x2x2->3x2x2->eo->f2l
                      3x2x2->eo->f2l
    CFOP:   cross->xcross (first pair at FR)
                   xcross
    Roux:    fs->fb->sb
                 fb->sb
    ZZ:    eoline->   lb  ->rb
           eoline->   rb  ->lb
                   eo3x2x2->rb

v0.2 (Dec-16-2016)
  -fixed bug with z' rotations
  -made roux fb [U,D,R,L,F,B,M,r] optimal & ignore centers
  -adjusted prune depth for steps, based on upper bounds, faster
  -way to apply solutions (typing number next to it) and continue
  -keeps track of applied move sequences (print command)
  -save applied sequences to text file (don't need to copy manually)
  -added second steps, see below
  -you can now apply sequences in this order:
   Petrus:   2x2x2->3x2x2->eo->f2l
                    3x2x2->eo->f2l
   CFOP:  cross->xcross (first pair at FR)
                 xcross
   Roux:   fs->fb->sb
               fb->sb

   ZZ:   eoline->  lb  ->rb
                eo3x2x2->rb

v0.1 (Dec-14-2016)
-basic color neutral first steps including:
  -cfop: cross, xcross
  -petrus: 2x2x2, 3x2x2
  -roux: fb+centers
  -zz: eoline, eo3x2x2
```



Spoiler: optimality



-At least the first solution to each step is guaranteed to be optimal in its restricted moveset
-this may not hold true for "Udisplacement" custom methods with steps that solve to an AUF-state.








Spoiler: Substeps and Movesets



*CFOP: *cross, xcross = [UDRLFB]
*ZZ:* eoline, eo3x2x2 = [UDRLFB]
lb = [UDLR]
rb = [UDLR]
zbll = [Simon Swanson's algs]
*Petrus: *2x2x2, 3x2x2 = [UDRLFB]
eo = [URFB]
f2l = [UDR]
zbll = [Simon Swanson's algs]
*Roux: *fs, fb = [UDRLFBMr]
sb = [URMr]
cmll = [algdb algs]
lse = [MU]





Spoiler: Interface



I have no formal coding education, so making this program work in the first place was hard enough. I have no idea how to make a good user interface. The interface is currently just typing things into the console window. The controls are pretty straightforward, and you can type "*help*" to get the basics.

There are absolutely no graphics, nice buttons to click, or dropdown menus. I might add these if there is significant user desire, but I honestly don't think they're necessary. Once you know the controls, this program is super easy to use.

Instead, you can type "*view*" to see your current solution on alg.cubing.net in the default browser.

Pro-tip: to paste into the console window (for scrambles etc) on Windows, you can press {ALT + SPACE} {E} {P}.





Spoiler: Commands










See the "*help*" in the program, or watch the video above. The commands should be straightforward.


A couple of things:

If you want to check multiple scrambles. type "*revert*" after each one to reset the cube to the solved state after each one.

You don't need to set the *style *and *number *every time. Reverting doesn't affect these. The default number of solutions is 3 and the default orientation is UF.

You only need to generate method tables (typing the method name) at the beginning of the session, or when you want to check a different method.

All optimal solutions are generable in the constrained moveset and maximum search depth.

Not all substeps for all scrambles (eo3x2x2 especially) can be solved in the depth that this program looks. I have selected depths that are reasonable upper bounds for solutions that users should want to consider. Although the program can look deeper, I have set these bounds in the interest of minimizing computation time.





Spoiler: Solving Orientation



HARCS supports all solving orientations. Type "*style * * * * #*" with as many solving orientations as you want to consider (ie. "*style UF DB #*" for x2 neutrality on zz)

You can also type "*style DCN #*" or "*style CN #*" to put dual color neutrality or full color neutrality, to save time.

In cfop, crosses are solved on D in the set orientation and xcrosses are solved at DFR.

In petrus, the 2x2x2 block is solved at DLB in the set orientation, and the 3x2x2 is solved at DL. eo and f2l are solved in this orientation.

In roux, the fs is solved at DLB, the fb is solved at DL, and the sb is solved at DR.

In zz, the eoline is solved at DF/DB in the set orientation, and the eo3x2x2 is at DL. lb and rb are solved in this orientation

If you are going to do full CN for CFOP/Petrus/ZZ, note that there will be extreme redundancy in your search. For instance in CFOP: UB, UR, UF, and UL all will solve the yellow cross, but from different orientations (the xcross will be different, however). To be efficient, I highly recommend using a custom "style" with only the orientations you want to consider.

If you just want 3 crosses for each color, type "*number 3 style UF DF LF RF FU BU #*".
If you want 1 xcross for each pair on white, type "*number 1 style DF DR DB DL #*".





Spoiler: Pruning Tables



From what I can tell, JARCS was a server-side program with likely ~250 MB of data stored in RAM on Johannes' laptop plus ~3 GB of files (which I assume are the pruning tables) because he was storing partial solutions for a host of steps for a host of different methods. Users would make remote requests for his server to solve desired steps for given scrambles.

HARCS, on the other hand, is an executable that runs locally on the user's PC. You must generate and load the tables locally. For example, before you look for optimal solutions for first Roux blocks, you must type "*roux*" to generate and load the corresponding tables into RAM. This helps minimize the memory profile by only loading the tables you need.





Spoiler: Speed and Efficiency



It feels comparable in speed to what JARCS used to be, even though the tables probably aren't as deep and the physical size and memory profile are smaller. I'd like to attribute this to the fact that the cubestate is represented as 4 hex numbers with moves simply being bitwise operations and manipulations of these numbers. But quite frankly I have no idea what I'm doing.

The file size is something like 4 MB which is pretty small (as opposed to JARCS' 3 GB). I zipped it anyway. Half of it is the guts of an old program (that you jerks banned me for).

RAM-wise, it usually only takes like 100-800 MB, depending on the method. It stores effects of sequences to a varying depth for each substep on a single block (this is rotated for all other blocks), based off the upper bound of the step. Not all solutions can be found for longer blocks. If we prune to deeper depths, the performance drastically improves and the RAM cost goes up too. I picked what I felt to be the sweet-spot. It won't take more than a few seconds to save pruning tables or find solutions.

I have a couple of ideas in mind to improve the performance, but I'll put those off for later. I could also axe the eo3x2x2, but I like it.





Spoiler: Custom (User-Defined) Methods



HARCS can find stepwise optimal solutions to custom user-defined methods. The sole requirement of these methods is that their steps consist exclusively of orienting and positioning pieces in the conventional sense.

This includes the ability to import custom algorithms, solve to an AUF, and reduce CP to 2-gen states.

To find out exactly how this works, check the custom_methods_readme packed with all versions after 0.6.



If you are confused on how to use the program for a particular case (solving orange xcross, solving dual color neutral petrus blocks, generating full roux solutions), please ask below.

If you notice anything weird, or if something doesn't seem to work, post a picture and let me know. I would like any feedback that you guys have - good or bad. If you really think it needs a GUI, voice your opinion below.


*TL;DR
console program to solve substeps to human methods with ugly UI*


----------



## bobthegiraffemonkey (Dec 15, 2016)

Don't have time to mess with it right now, but this might come in useful if I ever get around to practicing blocks for FMC again, so thanks!

A few times with JARCS I tried to optimally solve each 2x2x2 block within some time limit, with a score of how many extra moves I used (lower is better of course). Was fun, but I was terrible at it. I'll need to see how easy that is to do with this program (not too difficult I guess by quickly looking at the commands).


----------



## AlphaSheep (Dec 15, 2016)

I miss JARCS 

But seriously, this looks good. I'll try it out a little more over the holidays and see if it does everything I used to use JARCS for. I've had a replacement for JARCS on my to do list for 6 months now and have around half the solver written, but finding time to work on it is the really hard part.


----------



## muchacho (Dec 15, 2016)

Great, thanks! it works on Linux also.

So it doesn't use M or wide moves? would it be possible to add them?

FB first square and SB first square?


----------



## pinser (Dec 15, 2016)

ILTRCS (i love this rubik's cube solver )

Just a note, if there's no space between the last move of the scramble and the # it doesn't work

Also, you might want to add a scramble feature


----------



## mDiPalma (Dec 15, 2016)

muchacho said:


> Great, thanks! it works on Linux also.


Really? Some others were telling me it wouldn't work without an emulator. There are no windows libraries included, but it is an exe. 



> So it doesn't use M or wide moves? would it be possible to add them?
> 
> FB first square and SB first square?



Actually it's already programmed for slice moves (an x rotation is defined as L' M' R lol), but the effects on the centers are not taken into account. Should I make the Roux solver look for slice/wide moves?

I can add fbs



pinser said:


> Just a note, if there's no space between the last move of the scramble and the # it doesn't work



Yeah commands and moves need to be space separated. that's another disadvantage of the ui. but one advantage is, if you knew what you wanted ahead of time, you could do all your commands on a single line.


----------



## muchacho (Dec 15, 2016)

Many windows programs work just fine using https://en.wikipedia.org/wiki/Wine_(software)

I guess it would find more efficient solutions if using slice and wide moves (and being more efficient is what I would use this tool for), and they are used in real solves (at least the M slice, S or E shouldn't be too useful).


----------



## Artic (Dec 15, 2016)

thank you for working on this! I will try this out extensively and hope to give feedback. But thanks again for providing the community with a replacement!


----------



## Sk0bel (Dec 23, 2016)

I tried to PM you, but I couldn't somehow
Here is the message 

Dear mDiPalma, 

I want to say thank you very much for your program !
I've discovered HARCS recently and it's like a christmas gift you made to us. 
Currently, I'm learning ZZ, and thanks to your program, I'll surely improve my EOline + Right Block !

So, I really want to contribute to the time and investment you put into this work. 
Would you please accept any donation from my part ?

Gratefully, 
Sk0bel from Belgium


----------



## mDiPalma (Dec 23, 2016)

I really appreciate your kind words, but I personally can't accept anything.

If you truly feel the desire to give something, consider a donation to the Salvation Army and have a happy Christmas!

Thanks again!


----------



## mDiPalma (Jan 4, 2017)

I've made my final non-bug-related update to the program.

You can now fully solve the cube with the Petrus, Roux, and ZZ methods (using the "*all*" command). The download includes text files with full sets of CMLL and ZBLL algs (feel free to change these with your own). You can apply your own algorithms in the same way you would apply a scramble: "*apply R U R' U R U2 R' #*". The program is guaranteed to find optimal solutions for each substep, but will not make any effort to positively affect later steps. Typical movecounts for Petrus/Roux/ZZ are 38-42 stm.

You can also type "*view*" and it will instantly push the applied sequences to alg.cubing.net in the default browser. It's pretty convenient.

HARCS does everything I ever needed it to do, and more. If you notice any problems, please let me know.


----------



## Artic (Jan 5, 2017)

Your program is amazing. Been using it a lot lately and it's exactly what I needed. The only thing that could make it even better is if it were hosted on a website. That would make usage extremely convenient. Nonetheless, thanks again for this awesome tool!


----------



## CubingGenius (Jan 6, 2017)

I really like the program you created. It is helping me become more efficient.

Two things I wondered:
-When I finish EOline, complete a block on one side and try to make a block on the other side, it ignores the block I just created and will destroy it to make creating the block on the other side a shorter move count
-How can I get it to create a 1x2x2 block after EOline?


----------



## Đỗ Viên (Jan 15, 2017)

Can i use program with others method ???

Gửi từ mobiistar LAI ZORO 2 của tôi bằng cách sử dụng Tapatalk


----------



## mDiPalma (Jan 16, 2017)

CubingGenius said:


> Two things I wondered:
> -When I finish EOline, complete a block on one side and try to make a block on the other side, it ignores the block I just created and will destroy it to make creating the block on the other side a shorter move count



Does this still happen on version 5? I thought I fixed that. Can you send me a picture or the commands?



CubingGenius said:


> -How can I get it to create a 1x2x2 block after EOline?





Đỗ Viên said:


> Can i use program with others method ???



If you want to edit and recompile the source code with your desired masks, it should be fairly obvious.

Otherwise, I will add in the ability to add custom steps with custom masks and movegroups.

Đỗ Viên, can you PM me the current steps for your method? I will test this functionality on your method.


----------



## CubingGenius (Jan 16, 2017)

mDiPalma said:


> Does this still happen on version 5? I thought I fixed that. Can you send me a picture or the commands?



Sorry, I realised I didn't have the latest version. That's why it didn't work.



mDiPalma said:


> If you want to edit and recompile the source code with your desired masks, it should be fairly obvious.
> 
> Otherwise, I will add in the ability to add custom steps with custom masks and movegroups.



Sorry, I am not sure how to do this. I only really have a basic knowledge in coding. Is there somewhere where I can learn how to add other functions?

I really appreciate this program that you have made. It is very useful for lots of people.


----------



## mDiPalma (Jan 18, 2017)

Đỗ Viên said:


> Can i use program with others method ???





Per user request, I've added the functionality to support* Custom User-Defined Methods. *Check the custom_methods_readme.txt packed with versions >=0.6 to see how it works. Basically you define the steps in the custom.txt file and type "custom" in the HARCS console (to prune for the custom method), and HARCS will take over from there.

It's actually pretty neat lol. Here is a picture of it working with the SSC (Shadowslice Snow Columns) method. (yes, it found a 30 ATM solution to the scramble...this program is OP)

By filling out the custom.txt file, you will *also* get a small glimpse into how the program works.

If you guys need some help defining your own methods, let me know. @CubingGenius (for eoline+each square)


----------



## CubingGenius (Jan 18, 2017)

mDiPalma said:


> Per user request, I've added the functionality to support* Custom User-Defined Methods. *Check the custom_methods_readme.txt packed with versions >=0.6 to see how it works. Basically you define the steps in the custom.txt file and type "custom" in the HARCS console (to prune for the custom method), and HARCS will take over from there.
> 
> It's actually pretty neat lol. Here is a picture of it working with the SSC (Shadowslice Snow Columns) method. (yes, it found a 30 ATM solution to the scramble...this program is OP)
> 
> ...



Thank you very much for this.

One question - what does cnmask mean? Colour neutral?


----------



## mDiPalma (Jan 18, 2017)

CubingGenius said:


> Thank you very much for this.
> 
> One question - what does cnmask mean? Colour neutral?



"cnmask" is the mask for the center pieces. For ZZ, just leave that on 0xfff. It's all explained in the "custom_methods_README.txt" file.


----------



## CubingGenius (Jan 18, 2017)

mDiPalma said:


> "cnmask" is the mask for the center pieces. For ZZ, just leave that on 0xfff. It's all explained in the "custom_methods_README.txt" file.



Thanks for that.

I have one quick question - is there a way to get it so I can choose which block to generate? eg. complete EOline and then choose which 2x2x1 block is generated?


----------



## mDiPalma (Jan 18, 2017)

CubingGenius said:


> Thanks for that.
> 
> I have one quick question - is there a way to get it so I can choose which block to generate? eg. complete EOline and then choose which 2x2x1 block is generated?



If you want to solve eoline and then check which of the squares is most efficient, you can use this code for your custom.txt:


Spoiler





```
step eoline
movegroup 1
prunedepth 4
searchdepth 4
epmask 0x00000000f0f0
eomask 0xffffffffffff
cpmask 0x00000000
comask 0x00000000
cnmask 0xfff

step fl
movegroup 5
prunedepth 4
searchdepth 4
epmask 0x0000000ff0ff
eomask 0xffffffffffff
cpmask 0x0000000f
comask 0x0000000f
cnmask 0xfff

step bl
movegroup 5
prunedepth 4
searchdepth 4
epmask 0x0000f000f0ff
eomask 0xffffffffffff
cpmask 0x0000f000
comask 0x0000f000
cnmask 0xfff

step fr
movegroup 5
prunedepth 4
searchdepth 4
epmask 0x000000f0fff0
eomask 0xffffffffffff
cpmask 0x000000f0
comask 0x000000f0
cnmask 0xfff

step br
movegroup 5
prunedepth 4
searchdepth 4
epmask 0x00000f00fff0
eomask 0xffffffffffff
cpmask 0x00000f00
comask 0x00000f00
cnmask 0xfff
```




Here is how you would run it and what the result would look like:








Is that what you're asking? There is no way to make HARCS pick the shortest of these. There is just too much freedom to account for. You'll have to do that yourself.


----------



## CubingGenius (Jan 18, 2017)

mDiPalma said:


> If you want to solve eoline and then check which of the squares is most efficient, you can use this code for your custom.txt:
> 
> 
> Spoiler
> ...



Yes, this was what I was trying to do. Thank you for showing me how to do it. 

I tried to create something that works like this: (my solution wasn't that efficient, I just tried to make something quickly to show you.)

Scramble: L2 B' U2 B' L2 F' L2 R2 F R2 B2 D R' F U B D' R U2 F2 R'

EOline: F' R' U' D' B L D
BL block: R' U' L U2 L U L2
FL pair + DR edge: D R U R' D' R2
Last two pairs: R U' R2 U' R U' R U2 R' U2 R U2 R'
LL: (This won't be part of the program) U R U' R' U2 L R U' R' U L' U'

I tried to make it with this:



Spoiler





```
step eoline
movegroup 1
prunedepth 5
searchdepth 5
epmask 0x00000000f0f0
eomask 0xffffffffffff
cpmask 0x00000000
comask 0x00000000
cnmask 0xfff

step BLblock
movegroup 5
prunedepth 9
searchdepth 9
epmask 0x0000f000f0ff
eomask 0xffffffffffff
cpmask 0x0000f000
comask 0x0000f000
cnmask 0xfff

step FLpair+DRedge
movegroup 5
prunedepth 9
searchdepth 9
epmask 0x0000f00fffff
eomask 0xffffffffffff
cpmask 0x0000f00f
comask 0x0000f00f
cnmask 0xfff

step last2pairs
movegroup 4
prunedepth 11
searchdepth 11
epmask 0x0000ffffffff
eomask 0xffffffffffff
cpmask 0x0000ffff
comask 0x0000ffff
cnmask 0xfff

all eoline BLblock FLpair+DRedge last2pairs
```




But when I typed "custom" on the program it stopped loading at FLpair+DRedge and the program terminated when I tried to load it. Do you know what the problem would be?

Once again, thanks so much for this!


----------



## mDiPalma (Jan 18, 2017)

CubingGenius said:


> I tried to create something that works like this: (my solution wasn't that efficient, I just tried to make something quickly to show you.)



I think the problem is your depths are too deep. The *sum* of your prunedepth and searchdepth need to be at least the upper bound of your step. They don't *both* need to be so high.

Here is an example of your exact code working with lower depths. Put as low numbers as you can in these.


----------



## CubingGenius (Jan 18, 2017)

mDiPalma said:


> I think the problem is your depths are too deep. The *sum* of your prunedepth and searchdepth need to be at least the upper bound of your step. They don't *both* need to be so high.
> 
> Here is an example of your exact code working with lower depths. Put as low numbers as you can in these.



Thanks. I put the numbers lower and it works now.

Just wondering, what does prunedepth and searchdepth mean? I read the readme text but I'm still unsure what they do.


----------



## mDiPalma (Jan 18, 2017)

CubingGenius said:


> Thanks. I put the numbers lower and it works now.
> 
> Just wondering, what does prunedepth and searchdepth mean? I read the readme text but I'm still unsure what they do.



There are 2 main ways for a basic searching approach like this to work. Say we need to find a solution to a particular cross that we know will take no more than 6 moves. We can either...

a) Take a solved cross and do every possible combination of 6 moves to it. Store all this information in a table (the first column being every possible 0 to 6 move sequence ["U R B2 L' D F" etc], and the second column being the corresponding state of the cross edges [where each of the 4 edges are]). Then, when we want to solve the cross on a given scramble, just look in the second column for the state that exactly matches our scramble. Thus, the inverse of the corresponding entry in the first column would be the move sequence to solve the cross.

or

b) Go through every single possible 0 to 6 move sequence on the scrambled cross state, until it's solved. Print out the sequence that solves the cross.

Option a (what I call "pruning") is expensive for memory. When you have a very large movegroup like <UDRLFBMr> and want to tabulate results for a depth of 8-9 moves, it will take a lot of RAM to store all this info. However, this data is extremely fast to access.

Option b (what I call "searching") is expensive computationally. When you want to look to deep depths of 10+ moves, it can take a while. However, this hardly takes any memory to execute.

*The compromise is to do a little bit of both and meet in the middle.* Basically, when you type the name of a method (or "custom") HARCS prunes (creates and stores a table in RAM) for each step up to the value of "prunedepth" that is prescribed. Then, at runtime, when you try to find a solution for a certain step, HARCS will apply all the move sequences up to depth "searchdepth" and check each time if this cubestate appears in the pruning tables.

When it finds a match, the solution [option b] + inverse[option a] is output as the solution to the desired step.

That's why *prunedepth+searchdepth must be >= upper bound* for each step.

Does that make more sense?


----------



## CubingGenius (Jan 18, 2017)

mDiPalma said:


> There are 2 main ways for a basic searching approach like this to work. Say we need to find a solution to a particular cross that we know will take no more than 6 moves. We can either...
> 
> a) Take a solved cross and do every possible combination of 6 moves to it. Store all this information in a table (the first column being every possible 0 to 6 move sequence ["U R B2 L' D F" etc], and the second column being the corresponding state of the cross edges [where each of the 4 edges are]). Then, when we want to solve the cross on a given scramble, just look in the second column for the state that exactly matches our scramble. Thus, the inverse of the corresponding entry in the first column would be the move sequence to solve the cross.
> 
> ...



Thank you. That explains it very well. That would also make sense why it was having loading issues when I loaded the program with the higher number values.

I also wanted to thank you for all the things you taught me to do with the program today. I'm very appreciative of all the time you spent explaining to me.


----------



## sqAree (Jan 18, 2017)

Is it possible that the solutions are inefficient by some in between AUFs? For example when we define CP solved as the state where all corners are at their correct spot and oriented correctly, it might AUF (or something similar) at the end of the CP step and the next step might begin with <U>.


----------



## CubingGenius (Jan 18, 2017)

sqAree said:


> Is it possible that the solutions are inefficient by some in between AUFs? For example when we define CP solved as the state where all corners are at their correct spot and oriented correctly, it might AUF (or something similar) at the end of the CP step and the next step might begin with <U>.



That I know of, you can't do that. However, you can simply cancel into the next alg yourself though. I don't think what you described is possible with the current way it works.


----------



## sqAree (Jan 18, 2017)

CubingGenius said:


> That I know of, you can't do that. However, you can simply cancel into the next alg yourself though. I don't think what you described is possible with the current way it works.



But what if the next step also has an optimal solution starting with something non-<U> and the program doesn't see it?
I think it would be a logical step to include a feature that allows to define cubestates relative to face adjustments (it's also the way those methods are used by humans anyway).

Another question, for which turn metric are the solutions optimized? Can we customize that?


----------



## CubingGenius (Jan 18, 2017)

sqAree said:


> But what if the next step also has an optimal solution starting with something non-<U> and the program doesn't see it?
> I think it would be a logical step to include a feature that allows to define cubestates relative to face adjustments (it's also the way those methods are used by humans anyway).
> 
> Another question, for which turn metric are the solutions optimized? Can we customize that?



I know what you mean. Unfortunately the program is not able to do this task that I know of.

I believe it is HTM. I'm pretty sure at the moment you can't change that.


----------



## mDiPalma (Jan 18, 2017)

sqAree said:


> Is it possible that the solutions are inefficient by some in between AUFs? For example when we define CP solved as the state where all corners are at their correct spot and oriented correctly, it might AUF (or something similar) at the end of the CP step and the next step might begin with <U>.



You are correct. The built-in Roux method CMLL step actually accounts for this. I will try to figure out a way to give custom methods the same ability for the next version.



sqAree said:


> Another question, for which turn metric are the solutions optimized? Can we customize that?



The steps are optimized for their prescribed movegroup. If you you ZZ/Petrus/some custom method with only <UDRLFB>, then the solution will be htm. If you use Roux/some custom method with M moves, the solution will be optimized in stm (keep in mind that only the prescribed moves are considered, and the built-in Roux method doesn't consider S or E moves at all).

I'm also looking into a way to allow users to prescribe movegroups directly ("<MSE>" or "<FRU>") for custom methods, which I believe would give users better control over their methods.


----------



## sqAree (Jan 18, 2017)

Thank you, that was exactly the feature I had on my mind!

There is something more about metrics though, for example when SSC is generally measured in ATM (which I don't agree with in the first place, but there could be a reason to consider a method in ATM) and step 2 uses <DRU> the induced metric can't understand.
Allowing the customized movegroups to be made not only of moves but also of move sequences would solve this problem and moreover allows for even more flexibility for custom methods. For example one could make a Roux step 4b+c with <U,M2,M'U2M,M'U2M',MU2M',MU2M> even closer to human solving.


----------



## JohnnyReggae (Jan 19, 2017)

I'm unsure what I may be doing wrong, but I am getting nothing generated....

HARCS>> cfop

Loading cross, Loading xcross, Ready.

HARCS>> apply R2 D' R2 B2 U' L2 D2 F2 U' B2 U' B' D R' B F' R U' F2 R2 D'

sequence applied

HARCS>> style DF DR DB DL #

orientations set to: DF DR DB DL

HARCS>> number 3

max count set to: 3

HARCS>> xcross

DF:

1. z2 (0)

2. z2 U' (1)

3. z2 U2 (1)


DR:

4. z2 y' (0)

5. z2 y' U' (1)

6. z2 y' U2 (1)


DB:

7. x2 (0)

8. x2 U' (1)

9. x2 U2 (1)


DL:

10. z2 y (0)

11. z2 y U' (1)

12. z2 y U2 (1)

HARCS>>


----------



## CubingGenius (Jan 19, 2017)

JohnnyReggae said:


> I'm unsure what I may be doing wrong, but I am getting nothing generated....
> 
> HARCS>> cfop
> 
> ...



You need to add a hash when you put in the scramble in this format: apply [scramble] #


----------



## JohnnyReggae (Jan 19, 2017)

CubingGenius said:


> You need to add a hash when you put in the scramble in this format: apply [scramble] #


Thank you ... not sure how I missed that  but clearly a face-palm moment


----------



## CubingGenius (Jan 19, 2017)

JohnnyReggae said:


> Thank you ... not sure how I missed that  but clearly a face-palm moment



That's okay. I also did that before and was stuck for a while as well. The more you use it, the more you get used to it.


----------



## mDiPalma (Jan 19, 2017)

JohnnyReggae said:


> Thank you ... not sure how I missed that  but clearly a face-palm moment



Yeah, I should make that more clear. The "#" symbol is actually what applies the scramble (the "apply" just stores the subsequent moves AS the scramble). So you essentially were having HARCS solve xcrosses on an unscrambled cube.


----------



## Đỗ Viên (Jan 20, 2017)

Does it have mistakes ???
step fb
movegroup 2
prunedepth 4
searchdepth 4
epmask 0x0000f0f000f
eomask 0x0000f0f000f
cpmask 0x0000f00f
comask 0x0000f00f
cnmask 0xfff

step sb
movegroup 3
prunedepth 8
searchdepth 8
epmask 0x0000ffff0f0f
eomask 0x0000ffff0f0f
cpmask 0x0000ffff
comask 0x0000ffff
cnmask 0xfff

step cmll
movegroup 2
prunedepth 5
searchdepth 5
epmask 0x0000ffff0f0f
eomask 0x0000ffff0f0f
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step eo
movegroup 7
prunedepth 4
searchdepth 4
epmask 0x0000ffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step ulur
movegroup 7
prunedepth 4
searchdepth 4
epmask 0x0f0fffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step l4e
movegroup 7
prunedepth 4
searchdepth 4
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff
all fb sb cmll eo ulur l4e


----------



## mDiPalma (Jan 20, 2017)

Đỗ Viên said:


> Does it have mistakes ???
> 
> 
> Spoiler
> ...



I think there are a few mistakes, assuming you are trying to program the Roux Method.

For "fb", you need to have 12 digits in epmask and eomask (not 11)

Also I recommend setting cnmask to 0x0f0 (only the left/right centers in place).

I would also adjust some of your depths/movegroups to help the program prune faster.

This is also not an efficient program to generate algorithms, so "CMLL" seems out of place (the built in Roux function has a preset group of CMLL algs and can be used, in place of this). I would also change the movegroup to <RUD> or <RULD> , etc.

Finally, because LSE does not really solve any pieces until the very end, centers included, it's not really suitable for HARCS to solve in segments like this.

Nonetheless, HARCS is a merciful God:



Spoiler: custom.txt



step fb
movegroup 2
prunedepth 4
searchdepth 4
epmask 0x0000f00f000f
eomask 0x0000f00f000f
cpmask 0x0000f00f
comask 0x0000f00f
cnmask 0x0f0

step sb
movegroup 3
prunedepth 6
searchdepth 7
epmask 0x0000ffff0f0f
eomask 0x0000f00f0f0f
cpmask 0x0000ffff
comask 0x0000ffff
cnmask 0x0f0

step cmll
movegroup 4
prunedepth 8
searchdepth 8
epmask 0x0000ffff0f0f
eomask 0x0000ffff0f0f
cpmask 0xffffffff
comask 0xffffffff
cnmask 0x0f0

step eo
movegroup 7
prunedepth 4
searchdepth 4
epmask 0x0000ffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step ulur
movegroup 7
prunedepth 4
searchdepth 4
epmask 0x0f0fffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step l4e
movegroup 7
prunedepth 4
searchdepth 4
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff
all fb sb cmll eo ulur l4e









This is a good exercise in learning the syntax, but I highly recommend using the built-in functionality for Roux to generate solutions (there are optimizations under-the-hood that make it faster and more accurate).


----------



## Đỗ Viên (Jan 20, 2017)

Thanks you 


mDiPalma said:


> I think there are a few mistakes, assuming you are trying to program the Roux Method.
> 
> For "fb", you need to have 12 digits in epmask and eomask (not 11)
> 
> ...


----------



## JohnnyReggae (Jan 20, 2017)

So my attempt to do CFOP up to completed F2L seems to be a fail  ... Clearly I'm doing something wrong as I get nothing generated similar to when I left off the # from the scramble which resulted in a solution on a solved cube.

step cross
movegroup 1
prunedepth 5
searchdepth 5
epmask=0x00000000ffff
eomask=0x00000000ffff
cpmask=0x00000000
comask=0x00000000
cnmask=0xfff

step f2l1
movegroup 1
prunedepth 5
searchdepth 5
epmask=0x000000f0ffff
eomask=0x000000f0ffff
cpmask=0x000000f0
comask=0x000000f0
cnmask=0xfff

step f2l2
movegroup 1
prunedepth 5
searchdepth 5
epmask=0x000000ffffff
eomask=0x000000ffffff
cpmask=0x000000ff
comask=0x000000ff
cnmask=0xfff

step f2l3
movegroup 1
prunedepth 5
searchdepth 5
epmask=0x00000fffffff
eomask=0x00000fffffff
cpmask=0x00000fff
comask=0x00000fff
cnmask=0xfff

step f2l4
movegroup 1
prunedepth 5
searchdepth 5
epmask=0x0000ffffffff
eomask=0x0000ffffffff
cpmask=0x0000ffff
comask=0x0000ffff
cnmask=0xfff

all cross f2l1 f2l2 f2l3 f2l4


----------



## CubingGenius (Jan 20, 2017)

Can you please add RUL as a moveset? Whenever I try to do 1x2x3 I get a lot of D2s. Is it also possible to be able to decide whether you allow specific moves? eg. allow D and D' but not D2?


----------



## Đỗ Viên (Jan 20, 2017)

(


----------



## mDiPalma (Jan 20, 2017)

JohnnyReggae said:


> So my attempt to do CFOP up to completed F2L seems to be a fail  ... Clearly I'm doing something wrong as I get nothing generated similar to when I left off the # from the scramble which resulted in a solution on a solved cube.



Replace your equals signs with spaces  ... obviously i need to put in some error handling LOL

i am coding up a complete version of the built-in CFOP that will pick the shortest pair each time, but your code works until then.


----------



## JohnnyReggae (Jan 21, 2017)

mDiPalma said:


> Replace your equals signs with spaces  ... obviously i need to put in some error handling LOL
> 
> i am coding up a complete version of the built-in CFOP that will pick the shortest pair each time, but your code works until then.


Thanks for the help, can't believe .... once again that it was staring me in the face


----------



## rice (Jan 22, 2017)

mDiPalma said:


> HARCS can find stepwise optimal solutions to custom user-defined methods. The sole requirement of these methods is that their steps consist exclusively of orienting and positioning pieces in the conventional sense (reducing to a certain CP-state is not currently supported).


How difficult would it be to sidestep this requirement? For example, telling the program to pretend that the orange/blue edge is red/white and orange/green is red/yellow, then solve the cube like normal.


----------



## mDiPalma (Jan 22, 2017)

rice said:


> How difficult would it be to sidestep this requirement? For example, telling the program to pretend that the orange/blue edge is red/white and orange/green is red/yellow, then solve the cube like normal.



Solve the cube like normal...how?...up until when?

If you mean continue solving until the penultimate step, fix the wrong edges at the last step, then fix the centers....

The only way I can see that working is defining an alternate solved state for segments of the solve, which would be possible. But then you would be ALWAYS solving to a particular mostly-solved first layer. Is that what you mean? If you want the freedom to have ANY two edges in those slots, it would take a significant effort to put that functionality into HARCS.


----------



## rice (Jan 22, 2017)

My custom method(link in sig) involves solving the first layer with those two specific "wrong" edges in place for the first step. The rest can be accomplished with HARCS as is.


----------



## mDiPalma (Jan 22, 2017)

sqAree said:


> But what if the next step also has an optimal solution starting with something non-<U> and the program doesn't see it?
> I think it would be a logical step to include a feature that allows to define cubestates relative to face adjustments (it's also the way those methods are used by humans anyway).



I've put in this feature which can be toggled on for individual steps with the "Udisplacement" command in the input file. See below for an example.



Đỗ Viên said:


> Spoiler
> 
> 
> 
> ...



The problem is that HARCS is not designed to be an algorithm-finder, so that it could NOT find a sequence to solve that CMLL case with those depths. I've put in a way to import custom algorithm sets (using the command "algset CMLL.txt"). This is compatible with the "Udisplacement" command from above. This is explained better in the readme. Here is an example of it working with your previous input file [link to alg.cubing.net] :



Spoiler: revised custom.txt



step fb
movegroup 2
prunedepth 4
searchdepth 4
epmask 0x0000f00f000f
eomask 0x0000f00f000f
cpmask 0x0000f00f
comask 0x0000f00f
cnmask 0x0f0

step sb
movegroup 3
prunedepth 6
searchdepth 7
epmask 0x0000ffff0f0f
eomask 0x0000ffff0f0f
cpmask 0x0000ffff
comask 0x0000ffff
cnmask 0x0f0

step cmll
*algset CMLL.txt
Udisplacement*
epmask 0x0000ffff0f0f
eomask 0x0000ffff0f0f
cpmask 0xffffffff
comask 0xffffffff
cnmask 0x0f0

step eo
*Udisplacement*
movegroup 7
prunedepth 6
searchdepth 6
epmask 0x0000ffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step ulur
*Udisplacement*
movegroup 7
prunedepth 4
searchdepth 4
epmask 0x0f0fffff0f0f
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

step l4e
movegroup 7
prunedepth 4
searchdepth 4
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

all fb sb cmll eo ulur l4e











CubingGenius said:


> Can you please add RUL as a moveset? Whenever I try to do 1x2x3 I get a lot of D2s. Is it also possible to be able to decide whether you allow specific moves? eg. allow D and D' but not D2?



You can now use a custom movegroup by typing "movegroup <URL>", or whatever you want. However, these will not be as fast as the built-in movegroups, most of the time. See the example below for usage.

Allowing D and D' but not D2 would be challenging to implement because the solutions generated are combinations of 2 smaller solutions. If subsolution a ends with a D and the inverse of subsolution b starts with a D, then we will have a combined D2 which is hard to avoid.

With some help from @Teoidus , I added the ability to solve CP, as shown in this example below of the Missing Link to ZZ-d [link to alg.cubing.net] . You can see, from the input file, that it implements a custom movegroup of <RU>, as well as using the command "2genreduction" to solve CP during the left block. It also takes the 2gll algorithms from the built-in ZBLL.txt. This is all explained in the readme.



Spoiler: custom.txt



step eoline
movegroup 1
prunedepth 4
searchdepth 4
epmask 0x00000000f0f0
eomask 0xffffffffffff
cpmask 0x00000000
comask 0x00000000
cnmask 0xfff

step lbcp
movegroup 5
*2genreduction*
prunedepth 6
searchdepth 6
epmask 0x0000f00ff0ff
eomask 0xffffffffffff
cpmask 0x0000f00f
comask 0x0000f00f
cnmask 0xfff

step rb
*movegroup <RU>*
prunedepth 6
searchdepth 6
epmask 0x0000ffffffff
eomask 0xffffffffffff
cpmask 0x0000ffff
comask 0x0000ffff
cnmask 0xfff

step 2gll
*algset zbll.txt*
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

all eoline lbcp rb 2gll











rice said:


> My custom method(link in sig) involves solving the first layer with those two specific "wrong" edges in place for the first step. The rest can be accomplished with HARCS as is.



I'll put a way to customize the "solved state" for certain steps in the next version.


----------



## CubingGenius (Jan 22, 2017)

mDiPalma said:


> You can now use a custom movegroup by typing "movegroup <URL>", or whatever you want. However, these will not be as fast as the built-in movegroups, most of the time. See the example below for usage.
> 
> Allowing D and D' but not D2 would be challenging to implement because the solutions generated are combinations of 2 smaller solutions. If subsolution a ends with a D and the inverse of subsolution b starts with a D, then we will have a combined D2 which is hard to avoid.



Thank you very much! I just wanted one of these so I could avoid doing at least two D2s doing the 1x2x3 blocks.

I prefer this program to the old laire.fi/jarcs website.


----------



## Kirjava (Jan 23, 2017)

I've been trying to get this working on the web and it seems like it kinda works now

http://harcs.kirjava.xyz

it runs fully client side. one issue with JARCS was that it required a server

so I was thinking of using this in kSim and giving users the ability to click stickers, but I've noticed that while I've been making this you've already put out a new version.

I've made a bunch of changes to the code. since you don't have version control I can't easily see what changes happen between versions. If you did I could probably more easily update my code.

the source code for the web flavour of harcs is here


----------



## mDiPalma (Jan 23, 2017)

Kirjava said:


> I've been trying to get this working on the web and it seems like it kinda works now
> 
> http://harcs.kirjava.xyz



that looks awesome!

one problem i see is that the algorithm sets from cmll.txt and zbll.txt (& custom) don't seem to work, but you're definitely aware. it might also be helpful to see some visual feedback that the code is running, for example, when it's pruning.

i can try to read up and get the next version onto github.


----------



## G2013 (Jan 25, 2017)

I really like this solver!

I noticed that it is slower than JARCS and provides less substeps to play with. But still, it's one of the best pre-configurated solvers nowadays I think.

Great work 

EDIT: Also, "petrus" command loads until 3x2x2 and stops there... any idea why?


----------



## G2013 (Jan 25, 2017)

Kirjava said:


> I've been trying to get this working on the web and it seems like it kinda works now
> 
> http://harcs.kirjava.xyz
> 
> ...



Not working after I type in "petrus"


----------



## mDiPalma (Jan 25, 2017)

G2013 said:


> Not working after I type in "petrus"



No, it does.

Just give it a second. There is no visual feedback, and it's just generating the tables. It takes a couple of seconds.


----------



## G2013 (Jan 25, 2017)

mDiPalma said:


> No, it does.
> 
> Just give it a second. There is no visual feedback, and it's just generating the tables. It takes a couple of seconds.



What I expected hahaha

I guess I was just too anxious xD


----------



## crafto22 (Mar 20, 2017)

Hey sorry if this question is super obvious but I just discovered this (it is AMAZING btw), and I'm wondering what the terms prune depth and search depth mean. Because atm I just enter random numbers when defining a custom method and sometimes it works, other times it does not.


----------



## mDiPalma (Mar 20, 2017)

crafto22 said:


> Hey sorry if this question is super obvious but I just discovered this (it is AMAZING btw), and I'm wondering what the terms prune depth and search depth mean. Because atm I just enter random numbers when defining a custom method and sometimes it works, other times it does not.



click

prune depth is the depth of the movegroup tables which are stored in ram

search depth is the depth which moves in the movegroup are applied until a solution is found on the table

they should be roughly equal and add up to approximately the upper bound of your step in the desired movegroup


----------



## crafto22 (Mar 21, 2017)

mDiPalma said:


> click
> 
> prune depth is the depth of the movegroup tables which are stored in ram
> 
> ...


Thanks!


----------



## crafto22 (Mar 21, 2017)

Okay so sorry but I think there may be a bug or something...

step epbl
movegroup 3
prunedepth 8
searchdepth 8
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

all epbl

I type "custom" and as it is loading, the program crashes for no apparent reason... If I set the prunedepth and searchdepth to 7 and 7, this doesn't happen.


----------



## Teoidus (Mar 21, 2017)

prolly tried to malloc() some **** you shouldn'tve malloc()'ed

keep in mind that movegroup 3 = <RUMr> -> branching factor of 12 at each new depth
so depth 8 prune tables are 12 times as large as depth 7

so for example if your computer has like 2 GB RAM free for HARCS and depth 7 tables are at 256 MB, depth 8 = 12 * 256 = 3 GB = rip


----------



## mDiPalma (Mar 21, 2017)

crafto22 said:


> I type "custom" and as it is loading, the program crashes for no apparent reason... If I set the prunedepth and searchdepth to 7 and 7, this doesn't happen.



the above explanation is correct. you are using too much ram (RUMr is an interesting movegroup because three of those moves are along one axis and the code does not know how to cancel these to prune off duplicate branches - as a result the tables are much larger than they need to be. i never had any reason to implement that until now)

by 'EPBL', I'm assuming you are trying to permute edges in the U and D layers with RUMr (would movegroup 9 work better for you?). that seems like you are trying to generate long algs.

that is really not what HARCS was designed for. this was really just supposed to replace the old, defunct JARCS, which generated optimal solutions for short substeps of human methods. although it CAN do what you are asking, it is really just suited for small problems.

there is built-in functionality to define algsets from a text file, which i recommend you do instead. get these algs from ksolve or cube explorer.


----------



## crafto22 (Mar 24, 2017)

mDiPalma said:


> the above explanation is correct. you are using too much ram (RUMr is an interesting movegroup because three of those moves are along one axis and the code does not know how to cancel these to prune off duplicate branches - as a result the tables are much larger than they need to be. i never had any reason to implement that until now)
> 
> by 'EPBL', I'm assuming you are trying to permute edges in the U and D layers with RUMr (would movegroup 9 work better for you?). that seems like you are trying to generate long algs.
> 
> ...


Okay, I see. Thanks a lot for the help, I guess I'll stick to Cube Explorer for the longer algs.


----------



## Teoidus (Mar 24, 2017)

Out of curiosity though, what makes Cube Explorer so much better for algs compared to HARCS? They both use similar algorithms, right?


----------



## pinser (Mar 24, 2017)

And what about ksolve? Does it use a similar solving algorithm?


----------



## mDiPalma (Mar 27, 2017)

Ya probably the same algorithm - but those programs are much more efficient because they are written by people with nonzero programming experience. 

HARCS just evolved from my personal eoline/eo3x2x2 solver

if SOMEBODY wanted to work on optimizing harcs, i already have a bunch of ideas.


----------



## mDiPalma (Apr 15, 2017)

*After implementing a host performance-related recommendations from @Teoidus and others, we have managed to significantly improve the speed for HARCS-08.*



Spoiler: Here are some things that changed:





```
-move conversion from string to char
   -sequence conversion from string to vector < char >
   -active prevention of congruent candidate solutions in all movegroups, even custom
   -conversion of if-statements to else-ifs and switch (live and learn kiddos)
```




Here are some comparisons of characteristic test cases from v0.7 to v0.8 (run on my machine):

```
test case                    |    HARCS-07    |    HARCS-08    |    improvement
-----------------------------------------------------------------------------------
    applying 1e6 scrambles       |    14382 ms    |    406 ms      |    3542 %
    pruning 6gen to d=6          |    877 kcases  |    624 kcases  |    141 %
                                 |    446 ms      |    120 ms      |    372 %
    pruning RUMr to d=6          |    162 kcases  |    25 kcases   |    650 %
                                 |    108 ms      |    6 ms        |    1800 %
    loading petrus               |    5466 ms     |    532 ms      |    1027 %
    loading roux                 |    7466 ms     |    400 ms      |    1866 %
    loading zz                   |    11742 ms    |    924 ms      |    1271 %

                                                                    *kcases=1000 cases
```

As you can see, these are some pretty substantial improvements that will be immediately obvious when you run the code. There are still some improvements to be made in the next version.

Other things added in v0.8 are:


Spoiler: hexadecimal cubestate representation



You can now define the cubestate with the "set" command instead of a scramble string. This is helpful when you want to generate algorithms. The next version will allow for command-line inputs and/or input files to simplify this. Type help for more details.










Spoiler: custom stepwise solved states



You can now define stepwise "solved" states with hexadecimal strings. Here is an example with @rice 's first step. We are solving the first layer with the BL and BR edges at DF and DB. See the readme for more details.

It will not work for slice/wide moves or rotations (I plan to adjust the way slice moves are done in the next version, so I don't want to fix this just yet).









Spoiler: and a democratically elected icon :)











Because this was a major code rework, I expect there to be a lot of bugs. I tried to test a bunch of typical cases to make sure everything works, but I might have missed something. Please send me a screenshot if something doesn't work.


----------



## shadowslice e (May 20, 2017)

Does the current version of harcs allow things like "R2displacement" or "Ddisplacement"?


----------



## mDiPalma (May 29, 2017)

Version 9 is now out! It's some pretty cool stuff. I hope you like it!



Spoiler: Method Analysis



The "*analyze **" command analyzes and prints statistics for some number of random-state scrambles with the current loaded method (ZZ, Petrus, Roux, or custom). It is extremely useful for calculating and comparing stepwise-optimal movecount statistics for any method. Below is an example of the analyze command for the built-in ZZ method.







I typed "analyze 10000" so it ran the solution algorithm for 10,000 random-state scrambles in around 9.5 seconds (pretty good XD).

It then printed the minimum and maximum movecounts across all ZZ-solutions it found. It looks like our method is bounded by ~ [26, 48] htm.

Then it prints detailed breakdowns for each substep. The mean EOLine length for all the 10,000 solves was 6.125 which is very close to the global mean. The best EOLine was only 2 moves, and the worst EOLine was 8 moves!

The "TOTAL" row at the bottom is the some of the column above. For the "MEAN" column, this is just the mean stepwise-optimal movecount for the method. For the "BEST" column, this represents the luckiest solve you will ever get in your entire life (2-move EOLine, 4-move left block, 2-move right block, and ZBLL skip). For the "WORST" column, this is basically the solve you do right before you smash your new Valk against the wall.

*Try it out for yourself on other methods! It's super fast!*

This is quite a complicated feature - please let me know if you have any questions/problems or recommendations for details/statistics that I should include!

*NOTE If you are analyzing a custom method, you may get an error about "insufficient depth." This is because your stepwise prune/search depth are not deep enough for some states that are being tested. Just increase your numbers a bit. You may also want to adjust your prune/search depths based off the outputs from the analysis (if the max depth ("WORST") of a step is 12 moves over 10,000 solves, then maybe you don't need searchdepth and prunedepth for that step to both be 10 moves  ), which will save time in the pruning/searching stages.





Spoiler: Command Line Arguments



This is for people that want to wrap something around HARCS to generate algs or evaluate families of methods. This makes it possible to call HARCS easily from another program or routine. The syntax is really simple. In your command prompt/terminal, just navigate to the directory of the executable and type "HARCS-09" followed by the string of commands you would like to evaluate. Note that the HARCS instance terminates as soon as the command completes, so you will need to combine all the relevant commands onto a single line. 

Here is a sample:










Spoiler: Other Updates



-colored output 
-removed LOTS of old code, cutting exe filesize to <1.5 MB
-switched to 64bit (if that's bad, you can compile from source)
-adjusted prune/search depth for compiled methods
-removed rotations from ZBLL.txt
-squashed bugs



I plan for the next version (10) to be my final update. Please let me know what features you think would be useful, or forever hold your peace. Also please tag me with screenshots of any bugs you may find.



shadowslice e said:


> Does the current version of harcs allow things like "R2displacement" or "Ddisplacement"?



No, but good idea! I'll try to get that to work.


----------



## Teoidus (May 29, 2017)

Big request: allow for custom methods to take on the form of "regular expressions"

Like, say I define steps: cross, p1, p2, p3, p4, oll, pll, cll, ell, coll, epll for method cfop

Instead of typing "all" I can type "cross (p1|p2|p3|p4) (p1|p2|p3|p4) (p1|p2|p3|p4)(p1|p2|p3|p4) (oll pll|cll ell|coll epll)", which means it will solve the cross, choose the shortest of p1, p2, p3, and p4 4 times (always choosing among pairs not yet solved), then solves the last layer with oll/pll or cll/ell or coll/epll (whichever is most efficient).

You could even get fancy, define algsets wv, sv, and type "cross (p1|p2|p3|p4) (p1|p2|p3|p4) (p1|p2|p3|p4)(p1|p2|p3|p4|wv pll|sv pll) (oll pll|cll ell|coll epll)" to allow for last slot stuff.


----------



## Arc (Jun 4, 2017)

I have a bunch of suggestions that you could consider adding (don't feel forced of course, I just can't help but come up with ideas and always share them)

command 'load *.txt' to allow arbitrary name for the custom method file (so you can have multiple without having to rename them)

command 'random' to put the cube into a random state (and if/when you implement a solver, output the scramble)

break down loading time per step
break down analysis time per step
command 'color' to choose output color from a list (or arbitrary hex value if possible)
what Teoidus said ^
during analysis, automatically skip errors, throw out the solves that cause those errors, and report the number of errors after analysis is finished
if the solve count of an analysis is 1 (command 'analyze 1') automatically show the scramble (if/when you implement a solver) and solution breakdown

further breakdown of steps in analysis (distribution of move count, total unique solutions)
command 'export analysis' mimics command 'analysis', except after analysis has been completed, output the solves (solution and, when/if you implement a solver, scramble as well, though it would add a little to analysis time of course) and analysis data in some raw format
command 'apply' with no parameter applies #1 solution of last step to cube and output regularly as during 'all'
example usage: 'random' (set cube state to random) then 'EOLine' then 'apply' applies first EOLine solution

multiple algorithm files per method


----------



## Đỗ Viên Rouxer (Jun 7, 2017)

How can i compile from the sources ??? My computer was 32 bit


----------



## mDiPalma (Jun 7, 2017)

Đỗ Viên Rouxer said:


> How can i compile from the sources ??? My computer was 32 bit



I included a 32bit version in this: rpi.edu/~dipalm/HARCS-09a.zip


----------



## Đỗ Viên Rouxer (Jun 8, 2017)

mDiPalma said:


> I included a 32bit version in this: rpi.edu/~dipalm/HARCS-09a.zip


Thanks you


----------



## mDiPalma (Jun 14, 2017)

Hey guys, I made a bunch of small updates to HARCS. I still have a few to go before I'm done, but here's what I've done so far.

*There are some new commands:*
-"random" sets a random cubestate
-"load *" replaces "custom", give it a .txt file
-"export" saves raw analysis solutions to text file
-"histogram *" plots movecount histogram of analysis step

*This is what it looks like when you use these commands:*






*Here is a sample of what raw data will look like in the exported text file.*


Spoiler





```
D F2 B R L2 U F' , U' D2 R' U D' R2 U' D2 R , D R2 D R2 U R2 U' R2 U' R2 D2 R2 U' , U' M U D M U' M2 D M U D' M' D' , 
D R F' U' L' B R' , U R' U D R' U2 D' R U R , D R2 U R2 D2 R2 D' R2 , M U D M U2 M2 U M' D2 M2 U' D M' U , 
D R D F' L U R' F' , U R U2 R2 D2 R' U R' U2 R' , R2 U R2 D R2 U' R2 D R2 U D' R2 , U M' U D' M' D' M2 D M U D M' U , 
U B L' U' R F B2 , R2 D2 R2 D R U2 R' , D2 R2 D' R2 U' R2 U R2 D' R2 D R2 , U M2 U2 D' M' U2 M U M U2 M' D M2 , 
U R2 L D F' L B , R U' R U' D' R D2 R , D R2 D' R2 U R2 D R2 D R2 U' R2 D , U D2 M U D' M D M2 D' M U D' M' U , 
...
...
...
```






Spoiler: smaller things



-added time breakdown for load/analyze
-added another help page
-fixed many bugs
-increased sb prune depth in roux
-switched to uint64_t for some additional portability
-simplified and pushed error notes to the end of analysis
-improved performance of 2gen testing



*There are also cool settings added in "settings.txt" that you can change to vastly improve your user experience.*


----------



## bren077s (Jul 13, 2017)

Hey @Teoidus, Have you made a custom text for the 2GR method?


----------



## Teoidus (Jul 13, 2017)

@mDiPalma has, here it is:

If you're looking for movecount analysis/histograms/etc, he happened to run those as well:


----------



## bren077s (Jul 13, 2017)

Hey, @mDiPalma,
I have a few feature requests if you ever get the chance.
Main Request: add a total solve movecount histogram
Side Requests:

add E and S moves
@Teoidus idea: 


Teoidus said:


> Instead of typing "all" I can type "cross (p1|p2|p3|p4) (p1|p2|p3|p4) (p1|p2|p3|p4)(p1|p2|p3|p4) (oll pll|cll ell|coll epll)", which means it will solve the cross, choose the shortest of p1, p2, p3, and p4 4 times (always choosing among pairs not yet solved), then solves the last layer with oll/pll or cll/ell or coll/epll (whichever is most efficient).






Arc said:


> during analysis, automatically skip errors, throw out the solves that cause those errors, and report the number of errors after analysis is finished






Arc said:


> multiple algorithm files per method



Also, thanks for the great application, Harcs is amazing.


----------



## dboeren (Jul 13, 2017)

Is there a Mac version of this? I'd love to try it out.


----------



## mDiPalma (Jul 13, 2017)

dboeren said:


> Is there a Mac version of this? I'd love to try it out.



some people have told me it works in Wine



bren077s said:


> I have a few feature requests if you ever get the chance.



E and S moves should already work, i will definitely add the full-solve movecount histogram, and the rest of the upgrades are in progress


----------



## I_<3_SCS (Jul 13, 2017)

mDiPalma said:


> some people have told me it works in Wine
> 
> 
> 
> E and S moves should already work, i will definitely add the full-solve movecount histogram, and the rest of the upgrades are in progress



Dude, nice program!

Really useful!


----------



## bren077s (Jul 13, 2017)

mDiPalma said:


> E and S moves should already work, i will definitely add the full-solve movecount histogram, and the rest of the upgrades are in progress



I setup a movegroup that used E, and it never happened to use E in the solves I tested. It is possible that the solves I tested simply never used E because it was sub optimal. Good to know they work.

Edit: Made the script better and added in move analysis
For those of you who are interested. I created a small python script(requires python, numpy, and matplotlib to run) that takes in one of @mDiPalma's export files and creates histograms of each substep and the entire solve. The red dotted line is the average. Now, it also shows what moves are used during each step and during the entire solve(should be nice to see what methods are best for 1 handed). You will need to download the file and change the extension from .txt to .py


It is run using the command: 'python SolveAnalyzer.py "exported filename"'
ex: python SolveAnalyzer.py roux_solves.txt
Here is an example of its output on 100,000 Roux solves:
 


Hey @mDiPalma, I was working on setting this up for ZZ-CT using the algs on http://gyroninja.net/zzct/zzct.html#page.
I keep running into issues when I analyze and I was wondering if their is an easy way to convert from the hex cube state to an algorithm so I can look at what cases are failing. Currently TSLE seems to be working all of the time, but sometimes TTLL fails. Here is the output:

```
Errors:
        Attempt 1 on step 5 at state:
                241356789abc/222222222222/42315678/44444444/123
        Attempt 56 on step 5 at state:
                142356789abc/222222222222/21435678/44444444/123
        Attempt 64 on step 5 at state:
                124356789abc/222222222222/34215678/44444444/123
        Attempt 86 on step 5 at state:
                134256789abc/222222222222/41325678/44444444/123
```
Any advice?


----------



## Neuro (Jul 14, 2017)

Hey is it possible to leave out one of two pieces? I want to be able to solve Roux SB but it can exclude *either* corner (DFR DBR) Thanks!


----------



## bren077s (Jul 15, 2017)

Currently HARCS only supports doing things in the exact same order every time. For testing with HARCS, you would have to pick one of the corners and always leave that same corner out.


----------



## Sk0bel (Jul 16, 2017)

Hi @mDiPalma,

Your program is just wonderful !

Unfortunately, I have some issues with it. Actually, in my custom.txt file, I'm using eps and cos commands to permute and disorient few pieces. It works like a charm when I use a command like : "apply R' D2 R2 B2 U' B2 D2 F2 L2 R2 D2 F L2 D L B' L D' R # all". But one problem comes when, instead of using a generated scramble, I write something like : "apply random # all" or even "random all" ; at the third step of my custom method (the step where eps and cos appear) and after that one, I get an error :


Spoiler: error







The seconds problem I get is when I'm using the "analyze" command. I'm getting no data and errors appear :


Spoiler: error







I hope it's going to be fixed 

Thanks again for the program !


----------



## mDiPalma (Jul 16, 2017)

Sk0bel said:


> Hi!



Can I see the text of your input file?


----------



## bren077s (Jul 18, 2017)

If anybody cares, I rewrote my earlier script so that it compiles as an exe that you can just double click. You can get it here if you want: https://github.com/bhansconnect/SolveAnalyzer


----------



## Sk0bel (Jul 20, 2017)

mDiPalma said:


> Can I see the text of your input file?



No, sorry, I want to keep it secret.

You can nonetheless try out with the RiceSquare file you did.


Spoiler: custom.txt






You'll note that the analyze command isn't working at all.


Spoiler: Analyze_error






So does the random command when you see what happens after typing "view"...


Spoiler: Random









Spoiler: ALG_CUBING.NET







I really hope you'll notice that..

Make HARCS as great as possible !


----------



## Arc (Jul 21, 2017)

A feature that seems very hard to implement and not that useful but nonetheless pretty neat is forcing separation of oriented pieces. That is, putting them in their own layer.


----------



## Isaac VM (Jul 24, 2017)

dboeren said:


> Is there a Mac version of this? I'd love to try it out.


I've tried to run it with wine on mac but I haven't been able :/


----------



## Đỗ Viên Rouxer (Aug 8, 2017)

Its not work with this custom.


----------



## bren077s (Aug 8, 2017)

Your search depth is way too small for f2l-1e. as it says, no solution found within search depth. That being said, you will probably run out of memory before increasing your search depth enough. You probably need to break f2l-1e into more substeps.


----------



## mDiPalma (Aug 8, 2017)

Đỗ Viên Rouxer said:


> Its not work with this custom.



yes, i think solving 4 F2L pairs in 10 moves is a little ambitious.

you should break f2l-1E into two steps (left and right, maybe)


----------



## Đỗ Viên Rouxer (Aug 9, 2017)

mDiPalma said:


> yes, i think solving 4 F2L pairs in 10 moves is a little ambitious.
> 
> you should break f2l-1E into two steps (left and right, maybe)


Ok. Thanks you


----------



## Micki (Aug 26, 2017)

why can't i get the analyze to work with my costum file?


----------



## bren077s (Aug 26, 2017)

whenever you get errors like that, it generally means that you do not have a high enough move count(prunedepth+searchdepth) for a step or you do not have the right move group. I think you need to increase you move count for eo2x2x3 and potentially f2l as well.


----------



## Micki (Aug 26, 2017)

bren077s said:


> whenever you get errors like that, it generally means that you do not have a high enough move count(prunedepth+searchdepth) for a step or you do not have the right move group. I think you need to increase you move count for eo2x2x3 and potentially f2l as well.


Ok so first I tried changing the movecounts in f2l to 8 in both and eo2x2x3 to 7 in both, that didn't work, then i tried changing the movegroup to a custom one allowing the same moves and that didn't work either. Then finally i changed the custom group to allow u moves also and for some reason it worked even though u moves aren't necessary for that step. But thanks


----------



## bren077s (Aug 26, 2017)

I have not look through the mthod, but it could be related to which center are solved/ doing eo


----------



## mDiPalma (Sep 28, 2017)

It's been a while since I published an update to this program. I've added a few things that I think are pretty cool. Here is a link. I will git commit tomorrow morning.



Spoiler: Algorithm Generating



You can now generate algorithms between two states (defined in your input file) automatically. Include this line in your input file: "algsearch step1 step2" with the optional term "--NO-ISO" to discount isomorphs. Then you can call "algsearch 2" in HARCS to generate 2 algorithms for each unique state between the prescribed steps.

Here is an example of me generating the 2 <RUD> algorithms for each of the 22 PLLs in around 40 seconds.








Another interesting feature of this command is that it gives frequency-weighted movecounts (which is more accurate than just averaging the moves for each alg).

(One cool trick with this command is a way to calculate the number of cases between two states. You can define two steps in your input file with a searchdepth and prunedepth of 1. Then just run "algsearch 1" and it will calculate the number of unique states between these cases. It won't currently discount symmetries and it only can detect U-layer isomorphs, but it's pretty convenient nonetheless.)


*Note: Because there can be many states between arbitrary steps, this command may take a significant amount of time to execute. *

*Also, to allow for the user to view the statistic results before a potentially large number of errors appear (and to allow for usage of the trick I described previously), the user must push RETURN/ENTER one additional time after the analysis completes and the statistics are shown before the program resumes.*





Spoiler: Linear FMC (really cool thing)



Type "hacks 20" to search for short Linear FMC solutions for the loaded method on an applied scramble.

Basically, it will solve the first step 20 times. Then for each of these solutions, it will solve the second step 20 times. This process repeats until the cube is solved for all branches (branch factor for algorithmic steps is 1, however). Then it will look through all the possible solutions and pick out the shortest one. It posts some pretty interesting statistics afterwards.

Here is an example of me finding a quick 25 htm Petrus solution to a random scramble in around 5 seconds. I've actually gotten a few sub-20s with ZZ in this program.






*Note: If you use this to cheat in FMC or other unofficial events, you can't receive Communion, and you won't be saved when you die. Just FYI.*





Spoiler: other things



-added setting to select browser visualization (ACN or my XMDI)
-permit "load custom" instead of "load custom.txt"
-custom solved states for "analyze" and "hacks"
-fixed several bugs
-added public domain license





Spoiler: A word on bugs



A brief word to those who have corresponded with me with regards to bugs they've found. If I've responded to you directly, the bug is resolved. If not, the issue is still present. For clarity, there are 2 classes of bugs I've noticed: 1) bugs in optimality, and 2) bugs in rotations.

Bugs with regards to optimality are my primary concern. These are present in movegroups that involve rotations (see 2) and in CP-solving functionality. They happen because of the way HARCS uses multimaps to relate cubestates to move sequences and the way it iterates over them under different circumstances. I will try to resolve these in the next version.

Bugs with regards to rotations are not a priority at all for me. There are some issues associated with the way HARCS handles edge orientation that manifest as bugs for movegroups heavy in cube rotations (like when your step ends up in a fundamentally different orientation than what it starts in). Even Cube Explorer doesn't gaurantee optimality for sliced movegroups (try to find one of HARCS' LSE solutions in Cube Explorer - it probably won't find it). These bugs are not a major concern for me mostly because they are issues of ergonomics, which are not of actual interest for a piece of software like HARCS. I mean, if you look at @bren077s 's movegroup histograms you will notice that HARCS naturally prefers D moves over U moves, among other things (simply due to the way it iterates over candidate move sequences). This software is designed to find stepwise optimal solutions to help users learn blockbuilding and other techniques. If you want your solutions/algorithms in some obscure, rotation-heavy movegroup, try to jam it through something like AlgExplorer or use some converter.


----------



## bren077s (Oct 31, 2017)

Can you post pllalgs.txt that you used in the algsearch?


----------



## mDiPalma (Oct 31, 2017)

bren077s said:


> Can you post pllalgs.txt that you used in the algsearch?




```
step oll
movegroup 1
prunedepth 1
searchdepth 1
epmask 0x0000ffffffff
eomask 0xffffffffffff
cpmask 0x0000ffff
comask 0xffffffff
cnmask 0xfff

step pll
movegroup 4
prunedepth 9
searchdepth 9
epmask 0xffffffffffff
eomask 0xffffffffffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

algsearch oll pll --NO-ISO
```


----------



## RazarTuk (Jul 11, 2018)

Is it possible to specify half turns in a custom method? I want to test a method for move count, but it involves passing through Thistlethwaite's G2, which is {L2, R2, F2, B2, U, D} as a generator.


----------



## mDiPalma (Dec 6, 2018)

I have made 2 quick changes. Click here to download v0.9d. A bug related to "algsearch" has been fixed (problem with edge orientations). Algorithms with unsolved centers still won't compute. Support for half-turn moves is implemented. Use should be obvious, or check the README.

Here is an input file for one of my old methods that demonstrates both changes.

Type:

```
load portico apply F L2 U2 L2 B L2 R2 U2 B R2 B2 U' B D' U2 R2 U' B L'  # all view
```
( [ALT+SPACE]+E+P to paste into Windows command prompt )

You will see left and right block solutions that include F2 moves, because the input file contains: "movegroup <URLF2>"

Type:

```
algsearch 1
```

It will generate and solve the 17 EP5 algorithms (16+solved) without a hitch. This wouldn't have worked on the previous version.



Spoiler: just FYI



This input file won't work for most COLLs because it uses CMLL.txt as an alg source for convenience.





RazarTuk said:


> Is it possible to specify half turns in a custom method? I want to test a method for move count, but it involves passing through Thistlethwaite's G2, which is {L2, R2, F2, B2, U, D} as a generator.



Now it does.


----------



## AtlasTheGarbage (Dec 9, 2018)

You could also go a step further and allow the ability to have a move set that only does quarter turns with something like <M1U> where M can only be a quarter turn.

Furthermore, you could also go another step further and allow a move set that restricts it to just prime moves or just forward moves.

For example, you could make it so that something like <M'U> will restrict M to only be prime (as well as any U move), and maybe something like a double prime symbol OR a quotation mark for restricting it to only forward quarter turn moves like <M''U> or <M"U> so that M can only be a forward quarter turn (Allowing both '' and " as valid syntax options for forward moves would be neat)


----------



## frenzen (Jan 1, 2019)

For some reason whenever I go for xcross it does not give me the right movements, I thought maybe I scrambled it wrong or whatever, but when I go for the cross it gives me the right movements. I am using the latest version


----------



## mDiPalma (Jan 14, 2019)

<New version 0.9e> Fixed a bug for Mr. Taylor & Co. that was causing some problems generating algorithms.



Spoiler: test input file





```
step F2L-1
movegroup 8
prunedepth 1
searchdepth 1
epmask 0x0000ff0fffff
eomask 0x0000ff0fffff
cpmask 0x0000ff0f
comask 0x0000ff0f
cnmask 0xfff

step L5C
movegroup <rUD>
prunedepth 10
searchdepth 8
epmask 0x0000ff0fffff
eomask 0x0000ff0fffff
cpmask 0xffffffff
comask 0xffffffff
cnmask 0xfff

algsearch F2L-1 L5C --NO-ISO
```




Note the way I revised the input file. When analyzing methods and generating algorithms it's best to maximize your "prunedepth" (based on your RAM) so your CPU doesn't have to search as deep per state. 3 GB RAM for ~60 second analysis versus 1GB RAM for ~4 min analysis. Also isomorphs are removed.





AtlasTheGarbage said:


> You could also go a step further and allow the ability to have a move set that only does quarter turns with something like <M1U> where M can only be a quarter turn.
> 
> Furthermore, you could also go another step further and allow a move set that restricts it to just prime moves or just forward moves.
> 
> For example, you could make it so that something like <M'U> will restrict M to only be prime (as well as any U move), and maybe something like a double prime symbol OR a quotation mark for restricting it to only forward quarter turn moves like <M''U> or <M"U> so that M can only be a forward quarter turn (Allowing both '' and " as valid syntax options for forward moves would be neat)



I can't imagine a use case for this but okay. Maybe for OH or feet algs.

*1 for quarter turns clockwise, *2 for half turns, *3 for quarter turns anticlockwise.






frenzen said:


> For some reason whenever I go for xcross it does not give me the right movements, I thought maybe I scrambled it wrong or whatever, but when I go for the cross it gives me the right movements. I am using the latest version



It seems to work for me. Are you doing these commands?



"cfop" loads cfop
"apply * #" applies a certain scramble. # ends the scramble
"xcross" provides some xcross solutions
"1" and "view" are optional, they just apply the first solution and view the cube

To try a new scramble, type "revert" and then apply your next scramble, as before. Maybe the commands evolved since I posted that old tutorial video, all the years ago. Maybe that's what threw it off for you.


----------



## Lazy Einstein (Feb 10, 2019)

I am trying to learn how HARCS works. 

I use revert, apply -scramble here- #, and then any number of commands. eoline, all, etc. Even switching to cfop yields the same results

Image belowe


----------



## mDiPalma (Feb 11, 2019)

Lazy Einstein said:


> I am trying to learn how HARCS works.
> 
> I use revert, apply -scramble here- #, and then any number of commands. eoline, all, etc. Even switching to cfop yields the same results



Seems to work for me. Is that 64-bit windows?


```
zz apply L2 F2 R2 U F2 D' F2 R2 D B R' U' B F2 D R2 B U2 # eoline 1
```


----------



## Lazy Einstein (Feb 12, 2019)

Yes, it is. Is that bad?



mDiPalma said:


> Seems to work for me. *Is that 64-bit windows*?


----------



## mDiPalma (Feb 12, 2019)

Lazy Einstein said:


> Yes, it is. Is that bad?



It's good. I was just making sure. 

Can you give me a list of commands (screenshot is fine) you used to generate the problem? (From when the program starts, please). Thanks,


----------



## Lazy Einstein (Feb 12, 2019)

I redownloaded it and it is working.


----------



## Anjew (Feb 16, 2019)

Okay. So I have an idea for some software, and I’m wondering if this software can do it. So I’m the midst of solving a cube, you put the state of the cube in the software, that you tell it that you want to move piece A to where piece B is, then you tell it the pieces that cannot get messed up (the solved peices). Then the cube tells you if what you want is possible, and if it is it gives you the algorithm to solve it.


----------



## PapaSmurf (Feb 17, 2019)

Cube explorer. It's a very powerful tool. If you have a Mac, you can use wine to run it, otherwise just search cube explorer and it should turn up.


----------



## petrouxer (Aug 24, 2019)

Long time lurker here, just wanted to show some appreciation for this software! Thanks for the effort you've put in. I find it to be an awesome companion to learning to blockbuild with Petrus. It's like having @Tao Yu 's blockbuilding tricks pdf but with an unlimited number of examples. Or it's like having an optimal walkthrough generator. Good walkthroughs are few and far between for such an unpopular method as Petrus.

My current use-case:

get a scramble
go through all possible 2x2x2 (exploring the low movecount ones, with DCN turned on)
decide on an orientation for 3x2x2 based on previous step
learn the rest of the solution (pick up on ergonomic tricks and full f2l after EO)
lather, rinse, repeat
I'm still a noob, so going for full 3x2x2 is a bit counter productive at the moment which appears to be the default for the ALL command.

Using this approach you can circumvent a lot of the learning issues with Petrus (difficulty to have good block building intution when you're a noob). Thanks @mDiPalma .


----------



## mDiPalma (Aug 26, 2019)

petrouxer said:


> I'm still a noob, so going for full 3x2x2 is a bit counter productive at the moment which appears to be the default for the ALL command.



I'm glad you like it. Here's an input file you can use for 'all' to work the way you want. Keep in mind HARCS picks an arbitrary (first?) orientation if you don't select a SINGLE one.


----------



## ImmolatedMarmoset (Oct 2, 2019)

mDiPalma said:


> I'm glad you like it. Here's an input file you can use for 'all' to work the way you want. Keep in mind HARCS picks an arbitrary (first?) orientation if you don't select a SINGLE one.


Hey, do you know if this only works on windows, or can I use an emulator to get it on a mac? I have the most recent macintosh


----------



## mDiPalma (Oct 2, 2019)

ImmolatedMarmoset said:


> Hey, do you know if this only works on windows, or can I use an emulator to get it on a mac? I have the most recent macintosh



Some people have told me it works in WINE, while others have insisted it doesn't. It's worth a try. If not, and you have some programming experience (or are willing to learn), you can compile from the source included in the zip file.


----------



## PapaSmurf (Oct 2, 2019)

It definitely works in wine. I can use it.


----------



## Username: Username: (May 27, 2020)

sorry for the bump. I'm confused with how you complete the solve with the CFOP method, there is only Cross and XCross, there's no F2L, and OLL and PLL.
I'm also confused about how you add the steps for a custom method.


----------



## PapaSmurf (May 27, 2020)

The custom method text file should have all the info for that. For CFOP, it's because you already have all the algs in many places and F2L stuff in many places so there's not a lot of point.


----------



## Sosimomonon (Dec 15, 2020)

Sorry to bump an inactive thread, but I wrote a short guide for how to use the algsearch function and figured that I might as well post it here.








This is how to use HARCS algsearch:


Create a text file in your HARCS directory, name it anything you want, I'll call it "Torsten" during this guide. Put this inside Torsten: step 1 movegroup 1 prunedepth 1 searchdepth 1 epmask 0x0000f00ff0ff eomask 0xffffffffffff cpmask 0x0000f00f comask 0xf000f00f cnmask 0xfff step 2 movegroup <...




docs.google.com


----------



## trangium (Dec 19, 2020)

I tried to download HARCS by clicking on the link, but I got a 404 Not Found error. Is HARCS down or am I doing something wrong?

EDIT: Got it to work by downloading from another person


----------



## mergeconflict (Jan 17, 2021)

trangium said:


> EDIT: Got it to work by downloading from another person


could you provide the download link or contact info?


----------



## nXhL (Jan 23, 2021)

trangium said:


> I tried to download HARCS by clicking on the link, but I got a 404 Not Found error. Is HARCS down or am I doing something wrong?
> 
> EDIT: Got it to work by downloading from another person


Yeah, you do have the download?


----------



## incomplete_trembling (Mar 28, 2021)

nXhL said:


> Yeah, you do have the download?








HARCS-09e.zip







drive.google.com





Hopefully this works?
Wanted to get harcs on a new device and was sad to see that the link didn't work anymore, but luckily I still had it my old device and could upload it.


----------



## Lazy Einstein (Mar 28, 2021)

Sosimomonon said:


> Sorry to bump an inactive thread, but I wrote a short guide for how to use the algsearch function and figured that I might as well post it here.
> 
> 
> 
> ...



I am going to take a look. Prematurely, I am going to say good on you for making this.


----------



## povlhp (Aug 4, 2021)

Just downloaded it, to test my Roux skills. 
Just a few issues. With Roux I can have only 1 orientation entered as style DR #
I can't change it. I need to quit and start again to solve on another FB color. Can live with that.

Tried to compile native under CygWin, just gets a black screen when running


----------



## qwr (Aug 4, 2021)

incomplete_trembling said:


> HARCS-09e.zip
> 
> 
> 
> ...


To avoid reliance on a google drive I have uploaded a mirror here (the code is licensed under public domain). The engine is 6900 lines of C++ in one file rather unfortunately for anyone brave enough to change anything.

edit: the repo is online by the original author


----------



## povlhp (Aug 5, 2021)

Official site is here:


xmdi.us


Github of the same: https://github.com/xmdi/old-harcs (no binaries aka releases)
And he is trying a new version here:








GitHub - xmdi/HARCS-C: faster, lighter method analysis toolkit


faster, lighter method analysis toolkit. Contribute to xmdi/HARCS-C development by creating an account on GitHub.




github.com





I forked both of them to be sure to keep them alive.


----------



## Lucas Garron (Aug 5, 2021)

povlhp said:


> Official site is here:
> 
> 
> xmdi.us
> ...


I didn't realize HARCS became unavailable. Thanks for the archaeology!

1) Could I interest you in contributing this to https://archive.cubing.net/ via https://github.com/cubing/archive.cubing.net ?
2) My checkout of github.com/mDiPalma/HARCS from March 2017 doesn't have a license. Do you know when/how it got attached?


----------



## narusite (Aug 5, 2021)

povlhp said:


> Just downloaded it, to test my Roux skills.
> Just a few issues. With Roux I can have only 1 orientation entered as style DR #
> I can't change it. I need to quit and start again to solve on another FB color. Can live with that.
> 
> Tried to compile native under CygWin, just gets a black screen when running


Weird, I have no problem with style DCN #
fb then list me all the fb for x2/y


----------



## povlhp (Aug 5, 2021)

narusite said:


> Weird, I have no problem with style DCN #
> fb then list me all the fb for x2/y


But that is just one style.
style DR DL #
does not work. And I can not change the style without restarting the program.


----------



## povlhp (Aug 5, 2021)

Lucas Garron said:


> I didn't realize HARCS became unavailable. Thanks for the archaeology!
> 
> 1) Could I interest you in contributing this to https://archive.cubing.net/ via https://github.com/cubing/archive.cubing.net ?
> 2) My checkout of github.com/mDiPalma/HARCS from March 2017 doesn't have a license. Do you know when/how it got attached?


I am not the owner. And the license is pretty wide. Do whatever you want with it.


----------



## qwr (Aug 5, 2021)

Lucas Garron said:


> 2) My checkout of github.com/mDiPalma/HARCS from March 2017 doesn't have a license. Do you know when/how it got attached?


you should ask the original author. he seems to put everything in public domain but you should get confirmation.



povlhp said:


> (no binaries aka releases)





The new C rewrite is "only" 2000 lines in one file, however the code is pretty dense and not commented well.


----------



## Lazy Einstein (Sep 9, 2022)

Lucas Garron said:


> I didn't realize HARCS became unavailable. Thanks for the archaeology!
> 
> 1) Could I interest you in contributing this to https://archive.cubing.net/ via https://github.com/cubing/archive.cubing.net ?
> 2) My checkout of github.com/mDiPalma/HARCS from March 2017 doesn't have a license. Do you know when/how it got attached?


Do you or any other computer programming-literate, long-standing mbrs of the cubing community have any way to contact Johannes.

Are any of the computer programming literate cubers able to revive JARCS from the site's webarchived code?

I've seen Stachu reproduce and duplicate Conrad's Visual Cube image generator for his own site. And, most recently, Gil Zussman's cloning and enhancement of the cubing.net resources for SpeedcubeDB.
Surely(hopefully), reviving JARCS must be also possible.

All later attempts at designing a program to replace JARCS have not been able to match it's capabilities.


----------



## qwr (Sep 10, 2022)

Lazy Einstein said:


> Do you or any other computer programming-literate, long-standing mbrs of the cubing community have any way to contact Johannes.
> 
> Are any of the computer programming literate cubers able to revive JARCS from the site's webarchived code?
> 
> ...


be the change you wish to see in the world... create LEARCS


----------



## trangium (Sep 10, 2022)

qwr said:


> be the change you wish to see in the world... create LEARCS


What was JARCS's functionality? I might* be able to create something like it, using the batch solver's code.

*Don't count on it though


----------

