h-docs

Search

Search IconIcon to open search

Solution Finder

Solution Finder, often referred to as sfinder, is a program created by knewjade, who’s also responsible for various other tools. It is the cornerstone of Tetris-related research such as for openers, loops, and perfect clearing.


Getting Started


Downloading

  1. Solution Finder can be downloaded from knewjade’s GitHub repo or from this direct download link.
  2. Once downloaded, extract the .ZIP file somewhere convenient. All examples used in this page assumes the sfinder.jar file is in C:\Users\hsterts\Documents\solution-finder-1.41\.

Customized solution finder with 180 spins

A lot of research is being done with modern 180 spins considered. Here is a direct download link to metallicLurker’s Jstris 180 spins .properites file that you can place in the /kicks/ folder to use when running commands.


Opening

  1. Solution Finder uses a command line interface (CLI). These are entered into a terminal, most commonly Command Prompt or PowerShell Terminal.

Opening Command Prompt and Setting Directories

  • Find where your downloaded sfinder.jar file is in a File Explorer.
  • On the window, type cmd into the address bar and press enter. This should open the command prompt with its directory already set.
  • You can also drag and drop the sfinder folder into an already-open command prompt (you can search for it and open it from the Start Menu). This will paste the path of that folder into the input. Preface it with cd.
  • You can also use cd to change directories; copy and paste the folder’s path in the terminal as cd C:\Path\ and it should work.

Opening PowerShell and Setting Directories

  • Find where your downloaded sfinder.jar file is in a File Explorer.
  • On the folder, hold shift and right-click to open the right-click menu, which should contain an option to “Open PowerShell Here”.
  • You can just use cd to change directories – copy and paste the folder’s path in the terminal as cd C:\Path\ and it should work.
  1. There are various ways to open the PowerShell Terminal, but the simplest way is to hold shift and right click somewhere on File Explorer in the folder where sfinder.jar is. Don’t select sfinder.jar while doing so.

This will open a PowerShell terminal with its directory already set to where your sfinder.jar file is. This is where you will be typing in your commands. A window will open, and it should have single line that looks like this:

1
PS C:\Users\hsterts\Documents\solution-finder-1.41\>

Usage

Every command line input starts with java -jar sfinder.jar <command>. The rest of it looks like --parameter <value> so the final command looks like:

1
java -jar sfinder.jar <command> --parameter <value> --parameter <value>

Command line inputs may vary between different sfinder commands:

CommandFunction
PercentOutputs the chances (sol%) of getting a perfect clear.
PathOutputs all perfect clear solutions.
SetupOutputs all the possible ways to build a specified setup.
RENOutputs all the ways combo (REN) can be continued.
SpinOutputs all the ways a T-spin can be made from a field.
CoverOutputs the chances (cov%) of building a given setup.
Util FigOutputs images based on entered fumens.
Util FumenModifies fumens based on entered operation.
Util SeqOutputs a list of queues from user input.

Here are various parameters that are universal between most commands:

  1. Tetfu refers to the fumen codes made from Fumen Editors. They are used to specify the field for each type of operation. Some commands take only one fumen input, but some can take multiple.
1
java -jar sfinder.jar percent --tetfu <fumen>
1
java -jar sfinder.jar cover --tetfu <fumen> <fumen> <fumen>
1
java -jar sfinder.jar percent -t <fumen>
  1. Pattern refers to the general structure of the queues being considered by sfinder. Since it’s one of the harder parameters to learn, patterns are discussed in its own page: --patterns.

Page Listing