[][src]Trait agent_safety_layers::Agent

pub trait Agent {
    type Model;
    type Action;
    type Delta;
    fn update_model(&mut self, model: Self::Model);
fn decide(&mut self) -> Decision<Self::Action>;
fn act(&mut self, action: Self::Action);
fn mutate(&mut self) -> Self::Delta;
fn undo(&mut self, delta: Self::Delta); }

Implemented by agents.

Associated Types

type Model

The type of the model.

type Action

The type of actions.

type Delta

The type of delta changes (caused by mutation).

Loading content...

Required methods

fn update_model(&mut self, model: Self::Model)

Update internal model.

fn decide(&mut self) -> Decision<Self::Action>

Decide what to do next.

fn act(&mut self, action: Self::Action)

Perform an action on its internal model.

fn mutate(&mut self) -> Self::Delta

Mutates the agent.

fn undo(&mut self, delta: Self::Delta)

Undo mutation.

Loading content...

Implementors

impl<M, A, D> Agent for AgentN<M, A, D> where
    A: PartialEq
[src]

type Model = M

type Action = A

type Delta = D

impl<M, A, D> Agent for AgentS<M, A, D> where
    A: PartialEq
[src]

type Model = M

type Action = A

type Delta = D

impl<M, A, D> Agent for AgentZ<M, A, D>[src]

type Model = M

type Action = A

type Delta = D

Loading content...