alg.cubing.net

Discussion in 'Software Area' started by Lucas Garron, Feb 23, 2014.

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. Lucas Garron

    Lucas Garron Super-Duper Moderator Staff Member

    Thanks! It seems you made an account just to post about this, so I appreciate you taking the time.

    I think I've talked about this earlier in the thread. For the time being, I believe this should be a (persistent) *user* option.

    I can't think of many cases where it's important to be able to specify this in the URL. In some cases (e.g. PLLs), perhaps it might be sensible to use a default based on other parameters, but in general I think a user option is still the best.

    Unfortunately, color schemes are (the only thing that) don't work properly yet.

    I do want to support this, but I also want something that scales to different cube sizes and puzzles. Roofpig's Cubexps are a start, but I haven't had time to work on this.

    I want to keep things as simple as possible, so the only notation right now is SiGN (with wide turns).
    I've considered adding slice turns like Rs (or even antislice turns Ra), but these are used infrequently.

    However, I am considering your last suggestion with parentheses: (R L') would animate as one move by default.
     
  2. Christopher Mowla

    Christopher Mowla Premium Member

    828
    4
    Sep 17, 2009
    New Orleans, LA
    YouTube:
    4EverTrying
    Hey Lucas,

    I was just wondering if a button for "remove comments" can be added.

    That is, once the button is clicked, alg.cubing.net will clear all comments on every line of the inputted algorithm string.
     
  3. Renslay

    Renslay Member

    1,715
    3
    Aug 1, 2011
    Hungary
    WCA:
    2005HANT01
    YouTube:
    Renslay
    I like the idea.

    Also: deleting not just the comments, but every gibberish the site cannot handle.
    For example, lot of people write the length of the segments without slashes, something like this:
    U R F2 B R (5)
    R U R' U2 R U2 R' (7)
    L' U2 L (3)
    ...
    and so on. Deleting those one by one can be a bit frustrating.
     
  4. Lucas Garron

    Lucas Garron Super-Duper Moderator Staff Member

    Done.

    Unfortunately, I don't know a magical way to do this. I'd rather do transformations that can be exactly defined.
    However, I *could* show the location of the first error, which I plan to implement some time.

    In your example, the first closing parenthesis would actually be the first invalid character, because "(5" could actually be part of a valid alg, e.g. "(5R)".
     
  5. Christopher Mowla

    Christopher Mowla Premium Member

    828
    4
    Sep 17, 2009
    New Orleans, LA
    YouTube:
    4EverTrying
    Thanks Lucas! I thought it would be pretty easy to implement!
     
  6. naliuj

    naliuj Member

    25
    0
    Feb 20, 2014
    Massachusetts
    WCA:
    2011ROSE04
    YouTube:
    JulianCubing
    Can the comments be a different colour than the algorithm? I'm using the site for a text ZZ tutorial I'm making. When I have something like this, it would be nice to have the two different colours.
     
  7. Lucas Garron

    Lucas Garron Super-Duper Moderator Staff Member

    Hopefully someday.
     
  8. Christopher Mowla

    Christopher Mowla Premium Member

    828
    4
    Sep 17, 2009
    New Orleans, LA
    YouTube:
    4EverTrying
    Bug report.

    Try the simplify feature on the move sequence " 2L L' ". It deletes them when it should obviously not make any change. This is the only error I know of regarding move cancelling, but I guess it wouldn't hurt to check all related possibilities.
     
    Last edited: Sep 10, 2014
  9. Lucas Garron

    Lucas Garron Super-Duper Moderator Staff Member

    Good catch! The simplify function assumes an older version of the parsed alg format.
    The resulting behaviour is simply incorrect, so I'll fix it right now.

    EDIT: Fixed.
     
    Last edited: Sep 10, 2014
  10. porkynator

    porkynator Member

    1,086
    93
    Oct 27, 2010
    Belluno, Italy
    WCA:
    2011TRON02
    YouTube:
    PorkyDays
    I don't know if this has already been reported, but R2 L2 is counted as 2 STM; shouldn't it be 1?
    same thing for any other slice move written as 2 outer layer moves.
     
  11. Stefan

    Stefan Member

    7,287
    12
    May 7, 2006
    WCA:
    2003POCH01
    YouTube:
    StefanPochmann
    No, it's two moves. Just like (R U R' U')6 is 24 moves, not zero.
     
  12. porkynator

    porkynator Member

    1,086
    93
    Oct 27, 2010
    Belluno, Italy
    WCA:
    2011TRON02
    YouTube:
    PorkyDays
    I'm afraid I can't see the analogy with your example.
    I have specified STM. Is R2 L2 2 STM as well?
    Also, I may not be as smart as you, but I'm sure I can count to 2.
     
  13. cubizh

    cubizh Super Moderator Staff Member

    596
    26
    Oct 2, 2011
    Portugal
    WCA:
    2014GOME07
    YouTube:
    cubizh
    I think the STM implementation of alg.cubing.net follows the wiki definition, more speficially in this particular example, the first paragraph.
     
  14. Stefan

    Stefan Member

    7,287
    12
    May 7, 2006
    WCA:
    2003POCH01
    YouTube:
    StefanPochmann
    It counts the moves, not some possible replacement for them. Maybe a better analogy would have been R R', which is correctly counted as 2 moves in every metric.

    R2 is one move, L2 is a second move. You did *not* write M2 (and that doesn't even have the same effect, as it's off by a cube rotation).

    You even said it yourself: "written as 2 outer layer moves".
     
    Last edited: Sep 12, 2014
  15. porkynator

    porkynator Member

    1,086
    93
    Oct 27, 2010
    Belluno, Italy
    WCA:
    2011TRON02
    YouTube:
    PorkyDays
    That's a better reply, thanks.
    I was expecting a different behaviour because I have used it a few times for posting solutions in The "Example Solve" Game: sometimes I try corners first solving focusing on HTM efficiency, but after writing the solution down I would also like to know how long the solution is in STM (but cancelling R2 L2 into M2, for example).
     
  16. Stefan

    Stefan Member

    7,287
    12
    May 7, 2006
    WCA:
    2003POCH01
    YouTube:
    StefanPochmann
    I'd consider it wrong for the program to do automatic "canceling" there, but it could be offered as another "simplify" functionality. I did this for 4x4 to optimize my solutions for Tom's 4x4x4 FMC, code is here but it's a hack:
    https://gist.github.com/pochmann/d79d582724e96a5d3add
     
  17. Lucas Garron

    Lucas Garron Super-Duper Moderator Staff Member

    Exactly my sentiments. I believe that metrics should be context-free: you count up each move, double everything in a commutator, etc. But nothing should depend on other parts of the algorithm that you're not looking at. This is easier because it leads to fewer subjective disagreements, and is easy to understand/implement in code.

    For example, this allows me to calculate the move count of an alg very easily and efficiently, no matter how many nested conjugates/commutator/move groups there are.
    Some day, alg.cubing.net could easily support algs that have nested conjgates and commutators with millions of total moves. The alg parser and the move counter would have no problem with this (but the animation needs to be updated).

    In addition R2 L2, I can think of many algs that have a *single* canceling slice, let alone a whole bunch on the same axis:
    [R, U] [U, R]
    R2 U2 U U R
    R x l'
    (R U)2 U' L
    [R U R2, R U R']
    [R2: F2] x2 [M D2, L2]'

    I think it would be a bad idea to try to define a clever way to calculate the "most efficient" move count for each of these, and then insist that we should use this by default. As Stefan suggests, the move count of the alg should be the total of all the moves *as written*. If you want to show that an alg has a lower move count when you write it another way, write it that other way.

    I actually take this to an extreme in one particular case: 3r counts as 1 move on 3x3x3. While I was originally leaning towards counting this as 0 moves (except for ETM), I think it's fair to call this 1 move on every cube size. This has the benefit that *all* algs have the same metrics on all cube sizes, and that more of the metrics make sense if we move to other puzzles (teraminx?). If you mean a rotation, you should write it as a *semantic* rotation (x), not as a wide turn.


    That said, I'd be happy to add a button to alg.cubing.net for "minimizing" algs in particular metrics.
    I don't have time, but if Stefan or anyone else wants to implement this, alg.js should make it easier to do this. (It would also be a lot more robust.)
     
  18. primarycuber

    primarycuber Member

    49
    0
    Aug 22, 2014
    Question: is there some special notation for 4x4 for turning only the inner slices (r/l)? r and l seem to be working like Rw and Lw.
    Do I have to write lL' for example or is there some other way?
     
  19. Stefan

    Stefan Member

    7,287
    12
    May 7, 2006
    WCA:
    2003POCH01
    YouTube:
    StefanPochmann
    2L

    And click "Notation" in the examples section for more.
     
    Last edited: Nov 12, 2014
  20. Christopher Mowla

    Christopher Mowla Premium Member

    828
    4
    Sep 17, 2009
    New Orleans, LA
    YouTube:
    4EverTrying
    Hey Lucas,

    I appreciate that you have started this project and have considered my suggestions in the past. :)

    I have yet another suggestion. I'm not sure if this was intentional or not, but did you intend your inverse function to do Inverse["F2"] = "F2'" instead of simply "F2"?

    I'm not asking you to change this, but, for the use of Cube Explorer, it doesn't recognize "F2'" as F2, for example.

    Therefore, if only it makes no difference to you, then could you just simply add a string replace command "2'"->"2" at the end of your inverse function?
     

Share This Page