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<Record: Checkpoint> + 'static;
type LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy, Record: Checkpoint> + Send + 'static;
type TrainingOutput: ItemLazy + Clone + Send;
}Available on crate feature
rl only.Expand description
All components used by the reinforcement learning paradigm, grouped in one trait.
Required Associated Types§
Sourcetype Env: Environment<State = Self::State, Action = Self::Action> + 'static
type Env: Environment<State = Self::State, Action = Self::Action> + 'static
The learning environment.
Sourcetype EnvInit: EnvironmentInit<Self::Env> + Send + 'static
type EnvInit: EnvironmentInit<Self::Env> + Send + 'static
Specifies how to initialize the environment.
Sourcetype 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.
Sourcetype 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.
Sourcetype 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.
Sourcetype PolicyAction: Clone + Send + Batchable
type PolicyAction: Clone + Send + Batchable
The policy’s action type.
Sourcetype ActionContext: ItemLazy + Clone + Send + 'static
type ActionContext: ItemLazy + Clone + Send + 'static
Additional data as context for an agent’s action.
Sourcetype PolicyState: Clone + Send + PolicyState<Record: Checkpoint> + 'static
type PolicyState: Clone + Send + PolicyState<Record: Checkpoint> + 'static
The state of the parameterized policy.
Sourcetype LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy, Record: Checkpoint> + Send + 'static
type LearningAgent: PolicyLearner<TrainContext = Self::TrainingOutput, InnerPolicy = Self::Policy, Record: Checkpoint> + Send + 'static
The learning agent.
Sourcetype 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".