yatzy-solver
Exact solver, rules engine, simulator and data exporter for Scandinavian Yatzy and American rules (Yahtzee-compatible): the optimal expected final score of every decision in every situation.
It reproduces the published optimal values (American rules 254.5896; Scandinavian Yatzy 248.4399894 under its stated rules) and checks itself against an exact brute-force solver.
use ;
let v = scandinavian; // or Variant::american()
let solver = build; // a couple of seconds on all cores
let sit = v.parse_situation.unwrap;
for o in solver.option_values.unwrap
Values are expected remaining scores. See the repository for the rules, the notation, the table format, the Python and npm packages, and the validation.
Features: parallel (default, solves on all cores), verify (exact rational arithmetic and the brute-force
reference solver), parquet (Parquet output for the export).
License: MIT.