DQNExperimentConfiguration
Methods
validate_learning_start
validate_learning_start() -> DQNExperimentConfigurationValues
actor_batch_add_size
actor_batch_add_size: int = Field(default=16, gt=0)The number of transitions to buffer locally in the actor before adding them to the replay buffer.
categorical
categorical: CategoricalConfiguration | None = NoneConfiguration for Categorical DQN (C51). If None, categorical DQN is disabled.
double_dqn
double_dqn: bool = FalseWhether to use Double DQN.
dueling
dueling: bool = FalseWhether to use Duelling architecture.
exploration
exploration: Annotated[EpsilonGreedyConfiguration | NoisyNetsConfiguration, Field(discriminator=type)] = EpsilonGreedyConfiguration()Configuration for the exploration strategy.
loss_function
loss_function: Literal['mse', 'huber'] = 'mse'The loss function for standard (non-categorical) DQN. 'mse' uses mean squared error, 'huber' uses Huber (smooth L1) loss.
n_step
n_step: int = Field(default=1, ge=1)Number of steps for n-step returns.
num_steps_sampled_before_learning_starts
num_steps_sampled_before_learning_starts: int = Field(default=1000, ge=0)The number of environment steps to perform before starting the learning process.
replay_buffer
replay_buffer: Annotated[UniformReplayBufferConfiguration | PrioritizedExperienceReplayBufferConfiguration, Field(discriminator=type)] = UniformReplayBufferConfiguration()Configuration for the replay buffer.
replay_writer_queue_size
replay_writer_queue_size: int = Field(default=8, gt=0)The maximum number of replay batches that may be queued before the actor blocks.
save_replay_buffer_in_checkpoints
save_replay_buffer_in_checkpoints: bool = FalseWhether to save the entire replay buffer in each checkpoint (can be very large).
target_network_update_freq
target_network_update_freq: int = Field(default=512, gt=0)The frequency (in sample steps) with which to update the target network weights.
tau
tau: float = Field(default=1.0, gt=0.0, le=1.0)Interpolation factor for soft (Polyak) target network updates. tau=1.0 is a hard update (full copy), tau<1.0 blends: target = tau * learner + (1-tau) * target.
train_batch_size
train_batch_size: int = Field(default=32, gt=0)The number of transitions to sample from the replay buffer for each training iteration.