pub struct AgentPolicy {
pub name: String,
pub resources: ResourceRequirements,
}Expand description
An agent policy model co-resident with a sim world.
Fields§
§name: StringHuman-readable policy name (e.g. "ppo-forager").
resources: ResourceRequirementsResources this policy needs. Agents typically need a GPU slice; set
gpu_count/gpu_memory_mb via ResourceRequirements::gpu.
Implementations§
Source§impl AgentPolicy
impl AgentPolicy
Sourcepub fn new(name: impl Into<String>, resources: ResourceRequirements) -> Self
pub fn new(name: impl Into<String>, resources: ResourceRequirements) -> Self
Create an agent policy with explicit resource requirements.
Trait Implementations§
Source§impl Clone for AgentPolicy
impl Clone for AgentPolicy
Source§fn clone(&self) -> AgentPolicy
fn clone(&self) -> AgentPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentPolicy
impl Debug for AgentPolicy
Source§impl<'de> Deserialize<'de> for AgentPolicy
impl<'de> Deserialize<'de> for AgentPolicy
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 AgentPolicy
impl RefUnwindSafe for AgentPolicy
impl Send for AgentPolicy
impl Sync for AgentPolicy
impl Unpin for AgentPolicy
impl UnsafeUnpin for AgentPolicy
impl UnwindSafe for AgentPolicy
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