Trait RLComponentsTypes
pub trait RLComponentsTypes {
type Env: Environment<State = Self::State, Action = Self::Action> + 'static;
type EnvInit: EnvironmentInit<Self::Env> + Send + 'static;
type State: ToObservation<<Self::Policy as Policy>::Observation> + Clone + Send + 'static;
type Action: From<<Self::Policy as Policy>::Action> + ToAction<<Self::Policy as Policy>::Action> + Clone + Send + 'static;
type Policy: Policy<Observation = Self::PolicyObs, ActionDistribution = Self::PolicyAD, Action = Self::PolicyAction, ActionContext = Self::ActionContext, PolicyState = Self::PolicyState> + Send + 'static;
type PolicyObs: Clone + Send + Batchable + 'static;
type PolicyAD: Clone + Send + Batchable;
type PolicyAction: Clone + Send + Batchable;
type ActionContext: ItemLazy + Clone + Send + 'static;
type PolicyState: Clone + Send + PolicyState + 'static
where <Self::PolicyState as PolicyState>::Record: Checkpoint;
type LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy> + Send + 'static
where <Self::LearningAgent as PolicyLearner>::Record: Checkpoint;
type TrainingOutput: ItemLazy + Clone + Send;
}Expand description
All components used by the reinforcement learning paradigm, grouped in one trait.
Required Associated Types§
type Env: Environment<State = Self::State, Action = Self::Action> + 'static
type Env: Environment<State = Self::State, Action = Self::Action> + 'static
The learning environment.
type EnvInit: EnvironmentInit<Self::Env> + Send + 'static
type EnvInit: EnvironmentInit<Self::Env> + Send + 'static
Specifies how to initialize the environment.
type State: ToObservation<<Self::Policy as Policy>::Observation> + Clone + Send + 'static
type State: ToObservation<<Self::Policy as Policy>::Observation> + Clone + Send + 'static
The type of the environment state.
type Action: From<<Self::Policy as Policy>::Action> + ToAction<<Self::Policy as Policy>::Action> + Clone + Send + 'static
type Action: From<<Self::Policy as Policy>::Action> + ToAction<<Self::Policy as Policy>::Action> + Clone + Send + 'static
The type of the environment action.
type Policy: Policy<Observation = Self::PolicyObs, ActionDistribution = Self::PolicyAD, Action = Self::PolicyAction, ActionContext = Self::ActionContext, PolicyState = Self::PolicyState> + Send + 'static
type Policy: Policy<Observation = Self::PolicyObs, ActionDistribution = Self::PolicyAD, Action = Self::PolicyAction, ActionContext = Self::ActionContext, PolicyState = Self::PolicyState> + Send + 'static
The policy used to take actions in the environment.
type PolicyAction: Clone + Send + Batchable
type PolicyAction: Clone + Send + Batchable
The policy’s action type.
type ActionContext: ItemLazy + Clone + Send + 'static
type ActionContext: ItemLazy + Clone + Send + 'static
Additional data as context for an agent’s action.
type PolicyState: Clone + Send + PolicyState + 'static
where
<Self::PolicyState as PolicyState>::Record: Checkpoint
type PolicyState: Clone + Send + PolicyState + 'static where <Self::PolicyState as PolicyState>::Record: Checkpoint
The state of the parameterized policy.
type LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy> + Send + 'static
where
<Self::LearningAgent as PolicyLearner>::Record: Checkpoint
type LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy> + Send + 'static where <Self::LearningAgent as PolicyLearner>::Record: Checkpoint
The learning agent.
type TrainingOutput: ItemLazy + Clone + Send
type TrainingOutput: ItemLazy + Clone + Send
The output data of a training step.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".