Trait entity_gym_rs::agent::AgentOps
source · pub trait AgentOps {
fn act<'a, A: Action<'a>>(&mut self, obs: &Obs) -> Option<Vec<A>>;
fn act_async<'a, A: Action<'a>>(&mut self, obs: &Obs) -> ActionReceiver<A>;
}
Expand description
Augments the Agent
trait with more ergonomic typed versions of the Agent::act_dyn
and Agent::act_async_dyn
methods.
Required Methods
sourcefn act<'a, A: Action<'a>>(&mut self, obs: &Obs) -> Option<Vec<A>>
fn act<'a, A: Action<'a>>(&mut self, obs: &Obs) -> Option<Vec<A>>
Returns an action for the given observation.
sourcefn act_async<'a, A: Action<'a>>(&mut self, obs: &Obs) -> ActionReceiver<A>
fn act_async<'a, A: Action<'a>>(&mut self, obs: &Obs) -> ActionReceiver<A>
Returns receiver that can be blocked on to receive an action for the given observation.