pub struct JointRollout {
pub observations_per_agent: Vec<Vec<f32>>,
pub obs_dims: Vec<usize>,
pub actions: Vec<Vec<i64>>,
pub num_action_dims: usize,
pub log_probs: Vec<Vec<f32>>,
pub values: Vec<Vec<f32>>,
pub rewards: Vec<Vec<f32>>,
pub dones: Vec<f32>,
}Expand description
Synchronized rollout buffer (host-side).
Per-agent observations are stored independently so environments with
distinct per-agent views (e.g. partial observability, asymmetric
information) work without any pre-concatenation. Each agent i
records its own observation stream into
observations_per_agent[i] (a flat [T * obs_dim] buffer).
Per-agent actions / log-probs / values / rewards are stored as
parallel host buffers and materialized into Burn tensors lazily
inside JointMultiAgentTrainer::update.
Fields§
§observations_per_agent: Vec<Vec<f32>>Per-agent observations: observations_per_agent[i] is a flat
[T * obs_dims[i]] buffer holding the observation stream for one
agent across the rollout.
obs_dims: Vec<usize>Per-agent observation dimensionality (obs_dims[i] = length of agent
i’s observation vector). Heterogeneous across agents is supported —
e.g. a SignalingGame speaker observes a length-V one-hot while the
listener observes a single received-token slot (issue #275).
actions: Vec<Vec<i64>>Per-agent actions: Vec<N>[T * num_action_dims]. num_action_dims
is 1 for scalar discrete, num_dims for multi-discrete.
num_action_dims: usizeNumber of action dimensions (uniform across agents in this first cut).
log_probs: Vec<Vec<f32>>Per-agent rollout-time log-probs: Vec<N>[T].
values: Vec<Vec<f32>>Per-agent value estimates: Vec<N>[T].
rewards: Vec<Vec<f32>>Per-agent rewards: Vec<N>[T].
dones: Vec<f32>Episode-termination flag (shared across agents): [T].
Implementations§
Source§impl JointRollout
impl JointRollout
Trait Implementations§
Source§impl Clone for JointRollout
impl Clone for JointRollout
Source§fn clone(&self) -> JointRollout
fn clone(&self) -> JointRollout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for JointRollout
impl RefUnwindSafe for JointRollout
impl Send for JointRollout
impl Sync for JointRollout
impl Unpin for JointRollout
impl UnsafeUnpin for JointRollout
impl UnwindSafe for JointRollout
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