pub trait ActionValue<B: Backend>: Sized {
// Required methods
fn pattern(space: &ActionSpace, i: u64) -> Self;
fn from_flat(actions: Actions<'_>, i: usize) -> Self;
fn from_joint(space: &ActionSpace, index: usize) -> Self;
}Expand description
A type of actions (crate::Environment::Action).
Required Methods§
Sourcefn pattern(space: &ActionSpace, i: u64) -> Self
fn pattern(space: &ActionSpace, i: u64) -> Self
Action i of a fixed pseudo-random sequence in space, for tests
and benchmarks.
Sourcefn from_flat(actions: Actions<'_>, i: usize) -> Self
fn from_flat(actions: Actions<'_>, i: usize) -> Self
The action of environment i in a flat buffer.
§Panics
Panics if the buffer has the other kind of actions.
Sourcefn from_joint(space: &ActionSpace, index: usize) -> Self
fn from_joint(space: &ActionSpace, index: usize) -> Self
The joint action index (see choose_legal): the index itself,
or its components in row-major order of nvec.
§Panics
Panics for continuous actions.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".