A2COptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for Advantage Actor-Critic (A2C) agents.
Inheritance: ModelOptions → A2COptions<T>
For Beginners
A2C learns two things simultaneously:
- Actor (Policy): What action to take in each state
- Critic (Value Function): How good each state is
The critic helps the actor learn faster by providing better feedback than just rewards alone. Think of the critic as a coach giving targeted advice rather than just “good” or “bad”.
A2C is the foundation for many modern RL algorithms including PPO.
How It Works
A2C is a synchronous version of A3C that is simpler and often more sample-efficient. It combines policy gradients with value function learning for stable, efficient training.
Constructors
| Constructor | Summary |
|---|---|
A2COptions() |
Creates options with the default values. |
Properties
| Property | Summary |
|---|---|
ILossFunction<T> ValueLossFunction { get; set; } |
Loss function used to train the value network. |
List<int> PolicyHiddenLayers { get; set; } |
Hidden layer sizes of the policy network. |
List<int> ValueHiddenLayers { get; set; } |
Hidden layer sizes of the value network. |
T DiscountFactor { get; set; } |
Discount factor (gamma) applied to future rewards. |
T EntropyCoefficient { get; set; } |
Weight of the entropy bonus in the objective, which encourages exploration. |
T PolicyLearningRate { get; set; } |
Learning rate of the policy network. |
T ValueLearningRate { get; set; } |
Learning rate of the value network. |
bool IsContinuous { get; set; } |
Whether the action space is continuous rather than discrete. |
int ActionSize { get; set; } |
Number of discrete actions, or the dimension of the action vector for a continuous action space. |
int StateSize { get; set; } |
Number of features in one observation of the environment state. |
int StepsPerUpdate { get; set; } |
Number of environment steps collected before each update (the rollout length n of n-step A2C). |