yahtzee-engine 0.1.0

Yahtzee rules, scoring, and bots: a fast heuristic and an exact optimal expected-value solver
Documentation
[package]
name = "yahtzee-engine"
version = "0.1.0"
authors = ["Chen-Pang He (https://jdh8.org)"]
edition = "2024"
rust-version = "1.93"
description = "Yahtzee rules, scoring, and bots: a fast heuristic and an exact optimal expected-value solver"
repository = "https://github.com/jdh8/yahtzee-engine"
homepage = "https://github.com/jdh8/yahtzee-engine"
documentation = "https://docs.rs/yahtzee-engine"
readme = "README.md"
license = "Apache-2.0"
categories = ["game-development", "games", "simulation"]
keywords = ["yahtzee", "dice", "solver", "expectimax", "ai"]

[package.metadata.docs.rs]
all-features = true

[features]
# Dice-rolling helpers (`Game::roll_with`, `play_turn`, `play_game`) and the
# `play`/`arena` examples.  The rules, scorecard, and the solver are fully
# deterministic and work without randomness.
default = ["rand"]
rand = ["dep:rand"]
# Solves scorecard tiers across the CPU cores.  The table is bit-identical
# to the serial build: states are solved independently within a tier and
# written back in order.  Off by default; the wasm front end never sees it.
parallel = ["dep:rayon"]

[dependencies]
rand = { version = "0.10", optional = true }
rayon = { version = "1.10", optional = true }
thiserror = "2"

[dev-dependencies]
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
proptest = { version = "1.9", default-features = false, features = ["std"] }

[[bench]]
name = "solver"
harness = false

# Auto-discovery would hide these examples from `cargo run --example`
# listings when the feature is off; the explicit entries document the
# requirement.
[[example]]
name = "solve"

[[example]]
name = "play"
required-features = ["rand"]

[[example]]
name = "arena"
required-features = ["rand"]

[profile.dev.package."*"]
opt-level = 2