TreeSimplifier guide

Getting started

  1. Install TreeSimplifier from the download page and start it.
  2. Open the Settings tab. Under PioSolver engine, select the PioSolver solver engine program (not PioViewer), for example C:\PioSolver\PioSolver3-edge.exe, then Save settings. TreeSimplifier starts it briefly to confirm it is PioSolver 3.10 or later and that it is activated.
  3. In the TreeSimplifier License panel, click Register beta license. The license is active immediately and the red notice at the top of the window disappears.

Tabs

TabUse it toWhen
SettingsSelect your PioSolver, register the license, install the PioViewer plugin.First, once.
Flop PruningSimplify flop decisions in one solution or a whole folder.Start here.
Turn PruningSimplify turn decisions on every runout.On any solution, or on the results of flop pruning.
Transpose NodelocksCarry the simplified strategy back onto your original solutions.After turn pruning.
Convert SavesRe-save older .cfr files in the compressed 3.10 format. Nothing is solved.Any time, for old saves.
Job QueueRun, order, edit and duplicate jobs.After adding jobs.
ProgressFollow the running job, pause or stop it.While jobs run.

Flop pruning

The Flop Pruning tab: job, pruning method (Standard or Advanced, with its review options and Min reach %), node mode, prune levels up to, player, target node, output type, solve parameters, compression, system options, frequency thresholds and bet cap.

How a node is decided

At every flop node it visits, TreeSimplifier goes through four steps:

  1. It reads how often each bet size is used at the node.
  2. It removes the sizes used less often than your threshold, before any solving.
  3. For each remaining size, it builds a tree with only that size and solves it to your target accuracy.
  4. It keeps the size with the highest EV for the player acting, and saves the reduced tree, the locked original, or both.

A node with a single size and nothing removed is left as it is: there is nothing to decide. If every size is removed, the node becomes check-only. A node that no hand reaches on a board is skipped there, with nothing solved.

See it on a real board, with every number from the log: flop pruning example.

Pruning method

Pruning mode

Prune levels up to limits a BFS cascade to the first decisions of the flop: only OOP 1st action prunes r:0 alone, up to IP 1st action adds the nodes after a check or facing the first bet, and so on. Deeper nodes keep all their sizes. All prunes every flop decision.

With a folder, BFS cascade works even if the files have different trees: each file is read on its own. In Single node mode all the .cfr files of the folder must have the same tree structure.

Where results go

With Output left empty, results go to a pruned_flop folder next to your input, with pruned_flop_simple and pruned_flop_nodelock inside, and a log folder. Files already present in the output are skipped, so a stopped job can simply be run again.

Settings

SettingDefaultWhat it does
Path—A .cfr file (File…) or a folder (Folder…).
Selected file only / All .cfr filesAllWhether to process one file or every .cfr in the folder.
Output…/pruned_flopFolder for results. Empty uses pruned_flop next to the input.
Pruning methodStandardStandard or Advanced, above. With Advanced: what the queue does while a level waits for review, Confirm every level automatically and Min reach %.
Node modeBFS cascadeSingle node or cascade, above.
Prune levels up toAllBFS cascade only: the deepest decision pruned. Deeper nodes keep all their sizes.
PlayerBothPrune only the nodes where OOP acts, where IP acts, or both. Nodes of the other player are left untouched. Locked on Both in Single node mode.
Target noder:0Single node mode only. A PioSolver node ID such as r:0:c:b50: c is a check or call, b50 a bet or raise to 50 chips. Browse tree… opens a navigator to pick it: each node is written as actions with chips and percentages, as in PioSolver, for example Bet 58 · 25.2% → Raise 196 · 39.9%.
Output typeSimpleSimple saves the reduced tree with only the winning sizes, re-solved. Nodelock keeps your original tree with every size, locks it to the simplified strategy and solves it to accuracy. Both produces the two from one run.
Accuracy % pot0.3Target exploitability for every solve, as a percentage of the pot, as in PioSolver: 0.3 is 0.3% of the pot.
AlgorithmautoThe PioSolver solving algorithm: auto (the same as v4_small), v4_small, v4_large, pio_cfr or original_pio.
Backup algorithmoriginal_pioUsed only when the primary algorithm runs out of memory. Empty for none.
Timeout (s)0Upper limit per solve (0 = no limit).
Compression precision / level11 / 11Settings of the compressed save format introduced in PioSolver 3.10: precision 6–16, level 1–21. They trade file size against saving time.
No compressionoffSaves uncompressed, as before PioSolver 3.10.
CPU affinityemptyCores the solver may use: empty for all, or 0-7, 0,2,4.
Keep temporary filesoffKeeps the per-size trees solved during the comparison.
Save log to fileonWrites the job log to the output's log folder.
BET threshold0.05Betting sizes used less than 5% are removed.
RAISE threshold0.02Raise sizes facing a bet used less than 2% are removed.
Bet cap4At this bet/raise level on the flop only all-in remains (0 = no cap). Turn sizes are never capped. Not applied in Single node mode.

