Trait entity_gym_rs::agent::Action
source · pub trait Action<'a> {
fn from_u64(index: u64) -> Self;
fn to_u64(&self) -> u64;
fn num_actions() -> u64;
fn name() -> &'a str;
fn labels() -> Vec<String>ⓘ;
}
Expand description
Defines a categorical action. Can be derived for enums.
Example
use entity_gym_rs::agent::Action;
#[derive(Action)]
enum Move { Up, Down, Left, Right }
Required Methods
sourcefn num_actions() -> u64
fn num_actions() -> u64
Returns the number of possible action choices.