cubing / cubing.js

🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
https://js.cubing.net/cubing/
GNU General Public License v3.0
232 stars 42 forks source link

[Twizzle issue] Incorrect GAP and Schreier-Sims permutation in PuzzleGeometry for icosamate #328

Closed cs0x7f closed 2 months ago

cs0x7f commented 2 months ago

Steps to reproduce the issue

  1. Open https://alpha.twizzle.net/explore/?puzzle=icosamate
  2. "Actions -> Schreier-Sims" or "Actions -> GAP"

Observed behaviour

  1. The group size obtained by Schreier-Sims algorithm is 3 times as the group size generated by 18 moves without icosahedron rotation (ended with "v"). However, for icosamate, all icosahedron rotations can be generated by 18 moves. According to my observation, the issue is due to that the restriction of center orientations (divided by 3) is broken in some icosahedron rotations.
  2. In the generated GAP file, Size(Group([M_Rv,M_Lv])); returns 972, which is larger than 60 (the size of the symmetry group of regular icosahedron)

🖼 Screenshots

No response

Expected behaviour

I haven't checked the logic of PuzzleGeometry in depth at the moment, but I'm guessing there might be a bug in the handling of center pieces for icosahedron rotations.

Browser & operating system

N/A

Additional info

No response

rokicki commented 2 months ago

This is confirmed; there's something really odd going on here. I'll investigate this week.

-tom

On Sat, Apr 20, 2024 at 7:41 AM Chen Shuang @.***> wrote:

Steps to reproduce the issue

  1. Open https://alpha.twizzle.net/explore/?puzzle=icosamate
  2. "Actions -> Schreier-Sims" or "Actions -> GAP"

Observed behaviour

  1. The group size obtained by Schreier-Sims algorithm is 3 times as the group size generated by 18 moves without icosahedron rotation (ended with "v"). However, for icosamate, all icosahedron rotations can be generated by 18 moves. According to my observation, the issue is due to that the restriction of center orientations (divided by 3) is broken in some icosahedron rotations.
  2. In the generated GAP file, Size(Group([M_Rv,M_Lv])); returns 972, which is larger than 60 (the size of the symmetry group of regular icosahedron)

🖼 Screenshots

No response Expected behaviour

I haven't checked the logic of PuzzleGeometry in depth at the moment, but I'm guessing there might be a bug in the handling of center pieces for icosahedron rotations. Browser & operating system

N/A Additional info

No response

— Reply to this email directly, view it on GitHub https://github.com/cubing/cubing.js/issues/328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOLS5YO35CEM2WWXOQ6LTY6J5CDAVCNFSM6AAAAABGQROOKGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TINJYGIYTEMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

rokicki commented 2 months ago

This should be fixed in commit afe36bf8d3faa2c0b7fd6c5bd8a2e7c3dae9684e; good catch! Turns out the skewb was also affected.