pub struct Sentinel { /* private fields */ }Expand description
The Sentinel agent — the immune system’s anomaly detector.
Implementations§
Trait Implementations§
Source§impl Agent for Sentinel
impl Agent for Sentinel
Source§fn set_position(&mut self, position: Position)
fn set_position(&mut self, position: Position)
Set the agent’s position.
Source§fn agent_type(&self) -> &str
fn agent_type(&self) -> &str
The agent’s type name (for display and logging).
Source§fn tick(&mut self, substrate: &dyn Substrate) -> AgentAction
fn tick(&mut self, substrate: &dyn Substrate) -> AgentAction
Execute one tick of the agent’s lifecycle. Read more
Source§fn export_vocabulary(&self) -> Option<Vec<u8>>
fn export_vocabulary(&self) -> Option<Vec<u8>>
Export this agent’s vocabulary as serialized bytes.
Returns None if the agent has no vocabulary to export.
Source§fn profile(&self) -> AgentProfile
fn profile(&self) -> AgentProfile
Build a profile describing this agent’s capabilities.
Source§fn integrate_vocabulary(&mut self, _data: &[u8]) -> bool
fn integrate_vocabulary(&mut self, _data: &[u8]) -> bool
Integrate foreign vocabulary from serialized bytes.
Returns true if integration succeeded.
Source§fn evaluate_symbiosis(&self, _other: &AgentProfile) -> Option<SymbiosisEval>
fn evaluate_symbiosis(&self, _other: &AgentProfile) -> Option<SymbiosisEval>
Evaluate whether to absorb another agent as a symbiont.
Source§fn absorb_symbiont(&mut self, _profile: AgentProfile, _data: Vec<u8>) -> bool
fn absorb_symbiont(&mut self, _profile: AgentProfile, _data: Vec<u8>) -> bool
Absorb another agent’s profile and vocabulary data as a symbiont.
Returns true if absorption succeeded.
Source§fn permeability(&self) -> f64
fn permeability(&self) -> f64
Current boundary permeability (0.0 = rigid, 1.0 = fully dissolved).
Source§fn modulate_boundary(&mut self, _context: &BoundaryContext)
fn modulate_boundary(&mut self, _context: &BoundaryContext)
Adjust boundary permeability based on environmental context.
Source§fn externalize_vocabulary(&self) -> Vec<String>
fn externalize_vocabulary(&self) -> Vec<String>
Return vocabulary terms to externalize (reinforce in the substrate).
Source§fn internalize_vocabulary(&mut self, _terms: &[String])
fn internalize_vocabulary(&mut self, _terms: &[String])
Absorb nearby concept terms from the substrate.
Source§fn vocabulary_size(&self) -> usize
fn vocabulary_size(&self) -> usize
Return the size of this agent’s vocabulary (for metrics).
Source§impl Apoptose for Sentinel
impl Apoptose for Sentinel
Source§fn self_assess(&self) -> CellHealth
fn self_assess(&self) -> CellHealth
Evaluate own health and usefulness. Read more
Source§fn prepare_death_signal(&self) -> DeathSignal
fn prepare_death_signal(&self) -> DeathSignal
Package final state into a death signal before destruction. Read more
Source§fn should_die(&self) -> bool
fn should_die(&self) -> bool
Whether the agent should initiate death. Read more
Source§fn trigger_apoptosis(self) -> DeathSignalwhere
Self: Sized,
fn trigger_apoptosis(self) -> DeathSignalwhere
Self: Sized,
Initiate orderly self-destruction (for concrete types). Read more
Source§impl Digest for Sentinel
impl Digest for Sentinel
Source§type Input = String
type Input = String
The raw input to consume. Ownership is transferred — the input is destroyed.
Source§type Presentation = Vec<String>
type Presentation = Vec<String>
What is presented to other agents after digestion.
Source§fn engulf(&mut self, input: String) -> DigestionResult
fn engulf(&mut self, input: String) -> DigestionResult
Engulf: take ownership of input. Read more
Source§fn digest(&mut self, input: Self::Input) -> Self::Presentation
fn digest(&mut self, input: Self::Input) -> Self::Presentation
Run the full digestion cycle: engulf → lyse → present.
Source§impl Negate for Sentinel
impl Negate for Sentinel
Source§type Observation = Vec<(String, u64)>
type Observation = Vec<(String, u64)>
An observation that can be classified as self or non-self.
Source§type SelfModel = ConceptSelfModel
type SelfModel = ConceptSelfModel
The internal self-model (what the agent considers “normal”).
Source§fn learn_self(&mut self, observations: &[<Sentinel as Negate>::Observation])
fn learn_self(&mut self, observations: &[<Sentinel as Negate>::Observation])
Build or update the self-model from observations. Read more
Source§fn self_model(&self) -> &ConceptSelfModel
fn self_model(&self) -> &ConceptSelfModel
Get a reference to the current self-model.
Source§fn classify(
&self,
observation: &<Sentinel as Negate>::Observation,
) -> Classification
fn classify( &self, observation: &<Sentinel as Negate>::Observation, ) -> Classification
Classify an observation as self (normal) or non-self (anomalous). Read more
Source§impl Sense for Sentinel
impl Sense for Sentinel
Source§fn sense_radius(&self) -> f64
fn sense_radius(&self) -> f64
The radius within which this agent can sense signals.
Source§fn sense_position(&self) -> Position
fn sense_position(&self) -> Position
The position from which this agent senses.
Source§fn gradient(&self, _substrate: &dyn Substrate) -> Vec<Gradient>
fn gradient(&self, _substrate: &dyn Substrate) -> Vec<Gradient>
Compute the gradient — direction of increasing signal strength. Read more
Source§fn orient(&self, _gradients: &[Gradient]) -> Orientation
fn orient(&self, _gradients: &[Gradient]) -> Orientation
Determine next orientation based on sensed gradients. Read more
Source§impl SerializableAgent for Sentinel
impl SerializableAgent for Sentinel
Source§fn export_state(&self) -> SerializedAgent
fn export_state(&self) -> SerializedAgent
Export the agent’s state for serialization.
Source§fn from_state(state: &SerializedAgent) -> Option<Sentinel>
fn from_state(state: &SerializedAgent) -> Option<Sentinel>
Create an agent from serialized state.
Auto Trait Implementations§
impl Freeze for Sentinel
impl RefUnwindSafe for Sentinel
impl Send for Sentinel
impl Sync for Sentinel
impl Unpin for Sentinel
impl UnwindSafe for Sentinel
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