yahtzee-engine 0.1.0

Yahtzee rules, scoring, and bots: a fast heuristic and an exact optimal expected-value solver
Documentation
//! Builds the full value table and prints the optimal expected score.
//!
//! ```sh
//! cargo run --release --example solve --features parallel
//! ```

use std::time::Instant;
use yahtzee_engine::{Solver, State};

fn main() {
    let start = Instant::now();
    let mut solver = Solver::new();
    for filled in (0..=13).rev() {
        solver.solve_tier(filled);
        eprintln!(
            "tier {filled:2} solved after {:7.2}s",
            start.elapsed().as_secs_f64()
        );
    }
    println!(
        "Optimal expected score from an empty card: {:.4}",
        solver.value(State::START)
    );
}