Skip to content

Commit

Permalink
Update parameter patterns.md
Browse files Browse the repository at this point in the history
copyediting
also added more ways to mitigate having duplicate pieces in bags
  • Loading branch information
Hillosanation committed Apr 1, 2023
1 parent 493daf1 commit b618109
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions content/sfinder/parameter patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body{display: flex; justify-content: center;}
.singlePage{width: -webkit-fill-available; max-width: 700px;}
</style>

The **--patterns** parameter for [[sfinder/|solution-finder]] is one of the harder parameters to understand.
The **\-\-patterns** parameter for [[sfinder/|solution-finder]] is one of the harder parameters to understand.
**Patterns**, in this case, is synonymous with **queues**, but potentially more broadly defined. This page is dedicated to providing a thorough explanation and examples on the various aspects and methods of specifying patterns.

It will be much easier (and useful) for users to understand the concepts of modern block stackers' [[7-Bag System]] which ties in closely to how patterns are defined. This page provides exercises that may require the reader to have sfinder, as it uses [[sfinder/sfinder util#seq|sfinder util seq]] to allow the reader to follow along. In standard sfinder syntax, write the following for the various given examples:
Expand All @@ -35,7 +35,7 @@ From bags, you can specify <u>how many pieces sfinder will pull from them</u> at
___
## Shortcuts
1. Writing ``*`` is the same as writing ``[TILJSZO]`` (a full bag).
- \***p7** is the same as **\[TILJSZO]p7**
- **\*p7** is the same as **\[TILJSZO]p7**
2. Writing `!` after a bag will <u>pull as many pieces as possible</u> from that bag.
- **\*!** is the same as **\*p7**
- **\[ILJO]!** is the same as **\[ILJO]p4**
Expand All @@ -45,10 +45,13 @@ ___
## Common Mistakes
1. **Incorrect Bags**: This won't run into an error similar to common mistakes #2 and #3, but is the most common mistake, sometimes even undetected. Make sure the bags and pieces you're using are correct.
- May include overlooking `!` after writing a bag.
2. **Not Accounting For Hold**: A field may require 7 pieces, so you may be inclined to define 7 pieces, but with hold you may be able to use up to 8 pieces. This may result in inaccurate results.
3. **Not Enough Pieces**: when using sfinder functionalities that attempt to reach a certain field e.g. [[sfinder/sfinder percent|sfinder percent]] or [[sfinder/sfinder setup|sfinder setup]], you need to specify enough pieces to fill the field specified.
- Error message:: ``Message: Should specify equal to or more than X pieces: CurrentPieces=Y``
2. **Not Accounting For Hold**: A field may require 7 pieces, so you may be inclined to define only 7 pieces, but with hold you may be able to use up to the 8th piece of a pattern. This may result in inaccurate results.
3. **Not Enough Pieces**: when using sfinder functionalities that attempt to reach a certain field (e.g. [[sfinder/percent|percent]] or [[sfinder/setup|setup]]), you need to specify enough pieces to fill the field specified.
- Error message: ``Message: Should specify equal to or more than X pieces: CurrentPieces=Y``
4. **Duplicate Pieces**: duplicate pieces won't work. Bags should only have one of each piece.
- **\[TIILJ]** would return an error: ``Duplicate 'I' pieces in [] [position=3char] [SyntaxException]``.
5. **"^" in Command Prompt**: The `^` symbol is a special character for command prompt. To avoid errors when using it, either enclose the text in quotation marks or write it twice `[^T]``[^^T]`
- Some people just decide to put parameters in quotation marks even in PowerShell to avoid these issues.
- Under normal play, duplicate pieces only appear at the beginning, so you wouldn't need to include them in the bag: `[TIILJ]` → `I,[TILJ]`
- For abnormal circumstances, you can use Marfung37's [ExtendedSfinderPieces](https://github.com/Marfung37/ExtendedSfinderPieces).
5. **Using "^" in Command Prompt**: The `^` symbol is a special character for command prompt. To avoid errors when using it, you can do either option:
- enclosing the text in quotation marks: `[^T]``"[^T]"`
- escaping the first `^` with another `^`: `[^T]``[^^T]`

0 comments on commit b618109

Please sign in to comment.