Skip to main content

Determinize

Trait Determinize 

Source
pub trait Determinize: Game {
    // Required method
    fn determinize(
        &self,
        state: &Self::State,
        observer: PlayerId,
        rng: &mut Prng,
    ) -> Self::State;
}
Expand description

Opt-in resampling of hidden information for imperfect-information search.

The imperfect-info analog of Reversible: an optional capability a game implements to unlock a bot that could not otherwise work. A perfect-info game implements it trivially as state.clone(); a hidden-info game randomly fills in what observer cannot see. Information-set MCTS (Ismcts) calls this once per simulation to search over sampled worlds.

The one invariant that makes search sound: the result must be consistent with observer’s information set. Everything observer can already see is preserved exactly (so Game::view for observer is unchanged); only the cards, tiles, or rolls they cannot see are resampled. Draw the resampling randomness from rng, not from the state, so repeated calls explore different worlds. This is the game-specific knowledge that a generic engine cannot supply (mirroring OpenSpiel’s ResampleFromInfostate), which is why it is a trait a game opts into rather than a core method.

Required Methods§

Source

fn determinize( &self, state: &Self::State, observer: PlayerId, rng: &mut Prng, ) -> Self::State

Returns a random full state consistent with what observer can see in state (a determinization), resampling hidden information from rng.

Implementors§