pub struct DqnConfig<VB, OB = AdamConfig> {
pub action_value_fn_config: VB,
pub optimizer_config: OB,
pub target: StepValueTarget,
pub exploration_rate: ExplorationRateSchedule,
pub minibatch_steps: usize,
pub opt_steps_per_update: usize,
pub buffer_capacity: usize,
pub update_size: DataCollectionSchedule,
pub device: Device,
}
Expand description
Configuration for DqnAgent
Fields
action_value_fn_config: VB
optimizer_config: OB
target: StepValueTarget
exploration_rate: ExplorationRateSchedule
minibatch_steps: usize
opt_steps_per_update: usize
buffer_capacity: usize
update_size: DataCollectionSchedule
device: Device
Trait Implementations
sourceimpl<OS, AS, FS, VB, OB> BuildAgent<OS, AS, FS> for DqnConfig<VB, OB> where
OS: FeatureSpace + Clone,
OS::Element: 'static,
AS: FiniteSpace + SampleSpace + ReprSpace<Tensor> + Clone,
AS::Element: 'static,
FS: Space<Element = Reward>,
VB: BuildModule,
VB::Module: SeqPacked + SeqIterative,
OB: BuildOptimizer,
OB::Optimizer: Optimizer,
impl<OS, AS, FS, VB, OB> BuildAgent<OS, AS, FS> for DqnConfig<VB, OB> where
OS: FeatureSpace + Clone,
OS::Element: 'static,
AS: FiniteSpace + SampleSpace + ReprSpace<Tensor> + Clone,
AS::Element: 'static,
FS: Space<Element = Reward>,
VB: BuildModule,
VB::Module: SeqPacked + SeqIterative,
OB: BuildOptimizer,
OB::Optimizer: Optimizer,
type Agent = DqnAgent<OS, AS, <VB as BuildModule>::Module, <OB as BuildOptimizer>::Optimizer>
type Agent = DqnAgent<OS, AS, <VB as BuildModule>::Module, <OB as BuildOptimizer>::Optimizer>
Type of agent to build
sourcefn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = OS, ActionSpace = AS, FeedbackSpace = FS>,
rng: &mut Prng
) -> Result<Self::Agent, BuildAgentError>
fn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = OS, ActionSpace = AS, FeedbackSpace = FS>,
rng: &mut Prng
) -> Result<Self::Agent, BuildAgentError>
Build an agent for the given environment structure (EnvStructure
). Read more
sourceimpl<'de, VB, OB> Deserialize<'de> for DqnConfig<VB, OB> where
VB: Deserialize<'de>,
OB: Deserialize<'de>,
impl<'de, VB, OB> Deserialize<'de> for DqnConfig<VB, OB> where
VB: Deserialize<'de>,
OB: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<VB: Copy, OB: Copy> Copy for DqnConfig<VB, OB>
impl<VB, OB> StructuralPartialEq for DqnConfig<VB, OB>
Auto Trait Implementations
impl<VB, OB> RefUnwindSafe for DqnConfig<VB, OB> where
OB: RefUnwindSafe,
VB: RefUnwindSafe,
impl<VB, OB> Send for DqnConfig<VB, OB> where
OB: Send,
VB: Send,
impl<VB, OB> Sync for DqnConfig<VB, OB> where
OB: Sync,
VB: Sync,
impl<VB, OB> Unpin for DqnConfig<VB, OB> where
OB: Unpin,
VB: Unpin,
impl<VB, OB> UnwindSafe for DqnConfig<VB, OB> where
OB: UnwindSafe,
VB: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more