Skip to content
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

Feature request: extend "Created new moves" #42

Open
DougCube opened this issue Nov 9, 2023 · 13 comments
Open

Feature request: extend "Created new moves" #42

DougCube opened this issue Nov 9, 2023 · 13 comments
Labels

Comments

@DougCube
Copy link

DougCube commented Nov 9, 2023

For convenience, when coming up with multi-stage solvers, I copy an existing TWS file and remove pieces which leaves some move lines empty (like "Move ABC\nEnd"). I keep those lines to avoid having to remove those moves from the SCR files. It allows such moves in the TWS and in the SCR, but does not allow things like ABC' or ABC2 in the SCR file whereas it would allow them when using the old TWS file. It would be nice to give the option of forcing the "Created new moves" feature to create those dummy moves. Similarly, for an order-2 MOVE, to accept MOVE' even though it's the same as MOVE.

The reason I want this is to keep using same SCR file with different TWS files. The problem is amplified when I have a large set of SCR files.

I also do hope that with the null moves, Twsearch properly ignores them from the scrambles and doesn't output any in its solutions.

@rokicki
Copy link
Collaborator

rokicki commented Nov 9, 2023 via email

@DougCube
Copy link
Author

DougCube commented Nov 9, 2023

> You can specify a move subset on the command line (as in, --moves U,R,F2) and twsearch will ignore the moves from the .tws file that are not in the move list; perhaps this feature will be useful for what you are trying to do?

I overlooked this feature to do what I want. It's perfect... as long as Twsearch can deal with parsing moves from the SCR file that are no longer in the TWS file, which I doubt.

@DougCube
Copy link
Author

DougCube commented Nov 9, 2023

I just tried the '--moves' option. It is not happy with undefined moves. So I'll try to define it as null move X, but then it won't take X' in the scramble. Can I define X' as a null move directly?

@rokicki
Copy link
Collaborator

rokicki commented Nov 9, 2023 via email

@rokicki
Copy link
Collaborator

rokicki commented Nov 9, 2023 via email

@DougCube
Copy link
Author

DougCube commented Nov 9, 2023

I should better explain what I'm trying to do. For a larger puzzle, I created a complete definition file, but it's too computationally intensive to solve a random state or the particular scramble I provided. I want to create a two-phase solver, so I copy the definition file and delete all of some type of piece, but it leaves some types of moves null. I want to run the new definition file on the same scramble, but the parser is okay with the null moves still being there but then if the scramble contains a previously "created move," the parser will error out.

My attempt at a two-phase solver for this puzzle is iterative -- it will require a lot of experimentation to balance the phases and pick which pieces to ignore and when. So I end up with dozens of variations of the full definition file, but I don't want to also have dozens of variations of what is essentially the same scramble file.

@lgarron lgarron added the cpp label Nov 9, 2023
@rokicki
Copy link
Collaborator

rokicki commented Nov 9, 2023 via email

@DougCube
Copy link
Author

DougCube commented Nov 9, 2023

Although '--solvedfile' might be useful for other people or for me in other efforts. I think what was mainly gating me was that there is just --nocorner, --noedges, and --nocenters. I want a general --nopieces so I could do something like '--nopieces CORNER,EDGE'. But in my case, the name of the piece type I want to omit is different.

I think with that ability I wouldn't have to touch the TWS file at all!

@rokicki
Copy link
Collaborator

rokicki commented Nov 9, 2023 via email

@DougCube
Copy link
Author

I just dug around and '--omit' is not in the README, also I tried '-h' and '--help' to see if it gives a more updated list of options, but those don't work either. So how was I supposed to know that option existed?! :)

@DougCube
Copy link
Author

> If you find this useful, I would almost certainly be willing to add a --solvedfile option that lets you specify (override) the "solved" definition in the .tws file with a different one.

Okay, now that I understand the usage-model a lot better I do think this would be a very useful feature. Because even with the '--omit' flag, I cannot do some of the things I want, such as, having indistinguish pieces for a stage.

@DougCube
Copy link
Author

Problem. Using the '--omit' doesn't work for my problem as I just found out. I expected it to work.

It suppresses or still avoids the "Created new moves" part of the execution and flags some illegal moves in my ScrambleAlg, which were allowed before adding the '--omit'.

@rokicki
Copy link
Collaborator

rokicki commented Nov 13, 2023

This is unfortunate. I understand why this happens, but I don't have an excellent fix for you. A workaround is, instead of using --omit, use identical pieces and orientation wildcards to "null out" the effect of a set while preserving the move semantics. If you do this, the moves should work as you expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants