ksolve+ v1.0 - general-purpose algorithm finder

Discussion in 'Software Area' started by qqwref, Oct 17, 2013.

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

    bilde Member

    14
    1
    Jul 9, 2015
    @ch_ts:

    This is exactly what I wanted, so really, thank you very much for taking the time to put this together for me! I really appreciate it. It would be nice to have the solver return non-optimal solutions too, however the solver already seems to already generate decent algorithms, as the ones I want are really just short RUL algorithms. Though now that you've shown me this, I'm really curious as to how you implemented this. Would you mind sharing the source code? I'm totally fine with you not wanting to either, I already appreciate this tons.

    Thanks again!

    Edit: My apologies to the moderators if this is getting a little off topic from ksolve+.
     
  2. Renox

    Renox Member

    38
    4
    Dec 12, 2015
    Australia
    Tried running ksolve+, but it didn't work? A window pops up very briefly, but nothing happens after that.
     
  3. Because ksolve is a command line program hence you can only use it when calling it from a terminal/command prompt using the synthax as described in the readme.txt.
     
  4. JustinTimeCuber

    JustinTimeCuber Member

    2,074
    157
    Aug 16, 2014
    Webster Groves, MO
    WCA:
    2013BARK01
    Me when trying to write a .def file:

    mind = blown

    but seriously can someone explain to me how to define orientation in non-trivial cases? 3x3 edges I sorta get, but for instance megaminx corners and edges. How do you define orientation?
     
    Last edited by a moderator: Aug 10, 2016
    WACWCA likes this.
  5. IQubic

    IQubic Member

    183
    1
    Nov 10, 2012
    Seattle, WA
    WCA:
    2014CASP01
    Does this program run on Linux?
     
  6. YTCuber

    YTCuber Member

    152
    11
    Jun 30, 2015
    @IQubic:
    You can run the file ksolve-master/html/simple-async.html after downloading from github, which is a browser version. Or try wine, a implementation of Windows on Unix.
     
  7. AlphaSheep

    AlphaSheep Member

    699
    209
    Nov 11, 2014
    Gauteng, South Africa
    WCA:
    2014GRAY03
    It took me a lot of sitting with my megaminx with a lot of confused turning to figure out. I'll try explain in a way that made sense to me.

    For faces other than U or D, you can observe that the effect of a a single one fifth turn on the two corners in the U/D layer is the same as a quarter turn on a 3x3. Since the inverse of a turn must undo the effect, we can say the same for the two corners brought into U/D by that turn. That leaves the one corner on the "equator zig-zag" (don't know what else to call it) as an unknown. Since the total corner twist on the entire puzzle must be a multiple of 3, you can work out that the orientation of the last corner can't be changed with a single fifth turn.

    With edge orientation, it's a little trickier. A face turn must flip an even number of edges, but since there are 5 edges per face, at least one edge must keep it's orientation. On a 3x3 orientation is specified relative to an axis that is defined by the line passing through the F and B centres. On a megaminx, you can define a similar axis that doesn't pass through centres, but passes through two corners. It's easiest to explain with colours, I think. Assuming you have a megaminx with the default colour scheme, and hold white on top, green on front. Then the axis for orientation goes from the front-most corner (green-turquoise-pale yellow) to the back-most corner (blue-yellow-light green). Then the following rules for figuring out edge orientation apply:
    • Turning a face that does not contain the axis corner does not affect edge orientation.
    • Turning a face that contains an axis corner flips 4 edges. The edge that is not flipped is the edge that is between the corner that moves out of the axis position and the corner that moves into the axis position. Or, the edge that stays on the equator zig-zag does not change orientation.
     
  8. xyzzy

    xyzzy Member

    177
    66
    Dec 24, 2015
    I don't think this leads to a consistent definition of EO for all 12 face turns. Let's say we set up our megaminx with DFL DFR' DFL' DFR2 F' DFR' F and ignore the corners. This is a 3-cycle of edges around the frontmost corner. If we perform an F move, then the F-DFR edge moves to the F-DFL position and is flipped, so the F-DFR edge must originally have been misoriented since it stays on the equatorial zig-zag. By symmetry, this also applies to the DFR and DFL moves, which means that all three edges in this 3-cycle are flipped, but that violates EO parity.

    More to the point, Cube Explorer's site shows a way of defining orientation that is guaranteed to be consistent.
     
  9. AlphaSheep

    AlphaSheep Member

    699
    209
    Nov 11, 2014
    Gauteng, South Africa
    WCA:
    2014GRAY03
    Looking at it again, you're right. I've came up with it about a year ago as part of an idea for an ZZ like approach to megaminx S2L (a terrible idea). Looking at it again now, I think I was on the wrong track trying to make it consistent with the common 3x3 definition of EO. Of course that doesn't matter at all for ksolve's purposes.

    I know about the cube explorer's way of defining EO, but I just never thought of applying it to megaminx.
     
  10. When I had a look at mega EO, I found that the only way get consistent EO is by using a ring of an even number of faces otherwise you can send an edge around the ring and you will get the edges the other way up.
     
  11. ViliusRibinskas

    ViliusRibinskas Member

    340
    4
    May 17, 2015
    Lithuania
    WCA:
    2015RIBI01
    YouTube:
    UCrZ8QzNfqji4lx7jAYHHbZw
    So I was trying to generate a 2x2x Leg-1 and it doesn't work I don't know why. I' using this: https://www.cubing.net/ksolve.js/ I used this scramble code or what its called:
    Scramble Leg-T4
    CORNERS
    1 2 3 4 5 7 6
    0 0 1 1 1 1 1
    End

    ScrambleAlg Leg-T4
    R' U' R U' F R2 F' R F R' F' D'
    End

    So why it doesn't work? Maybe the orientation vectors are wrong or something?
     
  12. Robert-Y

    Robert-Y Super Moderator Staff Member

    3,271
    60
    Jan 21, 2009
    England
    WCA:
    2009YAUR01
    YouTube:
    Robert271291
    It cannot read scrambles with moves that have not been defined :)

    D moves have not been defined (yet). So you'll need to add the definition of a D move to the definition window.
     
  13. ViliusRibinskas

    ViliusRibinskas Member

    340
    4
    May 17, 2015
    Lithuania
    WCA:
    2015RIBI01
    YouTube:
    UCrZ8QzNfqji4lx7jAYHHbZw
    Oh, I was stupid. What is the command to launch ksolve? In notepad readme file two symbols are missing.
     
  14. Robert-Y

    Robert-Y Super Moderator Staff Member

    3,271
    60
    Jan 21, 2009
    England
    WCA:
    2009YAUR01
    YouTube:
    Robert271291
    ksolve puzzle.def scramble.txt

    Replace puzzle.def and scramble.txt with your definition and scramble file names.
     
    ViliusRibinskas likes this.

Share This Page