# Uogólniona estymacja przewagi (GAE)

EN: **Generalised advantage estimation (GAE)** · id `gae` · aliases: GAE, generalized advantage estimation

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie ze wzmocnieniem i decyzje](https://aiatlasgraph.com/t/decisions.md) › [Algorytmy RL](https://aiatlasgraph.com/t/rlalgorithms.md) › [Gradient polityki (REINFORCE)](https://aiatlasgraph.com/t/policygradient.md) › Uogólniona estymacja przewagi (GAE)

## Description

- PL: Estymator przewagi będący wykładniczo ważoną sumą błędów TD (parametr λ), pozwalający płynnie wybierać kompromis między obciążeniem a wariancją w gradientach polityki.
- EN: An advantage estimator formed as an exponentially weighted sum of TD errors (parameter λ), smoothly trading bias against variance in policy gradients.

## In one sentence

- PL: Sposób oceniania, o ile dany ruch był lepszy od przeciętnego, tak żeby sygnał do nauki był mniej przypadkowy.
- EN: A way to judge how much better a move was than average, so the learning signal is less random.

## Problem it solves

- PL: Ocena ruchu na podstawie całej dalszej gry jest bardzo zaszumiona, a ocena tylko z najbliższego kroku bywa myląca.
- EN: Scoring a move from the whole rest of the game is very noisy, while scoring from just the next step can mislead.

## What it does

- PL: Jak ocena pracownika ważąca bieżące wyniki mocniej niż odległe skutki, ale nie pomijająca ich całkiem.
- EN: Like an employee review weighting recent results more than distant effects, without ignoring them entirely.

## Everyday example

- PL: Agent sterujący symulowaną postacią uczy się biegać stabilniej, bo dostaje mniej rozchwiane podpowiedzi, które ruchy pomogły.
- EN: An agent controlling a simulated character learns to run more steadily, getting less erratic hints about which moves helped.

## This concerns you if you…

- PL: trenujesz agenta, który uczy się z ocen własnych ruchów
- PL: dostrajasz parametry, które wpływają na stabilność treningu
- EN: you train an agent that learns from scores of its own moves
- EN: you tune settings that affect training stability

## Keywords

TD(lambda) · lambda-returns · value baseline · PPO · actor-critic · variance reduction

## How it works

- PL: Dla każdego kroku liczy się błąd TD z wyuczonej funkcji wartości, a przewagę jako sumę kolejnych błędów TD ważonych przez (γλ)^k. Przy λ=0 dostaje się jednokrokowy estymator TD (mała wariancja, większe obciążenie), przy λ=1 zwrot Monte Carlo minus wartość. GAE jest standardowym składnikiem PPO.
- EN: For each step a TD error is computed from a learned value function, and the advantage is the sum of subsequent TD errors weighted by (γλ)^k. λ=0 gives the one-step TD estimator (low variance, more bias), λ=1 the Monte Carlo return minus value. GAE is a standard component of PPO.

## Limits

- PL: Jakość zależy od dokładności funkcji wartości; słaby krytyk wprowadza obciążenie. Wymaga strojenia λ i γ, a jego zastosowanie dotyczy głównie metod on-policy.
- EN: Quality depends on the value function's accuracy; a poor critic introduces bias. It needs λ and γ tuning and applies mainly to on-policy methods.

## Key terms

- PL: **błąd TD**: Różnica między przewidywaną a zaktualizowaną po kroku oceną sytuacji.
- PL: **λ (lambda)**: Parametr decydujący, jak daleko w przyszłość sięga ocena.
- PL: **kompromis obciążenie–wariancja**: Mniej szumu w ocenie kosztem systematycznego błędu.
- EN: **TD error**: Difference between predicted and post-step updated value of a situation.
- EN: **λ (lambda)**: Parameter setting how far into the future the estimate reaches.
- EN: **bias–variance trade-off**: Less estimate noise at the cost of systematic error.

## Know first

- [Uczenie z różnic czasowych (TD) i metody Monte Carlo (Temporal-difference learning and Monte Carlo methods)](https://aiatlasgraph.com/t/tdlearning.md)
- [Metody aktor–krytyk (A2C, SAC) (Actor–critic methods (A2C, SAC))](https://aiatlasgraph.com/t/actorcritic.md)

## Related topics

Untyped, symmetric "see also" links.

- [Proximal Policy Optimization (PPO) (Proximal policy optimization (PPO))](https://aiatlasgraph.com/t/ppo.md)

## Sources

- [High-Dimensional Continuous Control Using Generalized Advantage Estimation](<https://arxiv.org/abs/1506.02438>) `gae-2015` · by John Schulman; Philipp Moritz; Sergey Levine; Michael Jordan; Pieter Abbeel

---

AI Atlas revision 128 (2026-11-04) · HTML: https://aiatlasgraph.com/t/gae · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-04
