HARCS (JARCS Replacement) - Cube Solver

Discussion in 'Software Area' started by mDiPalma, Dec 15, 2016.

Welcome to the Speedsolving.com. You are currently viewing our boards as a guest which gives you limited access to join discussions and access our other features. By joining our free community of over 30,000 people, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us and we'll help you get started. We look forward to seeing you on the forums!

Already a member? Login to stop seeing this message.
  1. JohnnyReggae

    JohnnyReggae Member

    332
    581
    Jan 21, 2015
    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
     
  2. CubingGenius

    CubingGenius Member

    240
    25
    Jul 3, 2016
    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?
     
  3. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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.

    [​IMG]
     
    Last edited: Jan 20, 2017
  4. JohnnyReggae

    JohnnyReggae Member

    332
    581
    Jan 21, 2015
    Cape Town, South Africa
    WCA:
    2015BOSW01
    Thanks for the help, can't believe .... once again that it was staring me in the face :)
     
  5. rice

    rice Member

    28
    0
    Mar 8, 2012
    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.
     
  6. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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.
     
  7. rice

    rice Member

    28
    0
    Mar 8, 2012
    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.
     
  8. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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

    [​IMG]


    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

    [​IMG]


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

    CubingGenius Member

    240
    25
    Jul 3, 2016
    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. :)
     
  10. Kirjava

    Kirjava Colourful

    6,122
    24
    Mar 26, 2006
    WCA:
    2006BARL01
    YouTube:
    snkenjoi
    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 likes this.
  11. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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.
     
  12. G2013

    G2013 Member

    734
    66
    Jul 8, 2014
    In the underground
    WCA:
    2013DIPI01
    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?
     
  13. G2013

    G2013 Member

    734
    66
    Jul 8, 2014
    In the underground
    WCA:
    2013DIPI01
    Not working after I type in "petrus"
     
  14. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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.
     
  15. G2013

    G2013 Member

    734
    66
    Jul 8, 2014
    In the underground
    WCA:
    2013DIPI01
    What I expected hahaha

    I guess I was just too anxious xD
     
    mDiPalma likes this.
  16. crafto22

    crafto22 Member

    303
    27
    Sep 4, 2015
    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.
     
  17. mDiPalma

    mDiPalma Member

    1,512
    284
    Jul 12, 2011
    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
     
  18. crafto22

    crafto22 Member

    303
    27
    Sep 4, 2015
    Canada
    WCA:
    2014ADAM03
    Thanks!
     
  19. crafto22

    crafto22 Member

    303
    27
    Sep 4, 2015
    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.
     
    BigGreen likes this.

Share This Page