pub struct Ismcts { /* private fields */ }Expand description
Single-observer information-set MCTS for hidden-information games.
Standard Mcts cheats at hidden information: it searches the
one true state, so it sees opponents’ secret cards. ISMCTS instead searches
from a player’s information set. Each simulation asks the game for a fresh
determinization (Determinize::determinize) — a full world consistent with
what the searcher can see, but with the hidden parts resampled — and runs one
UCT iteration in that world. Averaging over many sampled worlds yields a move
that is good on expectation without ever peeking.
A single tree is shared across determinizations. Because different worlds
offer different legal moves, selection uses an availability count (how many
simulations a move was legal for) in the UCB denominator, and only moves
legal in the current world are considered. Values are backed up as a vector,
one entry per seat, and each node selects to maximize the mover’s own entry
(max^n), so this handles three- and four-player games, not just two-player
zero-sum. Rollouts are uniform-random. All randomness comes from an internal
seeded generator, so a run is reproducible.
Implementations§
Source§impl Ismcts
impl Ismcts
Sourcepub const fn new(iterations: u32, seed: u64) -> Self
pub const fn new(iterations: u32, seed: u64) -> Self
Creates a search running iterations simulations per move, seeded from
seed. Uses the standard UCT exploration constant (sqrt 2).
Sourcepub const fn with_exploration(self, exploration: f64) -> Self
pub const fn with_exploration(self, exploration: f64) -> Self
Sets the UCT exploration constant (higher explores more).