pub struct Partial { /* private fields */ }Expand description
Perfect-recall game history from a single player’s perspective.
While Game is memoryless, Partial tracks the complete action sequence
from the start of a hand. This is the primary type for inference time:
hero knows their own cards but not the opponent’s.
§Information Boundary
| Type | Perspective | Used For |
|---|---|---|
Partial | Hero only (own cards) | Inference, UI, opponent iteration |
Perfect | God’s view (both hands) | Training CFR traversal |
§Key Operations
NlheInfo::from((&partial, abstraction))for strategy lookupPerfect::from((&partial, hole))for opponent modelingpartial.histories()→ iterate all possible opponent hands
§Structure
pov— Which player’s perspective we’re trackingactions— Action sequence excluding blinds (bets, draws)reveals— The card arrangement for this hand (hero’s observation)
§Invariants
Assumes default stacks (100bb) and P0 on button. Blinds are constant
and handled by root() returning a POST-blind state.
Implementations§
Source§impl Partial
Strategy lookup methods.
impl Partial
Strategy lookup methods.
Sourcepub fn betting_edges(&self) -> Vec<Edge>
pub fn betting_edges(&self) -> Vec<Edge>
Returns all betting edges (Open or Raise) available at the current state.
Sourcepub fn histories(&self) -> Vec<(Observation, Perfect)>
pub fn histories(&self) -> Vec<(Observation, Perfect)>
Iterates over all possible opponent hands.
For each opponent observation, yields a complete-information
Perfect that can compute exact reach probabilities.
Since Partial has partial information (only hero’s cards),
this method enumerates the unknown opponent hands.
Source§impl Partial
impl Partial
Sourcepub fn try_build(
pov: Turn,
seen: Observation,
actions: Vec<Action>,
) -> Result<Self>
pub fn try_build( pov: Turn, seen: Observation, actions: Vec<Action>, ) -> Result<Self>
Fallible constructor from (POV, observation, actions).
Returns Err if any action in the sequence is illegal,
enabling graceful error handling for untrusted input.
The actions parameter should NOT include blinds.
Source§impl Partial
State reconstruction methods.
impl Partial
State reconstruction methods.
Sourcepub fn base(&self) -> Game
pub fn base(&self) -> Game
Returns the initial game state (before blinds, with hero’s hole cards).
Sourcepub fn arr(&self) -> Arrangement
pub fn arr(&self) -> Arrangement
The card arrangement for this recall.
Sourcepub fn seen(&self) -> Observation
pub fn seen(&self) -> Observation
The observation (hole cards + board) for this recall.
Sourcepub fn plays(&self) -> Vec<(Position, Action, Street)>
pub fn plays(&self) -> Vec<(Position, Action, Street)>
Returns (position, action, street) for each action in the sequence.
Sourcepub fn aggressor(&self) -> Option<Position>
pub fn aggressor(&self) -> Option<Position>
Finds the last aggressor on the final betting street. Returns None if no aggressive action was taken (all checks/calls).
Sourcepub fn replace(&self, reveals: Arrangement) -> Self
pub fn replace(&self, reveals: Arrangement) -> Self
Swaps the card arrangement, updating draw actions to match.
Sourcepub fn decisions(&self, street: Street) -> Vec<Action>
pub fn decisions(&self, street: Street) -> Vec<Action>
Player decisions (non-draw) for a specific street.
Sourcepub fn isomorphism(&self) -> Isomorphism
pub fn isomorphism(&self) -> Isomorphism
The canonical form of the observation.
Source§impl Partial
Action modification methods.
impl Partial
Action modification methods.
Trait Implementations§
Source§impl Display for Partial
Display shows a compact visual representation of the game history
Format: table with cards from arrangement (preserving deal order)
and actions in a fixed-width grid layout
impl Display for Partial
Display shows a compact visual representation of the game history Format: table with cards from arrangement (preserving deal order) and actions in a fixed-width grid layout
Source§impl From<(Turn, Arrangement)> for Partial
Constructs recall from a POV and arrangement (no decisions yet).
impl From<(Turn, Arrangement)> for Partial
Constructs recall from a POV and arrangement (no decisions yet).
Source§fn from((pov, reveals): (Turn, Arrangement)) -> Self
fn from((pov, reveals): (Turn, Arrangement)) -> Self
Source§impl Recall for Partial
impl Recall for Partial
Source§fn actions(&self) -> &[Action]
fn actions(&self) -> &[Action]
Source§fn complete(&self) -> Vec<Action>
fn complete(&self) -> Vec<Action>
Source§fn aggression(&self) -> usize
fn aggression(&self) -> usize
impl Eq for Partial
impl StructuralPartialEq for Partial
Auto Trait Implementations§
impl Freeze for Partial
impl RefUnwindSafe for Partial
impl Send for Partial
impl Sync for Partial
impl Unpin for Partial
impl UnwindSafe for Partial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.