-
Notifications
You must be signed in to change notification settings - Fork 42
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
[cubing.js] incomplete or buggy experimentalSimplify() behavior #274
Comments
#231 found this issue on further investigation, let me to the right direction. would this be how to implement megaminx cancellation? There isnt much documentation on still not sure why example 1 fails, and my understanding is that example 3 hasnt been implemented yet as per this note. |
You found the right code! This is very experimental territory, though, because we don't yet know the final APIs for storing information about puzzles. For example, you can do this for 3x3x3: import { Alg } from "cubing/alg";
import { cube3x3x3 } from "cubing/puzzles";
new Alg("R R2").experimentalSimplify({
cancel: {
directional: "any-direction",
},
puzzleSpecificSimplifyOptions: cube3x3x3.puzzleSpecificSimplifyOptions,
}).log() But there isn't an equivalent for Megaminx yet.
What are you trying to do? For Megaminx with
Correct, this is a general problem we haven't tackled yet.
https://js.cubing.net/cubing/api/classes/alg.QuantumMove.html documents the class, but it's usually move convenient to use TypeScript types. Does your IDE show those? |
using I think what I was getting at was that I dont understand what a QuantumMove is, and how to customize the simplification interface PuzzleSpecificAxisSimplifyInfo {
areQuantumMovesSameAxis: (quantumMove1: QuantumMove, quantumMove2: QuantumMove) => boolean;
simplifySameAxisMoves: (moves: Move[], quantumMod: boolean) => Move[];
}
interface PuzzleSpecificSimplifyOptions {
quantumMoveOrder?: (quantumMove: QuantumMove) => number;
axis?: PuzzleSpecificAxisSimplifyInfo;
} probably for now there is no need for me to dive too deep, since setting QuantumMoveOrder fixed most of the issues. Maybe a documentation issue, since its hard to reach the conclusion of using that option. But mainly the only thing missing is certain same-axis move simplifications (ie S x U == x D) for simultaneous vis and better simplification, which hasn't been implemented. So this issue can probably be relabeled as a question and closed. |
Yeah, those interfaces aren't meant for you to interact with unless you're implementing a custom puzzle — they're a draft for the way A The issue comes with generalizing anything beyond a cube — almost every reasonable assumption is broken by an interesting puzzle. (And cuboids also break the assumption that the existence of Simplifying slices across rotations is definitely valuable for playback, since those happen in real solves. Do you have a use case in mind, and do you have any particular algorithm in mind for how to determine the "correct" simplification in all cases? Note that:
|
Hi, Im building an algorithm showcase website that uses cubingjs for visualizations and case images. here is the link to my current repo
I use shorthands for common triggers like sune and pll parity, and for visualization I convert the triggers into a string with the moves, and use
experimentalSimplify()
to have cancellations.Steps to reproduce the issue
the simplify function I use is configured like this:
I also have functions to convert triggers into algorithms but this is out of scope and unaffected by current cubingJS behavior.
Observed behaviour
Example 1
Example 2
Example 3
🖼 Screenshots
No response
Expected behaviour
Example 1
Example 2
In a megaminx context (existence of which I am not aware of)
In an NxN context
Example 3
Environment
node v17.8.0
cubingjs 0.35.19
package.json of current project
Additional info
There are 3 possible takeaways:
My implementation can be changed to produce correct output for the slice cases, and I hadnt found a correct way to do this.
This is a bug in the simplify code.
There isnt a way to simplify these kinds of puzzle-specific moves yet.
My guess is that its a mix of all of them, but I dont know! Which is why Im posting this issue.
The text was updated successfully, but these errors were encountered: