Advantage actor-critic (A2C) is a synchronous, model-free reinforcement-learning algorithm that learns a policy and value function together. The actor maps a state to action probabilities; the critic estimates value and supplies an advantage signal indicating whether an action is better or worse than expected. section 12.1.4
A practical A2C update follows this loop:
- Observe the current state and use the actor to produce an action distribution. section 12.1.4
CartPole balancing
In CartPole, the actor chooses between moving left and right while the critic evaluates each state. The agent receives +1 for every step the pole remains upright, so training seeks longer episodes. A compact PyTorch implementation uses fully connected ReLU networks, softmax action probabilities, Adam optimizers, discount factor 0.99, and 500 episodes; episode rewards can be plotted with a trend line. section 12.3
Figure 12.5 The advantage actor-critic (A2C) architecture
The architecture figure clarifies the actor–critic division of labor and the feedback path from estimated advantage to policy improvement. section 12.1.4