Advanced flop pruning

The review table of an Advanced flop level: boards grouped by texture, one column per bet size with original and simplified frequency and EV, the best EV framed in green, the chosen size, the EV given up, the colour legend and the options at the bottom.

The standard method finishes one file before it opens the next, and keeps on each board the size with the best EV on that board alone. Similar boards can therefore end with different sizes, for EV differences smaller than the accuracy of the solves. The Advanced method prunes the same node on every board first, shows you one table for that node, and lets you choose the size kept on each board: give the same size to similar boards, or simply pick a different size where you prefer it, even if it is not the best one. Then it moves to the next node.

The solver work is the same as in the standard method: the same sizes are tested on each board, with the same thresholds, and each candidate tree is solved from scratch. If you confirm every level at its best-EV sizes, the result is the standard method's.

Start an advanced job

  1. In the Flop Pruning tab, under Pruning method, choose Advanced (one node at a time on all boards, with review). Use a folder with several boards and Node mode BFS cascade.
  2. Choose what the queue does while a level waits for your review: Hold the queue (the default: right when the next jobs use this job's results, such as turn pruning and transposition) or Run the following jobs.
  3. Set Min reach % (default 0.5). On a board where fewer hands than this reach the node, the node is left as it is, with nothing solved. With 0, only the nodes that no hand reaches are left out.
  4. Add the job to the queue and run it. When a level is ready TreeSimplifier plays a sound, flashes its taskbar button and opens the review table.

Every tested tree is kept in an advanced folder inside the output, so a size can be changed later without solving it again. The final results go to pruned_flop_simple and pruned_flop_nodelock, as with the standard method.

Levels

A level is one exact node on every board that reaches it, and is named by whose decision it is: OOP · 1st action at r:0, IP · 1st action after a check or facing the first bet, then OOP · 2nd action, and so on (OOP1, IP1, OOP2 in short). Boards that kept different sizes before a node are at different nodes afterwards, so facing a 25% bet and facing a 98% bet are two levels with two tables: sizes are never compared across different lines. Each table also shows its line in sizes, for example after OOP B25.

A level waits until every board that will reach its node is ready, so a node is reviewed once. Levels ready at the same time are solved one after the other and then reviewed one after the other.

The review table

One row per board, one column per size. Each cell shows three lines:

Under each board, original EV is the EV of the player acting at the node in your original solution. The last column, EV given up, says how much the kept sizes lose against the original (all levels so far) and, when you keep a size other than the best, against the best one. The PioViewer icon next to a board opens the tree the level starts from; the icon next to a tested size opens the tree solved with that size.

The legend above the table explains the colours:

MarkMeaning
Light teal backgroundThe size kept on the board.
Green borderThe best EV on the board. It does not depend on your choice or on the tolerance.
Light grey backgroundA size not tested on this board (below the threshold). Click it to queue a test.
Cream backgroundAn extra test you asked for, not solved yet.
Yellow / very light yellow backgroundA board that had an extra test: yellow for the last round of extra tests, very light yellow for an earlier one.
Red textA regret above the Regret tolerance.

Choose, test and confirm

Run overview and changing a bet size

The Run overview of an Advanced flop job: the size in use on each board at the opening decision, and the list of levels with their node, line, status, number of boards and maximum regret.

Run overview… (in the queue, or right-click the job → Advanced flop pruning) shows, one row per board, the sizes in use at the two opening decisions, and below a list of every level with its node, its line and its status.

The overview buttons do not work while the job is solving: use them while it waits for a review, or with the job stopped.

Turn pruning

The Turn Pruning tab with Specific turn nodes selected: two turn nodes chosen with Browse tree, runout, player, bet sizes kept, frequency thresholds, solve parameters, compression and system options.

Simplifies turn decisions on every runout. Each turn subtree is extracted and solved in a second PioSolver instance, the candidate sizes are compared there, and the winning strategy is locked into the full tree. Results go to pruned_turn next to your input unless you choose another folder.

See it on a real board, card by card: turn pruning example.

Execution modes

ModeScope
Fully automaticFinds every flop line that reaches the turn, then prunes every turn node of those lines, on every runout.
Specific turn nodesThe turn nodes you tick, from one or more flop lines, on all runouts or on a single card.

Every mode works on the selected file, or on every .cfr file of the selected folder. In Fully automatic mode the files of a folder can have different trees: each file is read on its own. With Specific turn nodes all the .cfr files of the folder must have the same tree structure.

The Select turn nodes window: flop lines with their turn nodes in short form and their node IDs, four turn nodes ticked on two flop lines, Select all, Clear, Expand and Collapse.

Browse tree… opens the first file of the folder and lists every flop line that reaches the turn and, under each, its turn nodes. Lines and nodes are written in short form: X check, C call, B bet, R raise, in % of the pot, for example B25 - R58.9 - C, and X - B70 · OOP to act for a turn node. Click a turn node to tick it, or a flop line to tick all its nodes. The ticked nodes of each flop line are pruned in the order of its BFS cascade, on every runout or on the card set in Runout. After each runout the turn of that runout is solved at the subtree accuracy; there is no final solve of the whole tree. A ticked node missing from a file is reported in the log.

In Fully automatic mode the flop strategy is locked once the turn decisions are locked, and one final solve of the whole tree is run at the Final solve accuracy. The flop nodes are not re-solved around the new turn strategy.

Settings

SettingDefaultWhat it does
Path / Output…/pruned_turnA .cfr file or a folder. Empty output uses pruned_turn next to the input.
Selected file only / All .cfr filesAllWhether to process one file or every .cfr in the folder, in every execution mode. File… and Folder… set it.
PlayerBothPrune only the nodes where OOP acts, where IP acts, or both. Locked on Both with Specific turn nodes, where you pick the nodes.
Bet sizes kept1 sizeHow many bet sizes a pruned turn node keeps: 1, 2 or 3. With 2 or 3, every pair or group of three among the sizes above the thresholds is solved and the best one is kept, so there are more solves per node. If fewer sizes reach the thresholds, those are kept.
BET / RAISE threshold0.05 / 0.02Turn betting sizes used less than 5%, and raise sizes facing a bet used less than 2%, are removed before solving. If no size reaches the threshold the node is left as it is, except a bet node with a single size, which becomes check-only.
FLOP PATH threshold0.02Flop lines taken less often than this are skipped: their range is too thin to be worth pruning.
Turn subtree accuracy % pot0.1Accuracy for each subtree solve.
Subtree timeout (s)60Limit per subtree solve (0 = none).
Final solve accuracy % pot0.3The single final solve of the whole tree (fully automatic only).
Final re-solve timeout (s)0Limit for that final solve (0 = none).
Apply upstream nodelocks to subtreesonA subtree starts at the turn card. When the node being pruned comes later in the turn, for example IP's decision after OOP checks, the turn decisions before it may already be nodelocked in the full tree, by an earlier step of the cascade or by you. This option copies those nodelocks into the subtree, so the node is reached with the same ranges as in the full tree and the sizes are compared on the play that will really happen. Turned off, the subtree re-solves those earlier decisions freely and its EVs can differ from the full tree.
Subtree algorithmautoAlgorithm for turn subtrees, with the same choices as in Flop pruning.
Main tree algorithm / backupauto / original_pioAlgorithm for the full tree, and the fallback if it does not fit in memory.
Compression / No compression11 / 11, offAs in Flop pruning.
CPU affinityemptyAs in Flop pruning.
Workers1Parallel solver instances, each working on its own files. Only used in Fully automatic mode. With 1, files are processed one at a time. Estimate worker count samples your files and recommends a number for the RAM currently free.
Keep solved subtrees for inspectionoffKeeps every solved subtree in subtree_debug_<board>. Warning: this can write a very large number of files and use a lot of disk space.
Save log to fileonWrites the job logs to a log folder in the output, one subfolder per board.

Transpose nodelocks

The Transpose Nodelocks tab: simplified and original solution folders, Check folder matches, solve parameters and final save type.

Moves the simplified strategy back onto the original solutions. For each board it reads every flop decision and every locked turn decision from the simplified solution, applies them as nodelocks to the matching file in the original folder, then solves to the chosen accuracy and saves. Decisions are matched by action, and sizes absent from the simplified tree are set to zero frequency.

Why it exists. Transposition is for when you need the simplified strategy inside your original trees: PioViewer's Flop Aggregation, aggregation reports, the Hand History Generator, the PioViewer Trainer, or any other tool that needs the same tree structure in every file. It matters mostly after flop pruning: a reduced flop tree really drops the other sizes, so each board ends up with a different tree, while turn pruning locks the strategy into the full tree and keeps its structure. Transposing locks the simplified strategy onto the originals, with the removed sizes at zero frequency, so every file has the same tree again.

  1. Select the Simplified solution folder (usually a pruned_turn folder).
  2. Select the Original solution folder.
  3. Click Check folder matches to see which boards pair up before you queue anything.
  4. Leave Output empty to write to pruned_final in the original folder.

The log goes to a log folder in the output, and the script.txt of the subset is copied next to the results.

Convert saves

The Convert Saves tab: single or multi-folder mode, source and destination, save format, delete and move-back options, compression and workers.

Re-saves older .cfr files in the compressed PioSolver 3.10 format. Nothing is solved: each file is loaded and saved again. The log goes to a log folder in the source folder.

SettingDefaultWhat it does
Formatno_riversno_rivers and no_turns save a truncated, smaller tree. full keeps every street and only compresses.
Skip files already presentonLets an interrupted conversion continue where it stopped.
Delete original after conversionoffRemoves each source file once its converted copy is saved.
…then move compressed files backoffWith the option above, converts in place: the compressed files replace the originals and the destination is removed.
Workers8Parallel solver instances. About 1 GB of RAM each for no_rivers. The disk is usually the limit. 12–16 on a fast SSD.
In-place conversion replaces your files

With both delete and move-back ticked, the old saves are gone once each file is converted. Try it on a copy first.

Job queue

The Job Queue: flop jobs with the Advanced method, one waiting for review, a transposition and a turn job, with the Review level, Run overview and Logs buttons.

All job types share one queue and run in order, one at a time. Each row shows the job's name, type, status, progress with its percentage, mode, the folder it works on and when it was created.

Select several jobs with Ctrl-click or Shift-click: Run selected, Reset to pending, Duplicate job, Remove, Up and Down then act on all of them.

ButtonWhat it does
Run pending / stoppedRuns every job not yet completed.
Run selectedRuns the selected jobs, in queue order.
Up / DownChanges the order.
Edit jobOpens the job in its tab. Change the fields, then click Apply changes to job.
Duplicate jobCopies jobs, for example to run the same settings on another folder.
Reset to pendingQueues finished or failed jobs again.
Remove / Clear completed / errorsTidies the list. Result files are not touched.
Logs…Opens the logs of the selected flop or turn job, one row per board and run. Type in Board to filter: a file name, part of it, or just the ranks (AKQ finds every A-K-Q board). The selected row shows its part of the log; Open whole log opens the file.
Review level… / Run overview…For an Advanced flop job: open the level waiting for review, or the run overview. See Advanced flop pruning.

Right-click a job for the same actions and to open its folders: Open source folder, Open results folder and Open log folder. A folder the job has not created yet is reported instead of opened.

The Selected job details panel shows every setting of the selected job. The queue is saved automatically after every change and restored when the app starts.

Progress, pause and stop

The Progress tab: Pause and Stop, current status with node, bet sizes and exploitability, estimated time left, progress bars and the live log.

The Progress tab shows the job and file being worked on, the node and bet size being tested, the current exploitability, the elapsed time, and the live log. Use Save… to keep the log. Progress bars appear for the counters the running job actually uses: files always, then flop nodes, runouts and turn nodes as the job reaches them, and the solve bar for every job that solves.

PioViewer plugin

The PioViewer plugin lets you prune the turn or river node you are looking at in PioViewer.

Install and connect

  1. In Settings, make sure the PioSolver executable is the one PioViewer uses, then click Install Tree_Simplifier Plugin in PioViewer.
  2. Restart PioViewer. A Tree_Simplifier menu appears.
  3. Choose Tree_Simplifier → Connect to Tree_Simplifier.
  4. Close and reopen PioViewer, then open or solve your tree as usual.

Prune a node

Select a turn or river decision node, then choose:

MenuWhat it does
Tree Pruning → 1 Size OptimalTests every size at this node on this runout and locks the one with the highest EV for the player acting.
Tree Pruning → 2 Size OptimalTests every pair of sizes and locks the best pair. Nodes with two sizes or fewer are skipped.
Tree Pruning → 3 Size OptimalTests every group of three sizes and locks the best one. Nodes with three sizes or fewer are skipped.
Tree Pruning - all runouts → …The same, repeated for the same action line on every card of that street.

Flop nodes are not pruned from PioViewer: use the Flop pruning tab. Subtree accuracy follows PioViewer's own turn and river recalculation accuracy settings. Solutions opened with PioViewer's Fast load are loaded in full before pruning. With all runouts the tree is prepared once, at the first card.

Plugin settings

In Settings → Relay pruning parameters: bet and raise thresholds (default 0, keep every size), the subtree solve timeout (default 60 s), whether to save the relay log in Tree_Simplifier_logs next to PioSolver (on by default) and whether to keep temporary subtrees. They apply from the next command, with no need to reconnect. Open log folder opens Tree_Simplifier_logs.

Settings

The Settings tab: PioSolver engine, TreeSimplifier License panel with an active beta license, relay pruning parameters and the PioViewer plugin buttons.

License

TreeSimplifier is tied to your PioSolver license: as long as you have access to that license, you have access to TreeSimplifier.

Flop pruning example

PioViewer, original solution on AsKs3h: at the root OOP bets 225, 161, 115, 58 or 28, or checks.
The original solution: at the root OOP mixes five bet sizes and a check.

1. Read the frequencies

How often OOP uses each size at the root:

ActionFrequencyThreshold 5%
Bet 225 (98%)11.3%kept
Bet 161 (70%)1.7%removed
Bet 115 (50%)10.1%kept
Bet 58 (25%)15.0%kept
Bet 28 (12%)49.5%kept
Check12.4%always kept

The 70% bet is below the threshold and is removed before any solving.

2. Solve one tree per size

Each of the four sizes left gets its own tree, where OOP can only check or bet that size, solved to the target accuracy. Then the EV of OOP is compared:

Only size at the rootEV of OOP (chips)
Bet 225 (98%)135.000
Bet 115 (50%)135.496
Bet 58 (25%)135.207
Bet 28 (12%)134.290

The 50% bet has the highest EV and is kept.

After flop pruning

PioViewer after flop pruning, nodelock output: at the root OOP bets 115 or checks; every other size is at 0%.
The nodelock output: at the root OOP bets 50% pot or checks.

This is the result of flop pruning saved as Nodelock: the original tree, with all its sizes still there, locked to the simplified strategy (PioViewer shows LOCKED).

ActionBeforeAfter
Bet 225 (98%)11.3%0%
Bet 161 (70%)1.7%0%
Bet 115 (50%)10.1%50.7%
Bet 58 (25%)15.0%0%
Bet 28 (12%)49.5%0%
Check12.4%49.3%

Turn pruning example

The same solution after flop pruning, on the turn.

Depending on the settings, TreeSimplifier simplifies the turn strategy on every turn node or on a single one, on every runout or on one card. For every turn node and card, TreeSimplifier extracts the turn subtree, from the turn card to the end of the hand, and solves it in a second PioSolver instance, once for each candidate size. The winning strategy is then locked into the full tree.

Turn: 9♣

PioViewer, flop-simplified solution, turn 9c after a flop bet of 50% and a call: OOP bets 322, 230 or 115, or checks.
The flop-simplified solution on the 9♣: OOP mixes three bet sizes and a check.

1. Read the frequencies

On the 9♣, OOP bets:

ActionFrequencyThreshold 5%
All-in 7750.0%removed
Bet 322 (70%)27.3%kept
Bet 230 (50%)4.3%removed
Bet 115 (25%)14.3%kept

2. Solve one subtree per size

Two sizes are left. The turn subtree on the 9♣ is solved twice, once where OOP can only check or bet 70% pot, once where OOP can only check or bet 25% pot:

Only size on the 9♣EV of OOP (chips)
Bet 322 (70%)225.431
Bet 115 (25%)223.593

3. Lock the winner into the full tree

The 70% bet wins. Its strategy from the subtree is nodelocked on the 9♣ node of the full tree.

The same steps are repeated on every other turn card.

After turn pruning

PioViewer after turn pruning, turn 9c: OOP bets 322 or checks; the other sizes are at 0%.
The 9♣ after turn pruning: OOP bets 70% pot or checks.

All 49 turn cards

Size keptTurn cardsCards
Bet 322 (70%)2♣ 2♦ 2♥ 4♣ 4♦ 4♥ 5♣ 5♦ 5♥ 6♣ 6♦ 6♥ 7♣ 7♦ 7♥ 8♣ 8♦ 8♥ 9♣ 9♦ 9♥ T♣ T♦ T♥ J♥ Q♣ Q♦ Q♥ K♥29
Bet 230 (50%)3♣ 3♦ 4♠ 5♠ 6♠ 7♠ 8♠ 9♠ J♣ J♦ J♠ Q♠ K♣ K♦ A♣ A♦ A♥17
Bet 115 (25%)3♠ T♠2
No size above 5%2♠: the node is left as it is.1
PioViewer strategy comparison of every turn card before turn pruning: on most cards OOP mixes several bet sizes.
Before turn pruning: OOP strategy on every turn card.
PioViewer strategy comparison of every turn card after turn pruning: on each card OOP bets one size or checks.
After turn pruning: on each card one bet size and a check.

All three sizes still appear across the runouts, but never together: on each card OOP has one size and a check, chosen by EV for that card. That is a strategy you can study card by card, and it still keeps the solver's reasons for betting bigger or smaller on different turns.