pub struct AgentSnapshot {
pub agent_id: String,
pub q_table: QTable,
pub total_reward: f64,
}Expand description
A serialisable snapshot of an agent’s Q-table and reward total for federated exchange.
§Examples
use lmm_agent::types::AgentSnapshot;
use lmm_agent::cognition::learning::q_table::QTable;
let snap = AgentSnapshot {
agent_id: "agent-1".into(),
q_table: QTable::new(0.1, 0.9, 0.0, 1.0, 0.0),
total_reward: 3.5,
};
assert_eq!(snap.agent_id, "agent-1");Fields§
§agent_id: StringUnique identifier of the originating agent.
q_table: QTableThe agent’s full Q-table at snapshot time.
total_reward: f64Total accumulated reward the agent achieved.
Trait Implementations§
Source§impl Clone for AgentSnapshot
impl Clone for AgentSnapshot
Source§fn clone(&self) -> AgentSnapshot
fn clone(&self) -> AgentSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentSnapshot
impl Debug for AgentSnapshot
Source§impl<'de> Deserialize<'de> for AgentSnapshot
impl<'de> Deserialize<'de> for AgentSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentSnapshot
impl RefUnwindSafe for AgentSnapshot
impl Send for AgentSnapshot
impl Sync for AgentSnapshot
impl Unpin for AgentSnapshot
impl UnsafeUnpin for AgentSnapshot
impl UnwindSafe for AgentSnapshot
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
Mutably borrows from an owned value. Read more