-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompose an algorithm in commutator notation #185
Comments
In my tests this looks pretty good! Can you let us know what your real
name is, and
maybe some background? (I like to know who I am working with.)
…-tom
On Tue, May 10, 2022 at 3:36 AM nbwzx ***@***.***> wrote:
I made a tool <https://nbwzx.github.io/commutator> to decompose an
algorithm in commutator notation these days. It is written in javascript
here
<https://github.com/nbwzx/commutator/blob/main/assets/dist/js/cube.js>.
Many 3-cycle and 5-cycle algorithms in a Rubik's cube can be decomposed
into commutators.
For example, input U' R U R2 D' R2 U' R' U R2 D R2
It will output:
[U' R U,R2 D' R2]
[U':[R,U R2 D' R2 U']]
[R2:[R2 U' R U R2,D']]
Also, it can decompose an algorithm in the addition of commutators.
For example, input R U' S U2 S R' S2 R U' R'
It will output:
[R U':[S,U2][U2:[S2,R']]]
and other 25 results.
For a cuber, especially a blind-solving cuber, these expressions can make
us understand algorithm structure better.
Twizzle <https://alpha.twizzle.net/> is really a comprehensive website,
so I want to add this tool to the "Alg Tools" part.
What do you think of this idea?
—
Reply to this email directly, view it on GitHub
<#185>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOLS4JPGFAHQJ344ETDU3VJI32LANCNFSM5VRECWYQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sure, you can know more about me in my personal website. |
Thanks for offering! I was playing around with your site a while back, and it it can certainly produce some useful results. So, I'd love to see this functionality in Twizzle. I'd have two main requests:
If 2. is too tricky, we can always enable the functionality for only a certain subset of puzzles. (It's alright if it doesn't work for all cases and puzzles, since we're still in alpha.) |
Thanks. This site is now faster and more powerful than it was in March.
|
Good to hear! Let me know how you get on.
Fortunately, we have an abstraction that will let you mostly ignore that. But we can worry about this later. |
I tried using the
|
@nbwcx: Those sound pretty specific to 3x3x3. Do you think you'd be able to write your own functions to provide that functionality until we're ready to generalize to bigger puzzles? |
My own functions in On the other hand, I am thinking about generalizing my code to a puzzle-agnostic canonicalization algorithm these days. Actually, I have already finished the cases for free groups. (see site here and code here) |
Remember, for some puzzles, the order of different moves might be different.
I'm impressed that your algorithm is extracting both commutators and
conjugations
in O(n^2).
I'd be happy to give up some generality (i.e., being able to slice and dice
the various
slice moves vs face moves) in order to get it integrated well. (Note that
on the 4x4x4
we have moves such as R, r, 2R, M, and even potentially 3r so generalizing
the slicing
and dicing of moves might be a bit challenging.)
…-tom
On Thu, May 12, 2022 at 5:32 AM nbwzx ***@***.***> wrote:
My own functions in commutator provide these, but the code in the alg
class doesn't seem to provide these functions specifically to 3x3x3. So I
faced these problems in rewriting the code about commutator using the alg
class. The most studied commutator is for 3x3x3 Rubik's cube with order 4.
I am thinking about whether the order can be used as a parameter in alg
class, like simplify("R U3",4)=R U' and simplify("R U3",3)=R.
On the other hand, I am thinking about generalizing my code to a
puzzle-agnostic canonicalization algorithm these days. Actually, I have
already finished the cases for free groups. (see site here
<https://nbwzx.github.io/commutator/free.html> and code here
<https://github.com/nbwzx/commutator/blob/main/assets/dist/js/free.js>)
—
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOLSYUHRXOA7VYGMBT2ALVJT26JANCNFSM5VRECWYQ>
.
You are receiving this because you commented.Message ID: <cubing/cubing.
***@***.***>
|
Now, I have generalized my algorithm to cases of any given order (See site and source code) (i.e. the request 2)
You can check it by expanding. |
I tried to contact @lgarron , but no response. I just want to talk in more detail about commutators so that we can get on this enhancement. |
Apologies, email is kind of an inconsistent way to reach me right now. 😬 Unfortunately, it would take me quite some work to see how we could integrate your algorithms into our code, since your implementation is still heavily based on algorithms as strings. I'm definitely interested, but I don't think I could promise to invest time particularly soon. 😕 |
Actually, I convert string to array first and the main part is based on array. For example, [[ 'R', 1 ], [ 'U', 1 ], [ 'R', -1 ], [ 'U', -1 ]] for R U R' U'. Array is better to handle than string. |
And I have integrate my algorithms into https://blddb.net. It is not difficult to import and use. |
I have rewrote |
I made a tool to decompose an algorithm in commutator notation these days. It is written in javascript here.
Many 3-cycle and 5-cycle algorithms in a Rubik's cube can be decomposed into commutators.
For example, input U' R U R2 D' R2 U' R' U R2 D R2
It will output:
[U' R U,R2 D' R2]
[U':[R,U R2 D' R2 U']]
[R2:[R2 U' R U R2,D']]
Also, it can decompose an algorithm in the addition of commutators.
For example, input R U' S U2 S R' S2 R U' R'
It will output:
[R U':[S,U2][U2:[S2,R']]]
and other 25 results.
For a cuber, especially a blind-solving cuber, these expressions can make us understand algorithm structure better.
Twizzle is really a comprehensive website, so I want to add this tool to the "Alg Tools" part.
What do you think of this idea?
The text was updated successfully, but these errors were encountered: