Trait rurel::mdp::State
[−]
[src]
pub trait State: Eq + Hash + Clone { type A: Eq + Hash + Clone; fn reward(&self) -> f64; fn actions(&self) -> Vec<Self::A>; fn random_action(&self) -> Self::A { ... } }
A State
is something which has a reward, and has a certain set of actions associated with it.
The type of the actions must be defined as the associated type A
.
Associated Types
Required Methods
fn reward(&self) -> f64
The reward for when an Agent
arrives at this State
.
fn actions(&self) -> Vec<Self::A>
The set of actions that can be taken from this State
, to arrive in another State
.
Provided Methods
fn random_action(&self) -> Self::A
Selects a random action that can be taken from this State
. The default implementation
takes a uniformly distributed random action from the defined set of actions. You may want
to improve the performance by only generating the necessary action.