pub struct PsroIterationStats {
pub iteration: usize,
pub population_size: usize,
pub meta_nash_per_agent: Vec<Vec<f32>>,
pub br_stats_per_agent: Vec<Option<JointStats>>,
pub exploitability: f32,
}Expand description
Per-iteration PSRO statistics.
Fields§
§iteration: usizeIteration index (1-based after the initial population is seeded).
population_size: usizePopulation size at the end of this iteration (per agent; identical across agents under the symmetric posture).
meta_nash_per_agent: Vec<Vec<f32>>Per-agent meta-Nash action-population marginal distributions
at the end of this iteration. meta_nash_per_agent[i] is agent
i’s marginal over its own population_size policies extracted
from the joint α-rank distribution (for N≥3) or directly from
the 2-player solver (for N=2).
br_stats_per_agent: Vec<Option<JointStats>>Per-agent best-response training stats. br_stats_per_agent[i]
is the stats for the round in which agent i was active under
the round-robin schedule, or None if the agent was not the
active agent on this iteration (currently every agent is
trained every iteration, so every entry is Some).
exploitability: f32NashConv-style exploitability: the sum over agents i of agent
i’s maximum payoff improvement by deviating to a pure best
response in the empirical game, given the joint meta-Nash
distribution.
For N=2 zero-sum games this reduces to the original 2-player formula (row gain + column gain). Smaller is closer to the empirical equilibrium.
Implementations§
Source§impl PsroIterationStats
impl PsroIterationStats
Sourcepub fn meta_nash_row(&self) -> &[f32]
pub fn meta_nash_row(&self) -> &[f32]
Backward-compat shim: agent 0 (row-player) meta-Nash
distribution. Equivalent to &self.meta_nash_per_agent[0].
Sourcepub fn meta_nash_col(&self) -> &[f32]
pub fn meta_nash_col(&self) -> &[f32]
Backward-compat shim: agent 1 (column-player) meta-Nash
distribution. Equivalent to &self.meta_nash_per_agent[1].
Trait Implementations§
Source§impl Clone for PsroIterationStats
impl Clone for PsroIterationStats
Source§fn clone(&self) -> PsroIterationStats
fn clone(&self) -> PsroIterationStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PsroIterationStats
impl Debug for PsroIterationStats
Source§impl Default for PsroIterationStats
impl Default for PsroIterationStats
Source§fn default() -> PsroIterationStats
fn default() -> PsroIterationStats
Auto Trait Implementations§
impl Freeze for PsroIterationStats
impl RefUnwindSafe for PsroIterationStats
impl Send for PsroIterationStats
impl Sync for PsroIterationStats
impl Unpin for PsroIterationStats
impl UnsafeUnpin for PsroIterationStats
impl UnwindSafe for PsroIterationStats
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more