AI & ML Atlas
Reinforcement LearningalgorithmInteractive simulation
Advantage Actor-Critic (A2C)
Actor-critic that uses the advantage A = Q − V as the learning signal.
The idea
The advantage says how much better an action was than the average action in that state. Using it in the policy gradient removes the baseline variance. A2C runs several environments in parallel synchronously and updates once per batch.
A(s,a) = Q(s,a) − V(s)
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- probability of action
- sample pushed up
- sample pushed down
The policy starts uniform: every action is equally likely.
- iteration:
- 0
- expected reward:
- 0.5
1/41
Dots under each bar are the sampled actions in the latest batch.
Step by step
- 1Collect n steps from several parallel environments.
- 2Estimate returns and advantages with the critic.
- 3Update the actor with ∇log π × advantage.
- 4Update the critic to predict returns, and add an entropy bonus.
Where it is used
A clean, strong baseline for discrete and continuous control.
Watch out for
On-policy: it throws data away after each update.