Skip to main content

Sentinel

Struct Sentinel 

Source
pub struct Sentinel { /* private fields */ }
Expand description

The Sentinel agent — the immune system’s anomaly detector.

Implementations§

Source§

impl Sentinel

Source

pub fn new(position: Position) -> Sentinel

Source

pub fn with_seed(position: Position, seed: u64) -> Sentinel

Create a sentinel with a deterministic ID (for testing).

Source

pub fn anomalies_detected(&self) -> u64

Trait Implementations§

Source§

impl Agent for Sentinel

Source§

fn id(&self) -> AgentId

The agent’s unique identity.
Source§

fn position(&self) -> Position

The agent’s current position in the substrate.
Source§

fn set_position(&mut self, position: Position)

Set the agent’s position.
Source§

fn agent_type(&self) -> &str

The agent’s type name (for display and logging).
Source§

fn tick(&mut self, substrate: &dyn Substrate) -> AgentAction

Execute one tick of the agent’s lifecycle. Read more
Source§

fn age(&self) -> u64

How many ticks this agent has been alive.
Source§

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

Build a profile describing this agent’s capabilities.
Source§

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>

Evaluate whether to absorb another agent as a symbiont.
Source§

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

Current boundary permeability (0.0 = rigid, 1.0 = fully dissolved).
Source§

fn modulate_boundary(&mut self, _context: &BoundaryContext)

Adjust boundary permeability based on environmental context.
Source§

fn externalize_vocabulary(&self) -> Vec<String>

Return vocabulary terms to externalize (reinforce in the substrate).
Source§

fn internalize_vocabulary(&mut self, _terms: &[String])

Absorb nearby concept terms from the substrate.
Source§

fn vocabulary_size(&self) -> usize

Return the size of this agent’s vocabulary (for metrics).
Source§

impl Apoptose for Sentinel

Source§

fn self_assess(&self) -> CellHealth

Evaluate own health and usefulness. Read more
Source§

fn prepare_death_signal(&self) -> DeathSignal

Package final state into a death signal before destruction. Read more
Source§

fn should_die(&self) -> bool

Whether the agent should initiate death. Read more
Source§

fn trigger_apoptosis(self) -> DeathSignal
where Self: Sized,

Initiate orderly self-destruction (for concrete types). Read more
Source§

impl Digest for Sentinel

Source§

type Input = String

The raw input to consume. Ownership is transferred — the input is destroyed.
Source§

type Fragment = String

Structural fragments extracted during digestion.
Source§

type Presentation = Vec<String>

What is presented to other agents after digestion.
Source§

fn engulf(&mut self, input: String) -> DigestionResult

Engulf: take ownership of input. Read more
Source§

fn lyse(&mut self) -> Vec<String>

Lyse: break the engulfed material into fragments. Read more
Source§

fn present(&self) -> Vec<String>

Present: expose fragments on the agent’s surface. Read more
Source§

fn digest(&mut self, input: Self::Input) -> Self::Presentation

Run the full digestion cycle: engulf → lyse → present.
Source§

impl Negate for Sentinel

Source§

type Observation = Vec<(String, u64)>

An observation that can be classified as self or non-self.
Source§

type SelfModel = ConceptSelfModel

The internal self-model (what the agent considers “normal”).
Source§

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

Get a reference to the current self-model.
Source§

fn is_mature(&self) -> bool

Whether the self-model has been sufficiently trained. Read more
Source§

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

Source§

fn sense_radius(&self) -> f64

The radius within which this agent can sense signals.
Source§

fn sense_position(&self) -> Position

The position from which this agent senses.
Source§

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

Determine next orientation based on sensed gradients. Read more
Source§

fn sense(&self, substrate: &dyn Substrate) -> Vec<Signal>

Read signals from the local environment. Read more
Source§

fn emit(&self, signal: Signal, substrate: &mut dyn Substrate)

Emit a signal into the substrate. Read more
Source§

impl SerializableAgent for Sentinel

Source§

fn export_state(&self) -> SerializedAgent

Export the agent’s state for serialization.
Source§

fn from_state(state: &SerializedAgent) -> Option<Sentinel>

Create an agent from serialized state.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.