Lesson 66
A3C
Run several actors at once and push their advantage updates to a shared model without waiting for a barrier. One example is on this page.
Intermediate12 min
What You Will Learn
- Idea
- Example
- When to use it
Idea
Asynchronous Advantage Actor-Critic uses the same advantage as A2C. Workers act in their own copies of the environment and apply updates to a shared model when they finish a short rollout. They do not wait for every other worker. Different environments keep the updates from being copies of one trajectory.
Example
worker_grads = [0.4, 0.8]
shared = sum(worker_grads) / len(worker_grads)
print(f"shared step: {shared:.2f}")Output:
shared step: 0.60When to use it
- Use the same advantage idea as A2C when you want workers that do not sync every step.
- The printed step is the average of two worker updates landing on one model.
- Modern code often prefers the synchronous A2C or PPO. The advantage math is the part to keep.
Loading playground…