• 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

JohnnyReggae

Member
Joined
Jan 21, 2015
Messages
557
Location
Cape Town, South Africa
WCA
2015BOSW01
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

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

mDiPalma

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

equalz.png
 
Last edited:

rice

Member
Joined
Mar 8, 2012
Messages
29
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

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

Member
Joined
Mar 8, 2012
Messages
29
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

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


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] :

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

harcsroux.png



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.

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

harcszzd.png



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

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

Colourful
Joined
Mar 26, 2006
Messages
6,121
WCA
2006BARL01
YouTube
Visit Channel
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

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

Member
Joined
Jul 8, 2014
Messages
831
Location
the planet
WCA
2013DIPI01
YouTube
Visit Channel
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

Member
Joined
Jul 8, 2014
Messages
831
Location
the planet
WCA
2013DIPI01
YouTube
Visit Channel
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

Not working after I type in "petrus"
 

crafto22

Member
Joined
Sep 4, 2015
Messages
302
Location
Canada
WCA
2014ADAM03
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

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

Member
Joined
Sep 4, 2015
Messages
302
Location
Canada
WCA
2014ADAM03
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
Thanks!
 

crafto22

Member
Joined
Sep 4, 2015
Messages
302
Location
Canada
WCA
2014ADAM03
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.
 
Thread starter Similar threads Forum Replies Date
A Software Area 10
Similar threads
JARCS doesn't work anymore?
Top