Skip to main content

Changes in UPI 2 -> 3

New in 3.10

  • New default algorithm. The Pio 4.0 family is added: v4_small, v4_large. set_algorithm now accepts these in addition to pio_cfr and original_pio. The default algorithm is now v4_large (and auto resolves to v4_small); previously the default was pio_cfr. list_algorithms reflects the new set. See set_algorithm.
  • Algorithm can now be changed after a tree is built. The new rebuild_tree command rebuilds an existing tree to the currently selected algorithm (and rebuilds forgotten streets of truncated saves). estimate_rebuild_tree reports its memory needs.
  • rebuild_forgotten_streets and estimate_rebuild_forgotten_streets were removed — they now print an error pointing to rebuild_tree. Migrate to rebuild_tree / estimate_rebuild_tree.
  • Saves are compressed by default. dump_tree now compresses output unless you pass the new no_compress token. New set_compression_precision and set_compression_level tune the compressed output, and check_tree_health verifies a save file's integrity.
  • Activation via file. A <version_name>.piokey file next to the binary is read for the activation key instead of prompting on stdin (see Activating / deactivating licence).

New in 3.0

3.0 UPI provides no breaking changes to the UPI. Any code working with the 2.0 solver should mostly work with the 3.0 solver with minor exceptions.

The new functionality in the 3.0 are display suits isomorphisms (controlled by set_display_iso etc.), EV incentives and fast loads.

Fast loads in 3.0

The 3.0 solver has an option to load saves in fast mode, which means that the solver lazily reads data from the disk as needed making the basic operations (load_tree, calc_ev etc. ) very fast even on large saves. However that comes at the price that some functionality doesn't work without explicitely loading the full tree.

If your workflow depends on this functionality you have to either load tree with full argument or call load_all_nodes before performing those operations.

Breaking changes in UPI 1.10 -> 2

Overview

Listed below are changes that could break existing client code and not all changes between 1.x and 2.x.

End strings

PioSolver 2.x+ behavior

The client is expected to call set_end_string at the start of communication and then output from all commands will end with specified END string.

If the set_end_string command is not called then END string is never shown.

> set_end_string END
set_end_string ok!
END
> is_ready
is_ready ok!
END

PioSolver 1.x behavior

Some commands are single line (the result is always a single line) and some are multi-line (the result is many lines terminated with END).

> is_ready
is_ready ok!
> calc_results
EV OOP: 132.353
EV IP: 47.647
OOP's MES: 331.413
IP's MES: 247.089
Exploitable for: 199.251
END

set_strategy

PioSolver 2.x behavior

set_strategy takes as an argument N * 1326 floats where N is the number of children and each block of 1326 numbers denotes strategy for subsequent child.

set_strategy r:0 <1326 floats> <1326 floats> <1326 floats>

PioSolver 1.x behavior

In PioSolver 1.x the client is required to call set_strategy N times each time with 1+1326 arguments, where the first argument was an index of a child node and following 1326 floats were strategy.

set_strategy r:0 0 <1326 floats>
set_strategy r:0 1 <1326 floats>
set_strategy r:0 2 <1326 floats>

set_board, show_categories

PioSolver 2.x behavior

All commands which expect board as an argument require that cards are not separated by space.

> set_board AcAdAh
set_board ok!
END
> set_board Ac Ad Ah
ERROR: set_board incorrect or missing argument
END
> show_categories Qc8c7d
<numbers>
<numbers>
END
> show_categories Ac Ad Ah
ERROR: show_categories incorrect or missing argument
END

PioSolver 1.x behavior

set_board and show_categories expect board as N separated cards.

> set_board Ac Ad Ah
set_board ok!
> set_board AcAdAh
ERROR: set_board incorrect or missing argument
> show_categories Ac Ad Ah
<numbers>
<numbers>
END
> show_categories AcAdAh
ERROR: show_categories incorrect or missing argument