• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

HARCS (JARCS Replacement) - Cube Solver

mDiPalma

Member
Joined
Jul 12, 2011
Messages
1,534
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):

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

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]

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

harcscontrols.png


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.

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

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.

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.

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
 
Last edited:
Joined
Apr 23, 2010
Messages
1,391
Location
Scotland, UK
WCA
2009SHEE01
YouTube
Visit Channel
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

Member
Joined
Nov 11, 2014
Messages
1,083
Location
Gauteng, South Africa
WCA
2014GRAY03
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.
 

pinser

Member
Joined
Feb 12, 2014
Messages
209
WCA
2016GOHT01
YouTube
Visit Channel
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

Member
Joined
Jul 12, 2011
Messages
1,534
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

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.
 

Artic

Member
Joined
Feb 26, 2013
Messages
385
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

Member
Joined
Sep 14, 2015
Messages
4
I tried to PM you, but I couldn't somehow
Here is the message :D

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

Member
Joined
Jul 12, 2011
Messages
1,534
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.
 
Last edited:

Artic

Member
Joined
Feb 26, 2013
Messages
385
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

Member
Joined
Jul 3, 2016
Messages
238
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

Member
Joined
Dec 18, 2016
Messages
7
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

Member
Joined
Jul 12, 2011
Messages
1,534
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?

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

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

Member
Joined
Jul 3, 2016
Messages
238
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.

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

Member
Joined
Jul 12, 2011
Messages
1,534
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)
 
Last edited:

CubingGenius

Member
Joined
Jul 3, 2016
Messages
238
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)

Thank you very much for this.

One question - what does cnmask mean? Colour neutral?
 

CubingGenius

Member
Joined
Jul 3, 2016
Messages
238
"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?
 
Thread starter Similar threads Forum Replies Date
A Software Area 10
Similar threads
JARCS doesn't work anymore?
Top