Table of Contents

Class TargetNetworkConfig<T>

Namespace
AiDotNet.Configuration
Assembly
AiDotNet.dll

Configuration for target network updates in DQN-family algorithms.

public class TargetNetworkConfig<T>

Type Parameters

T

The numeric type.

Inheritance
TargetNetworkConfig<T>
Inherited Members

Remarks

For Beginners: DQN uses two networks - a main network for selecting actions and a target network for computing stable Q-value targets. This configuration controls how often and how the target network gets updated.

Constructors

TargetNetworkConfig()

Creates a new instance with default values.

public TargetNetworkConfig()

Properties

Tau

Tau parameter for soft updates (0 to 1).

public T Tau { get; set; }

Property Value

T

Remarks

For Beginners: For soft updates: target = tau * main + (1 - tau) * target. Lower tau = slower, more stable updates. Common values: 0.001 to 0.01. Default: 0.005.

UpdateFrequency

Update target network every N steps.

public int UpdateFrequency { get; set; }

Property Value

int

Remarks

For Beginners: Higher values mean more stable targets but slower learning. Common values: 1000-10000 for hard updates, 1 for soft updates. Default: 1000 steps.

UseSoftUpdate

Whether to use soft updates (Polyak averaging) instead of hard updates.

public bool UseSoftUpdate { get; set; }

Property Value

bool

Remarks

For Beginners:

  • Hard update: Copy entire network weights at once
  • Soft update: Gradually blend weights each step (more stable) Default: false (hard updates).