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

Instantiates an action from a u64.

Converts an action to a u64.

Returns the number of possible action choices.

Returns the human readable name of the action.

Returns a list of human readable labels corresponding to each action choice.

Implementors