Git Product home page Git Product logo

sq12phase's People

Contributors

cs0x7f avatar jfly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lucasalfare

sq12phase's Issues

Adapt WCA metrics for solution length

Hey! I'm currently maintaining TNoodle and sq1 is causing us a headache, because it slows down our integration tests by a ton. The reason is that we still use the sub-optimal solver before your fix.

I understand that I can just cherry-pick your recent commits, but we still cannot use your optimal solver because of conflicts with the turn metrics:

  • Your solver counts each U and D face turn individually, so (1, 2) is actually 2 moves
  • WCA Regulation 12c4 requires that each (U, D) group counts as 1 move

I have considered a "hacky" solution where your program counts each U and D as 0.5 moves, but that doesn't work because (1, 0) / (2, 3) becomes 2.5 moves when it should be 3 per WCA.

Apart from this initial idea, I have failed to implement this metric myself because the code is too advanced for me ๐Ÿ™ˆ
Is there any chance you could implement 12c4 metrics either here directly or as a PR on our separate sq12phase clone over at https://github.com/thewca/tnoodle-lib ?

Thanks a lot for your help! :)

Certain puzzle states seem to break `getParity` method

When toying around with extremely simple puzzle states in tnoodle-lib, the optimal solver crashes with an ArrayIndexOutOfBoundsException right at https://github.com/thewca/tnoodle-lib/blob/master/sq12phase/src/main/java/cs/sq12phase/FullCube.java#L157

An example to reproduce this is (2, -4). I have used the following debug method to figure out the puzzle state:

int[] debugState() {
    int[] debug = new int[24];

    for (int i = 0; i < 24; i++) {
        debug[i] = pieceAt(i);
    }

    return debug;
}

For the above example, TNoodle yields the following "converted" FullCube output:
[1,2,3,3,4,5,5,6,7,7,0,1,12,15,15,14,9,9,8,11,11,10,13,13]

Upon further inspection, the initial error makes sense because the piece 1 (a corner that is 2 vertices wide) "wraps around" and thus makes cnt think it's a new piece. However, I am astonished that for > 100 random "long" scrambles, this problem does not occur and I can only forcibly reproduce it for extremely short scramble sequences.

I thus have two major suspicions:
(a) The getParity code acutally has a flaw
(b) The converter from TNoodle --> sq12phase is faulty, in which case I need input from either you or @jfly concerning https://github.com/thewca/tnoodle-lib/blob/master/scrambles/src/main/java/net/gnehzr/tnoodle/puzzle/SquareOnePuzzle.java#L244

Please advise how to proceed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.