Package-level declarations

Types

Link copied to clipboard
interface GameRules<State, Move, Actor, View>

The generic rules contract a game engine exposes so a domain-agnostic search (see Ismcts) can drive self-play without knowing the concrete rules. View is the redacted/secrecy-safe projection of State a Policy is allowed to see (produced by redact) — kept as its own type parameter (rather than derived from State) because the secrecy boundary is a distinct type in every engine that adopts this contract.

Link copied to clipboard
class Ismcts<State, Move, View, Actor>(rules: GameRules<State, Move, Actor, View>, rolloutPolicy: () -> Policy<View, Move>, staticEval: (State, Actor) -> Double, budget: SearchBudget)

Generic Information-Set Monte Carlo Tree Search shell. Knows nothing about any specific game — every domain concept (rules, leaf evaluation, rollout policy) is injected by the caller.

Link copied to clipboard
sealed interface Outcome<out State>

Generic outcome of applying a Move to a State — mirrors an engine's own apply-outcome type.

Link copied to clipboard
fun interface Policy<View, Move>

A generic bot/agent policy: given a redacted View of an opaque game state and the concrete legal Moves, choose one. Domain-agnostic — knows nothing about any specific game's types.

Link copied to clipboard
data class SearchBudget(val maxMillis: Long = 400, val maxIterations: Int = 1500, val rolloutHorizon: Int = 12)

Search-time budget for Ismcts.search: iteration count and wall-clock time, whichever cap is hit first. rolloutHorizon is the base rollout depth in plies a caller passes through to Ismcts.search — scaling it for domain-specific factors (e.g. table/player count) is the caller's job, not this shell's; this type only carries the budget, it does not interpret it.

Link copied to clipboard

A move-keyed UCB1 tree node. Exposed so callers can read visit/reward stats after a Ismcts.search.