Skip to content

Abstraction

Niclas edited this page Jul 18, 2026 · 3 revisions

Abstraction

Action abstraction shrinks a game's branching factor by eliminating actions: a subset of the real legal actions is kept, the rest pruned. The trained abstracted Profile is then lifted back to the full game. It is opt-in; the core solver never requires it.

The contract

Abstraction<G>::actions(game, player) returns the (possibly reduced) legal actions for a decision node. It must return a non-empty subset of game.legal_actions(): no duplicates, every element legal in the inner game, and the order must be stable within each information set. The Abstracted wrapper enforces the first three in step, returning GameError otherwise. The ordering contract is checked in debug_assert! only, so a release build will not catch a violation; the burden of returning a stable order rests on the implementation.

pub trait Abstraction<G: Game> {
    fn actions(&self, game: &G, player: usize) -> Vec<G::Action>;
}

Abstracted<G, A> wraps any Game. It forwards every method except legal_actions to the inner game. The trained Profile is keyed by the abstracted action order. Because abstraction is expressed purely through legal_actions, the core solver needs no knowledge of it.

Lifting

An abstracted action is exactly one real action (Abstracted::Action = G::Action). The type system supports elimination only: an abstracted action maps to exactly one real action. Any real action dropped by the abstraction receives approximately zero mass when the abstracted Profile is lifted back to the full game. The lifted vector is renormalized over the kept actions. If, at an information set, the kept actions carry no blueprint mass, the lifted vector falls back to the uniform distribution over all real legal actions rather than a degenerate zero-sum vector.

Blueprint::train_abstracted trains on an Abstracted game and lifts the result; it requires enumerable chance.

Identity abstraction

Identity keeps every legal action. Abstracted<G, Identity> behaves exactly like G. Useful as a default and for tests.

Error cases

Abstracted::step reports each of these as a GameError:

  • empty action set at a decision node,
  • duplicate abstracted action (would silently split regret across two slots),
  • abstracted action not legal in the inner game,
  • stepping an action outside the allowed abstraction set.

Clone this wiki locally