liveBook · Manning

A2C

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

Advantage actor-critic is a synchronous, model-free reinforcement-learning algorithm that jointly learns a policy and a value function using estimated action advantages.

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

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Explains actor–critic roles and per-step losses, then demonstrates a PyTorch implementation without deriving convergence or advanced variants.
Examples
Uses CartPole states, left-or-right actions, upright-pole rewards, PyTorch networks, reward tracking, and evaluation code.
What it assumes
Assumes basic reinforcement-learning ideas while grounding states, actions, rewards, policies, and value estimates in CartPole.
What you can do after
Builds A2C from scratch in PyTorch or operates it through Stable Baselines3, then evaluates rewards and renders the agent.
How it connects
Connects policy and value functions with model-free reinforcement learning, on-policy learning, MDPs, and PPO.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.