Save Minimals
Save Minimals
Save minimals are strict minimals, but saved pieces are prioritized. That means the program would rather settle for a 3-solution set that has 100% Save T over a 2-solution set that has 100% Save O (if you tell it to do so).
The program currently being used can prioritize multiple saves. If you ask for save T then O minimals, the solution set will maximize save T before finding solutions with the next specified save, and so on.
Solution Covers | |||||
---|---|---|---|---|---|
Solution A (Saves O) | |||||
Solution B (Saves T) | |||||
Solution C (Saves T) | |||||
Solution D (Saves O) | |||||
Solution E (Saves T) |
>
Saves | |||||
---|---|---|---|---|---|
Finding Save Minimals
Save minimals are currently being found using Marfung37’s PC-Saves-Get program. It requires Python3 and NodeJS and will work off of sfinder’s Path Command the same way strict minimals do.
Downloading Python3:
Go to the Python3 download page. It should be a straight-forward installation.
- When installing, make sure that the option to
Add python.exe to PATH
is enabled during installation.
Downloading NodeJS:
Go to the NodeJS download page. It should be a straight-forward installation.
- When installing, make sure that
NodeJS
andnpm
are added to PATH. This appears in the Custom Setup step of installation.
Installing dependencies:
In a terminal, enter the following separately
pip install argparse
for parsing input parameters.npm install tetris-fumen
for working with fumens.npm install -g sfinder-strict-minimal
for generating minimals.
Creating the files that sfinder-strict-minimal works off of:
Solution finder’s Path Command is used to produce a .csv
file that is used to find minimals. The sfinder command is identical to a normal path file, but you must specify --format csv
(-f csv
) and --key pattern
(-k p
).
Using PC-Saves-Get:
The commands for the program is structured similar to sfinder. The following explanations are excerpts of important parameters from the official documentation.
|
|
- The
--wanted-save
or-w
parameter details the saves you wish to get from the program. More on how to use this parameter later. - The
--pieces
or-p
parameter details the pieces being used. It should always be the same as what you used in the sfinder command when generating thepath.csv
file. - The
--best-save
or-bs
option prioritizes the first defined save before moving onto the next. For making minimals, always include this in the command. It doesn’t require a value, simply having it in the command is already enough. - The
--solve
or-s
parameter specifies the type of output. This guide uses its default value which is--solve minimal
but it’s notable that you can use--solve unique
to get all saves for a certain save if you want.
-w
Usage and Examples:
For most use cases, all you need for specifying wanted saves are:
-w "I,LS,LSZ"
a plain list of saves you wish to get. These are prioritized according to what’s written first.- If the path.csv file saves more pieces than specified in the
-w
parameter, it’ll find all saves that include those pieces:-w "I"
may matchTILJ
,ISZO
,ILSZ
etc. while-w "LSZ"
may matchTLSZ
,LSZO
, etc.
- If the path.csv file saves more pieces than specified in the
-w "!O"
the “NOT” operator (!
). It negates the given specification.- As an example, using
-w "!O"
will matchTISZ
,LJSZ
, etc.– any save that does not contain O.
- As an example, using
-w "S||Z"
the “OR” operator (||
). It joins two or more saves into a single item, removing prioritization between them.- As an example, using
-w "T,O"
may find a 3-solution set that saves 100% Save T, while-w "T||O"
may find a 2-solution set that saves 50% T and 50% O.
- As an example, using
Example Path and Filter Commands
Here's an example run on how to get save minimals starting from generating the path file. We'll be getting the Save O minimals for a three-piece 2nd PC setup. This setup in particular has 100% Save O potential.
Don’t forget -f csv
and -k p
. Take note of the -p
parameter as this will be also used in the filter command. This should create a file in the /output/
folder named path.csv
.
|
|
From this you can already find minimals. Don’t forget -bs
and to re-use the -p
parameter that was used in the path command.
|
|
The resulting minimals should be the following:
The setup also has a 42.46% chance for saving T, so here’s a second example filter command:
|
|
The resulting minimals should be the following. If you double-check with cover, this set does max out the setup’s potential 42.46% save T before filling in the rest of the missing cover with save O.