Read the equation
For 0≤λ<1, the geometric weights (1−λ)λⁿ⁻¹ sum to one and mix returns with different lookahead lengths. Small λ emphasizes shorter returns; values near one emphasize longer horizons. A finite stored trajectory requires a terminal or truncation convention, so the infinite series is the reference definition rather than a literal finite-buffer loop.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| G_lambda | Lambda return |
| G_n | n-step return |
| lambda_ | Trace-mixing parameter |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
//=============================================================================
// TD-LAMBDA FOR TEMPORAL CREDIT ASSIGNMENT
//=============================================================================
/**
* TDLambdaReturns - Computes TD(lambda) returns for multi-step credit assignment
*
* G_t^lambda = (1-lambda) * sum_{n=1}^{inf} lambda^{n-1} * G_t^{(n)}
* where G_t^{(n)} = r_{t+1} + gamma*r_{t+2} + ... + gamma^{n-1}*r_{t+n} + gamma^n*V(s_{t+n})
*/
class TDLambdaReturns {
public:
double gamma; // Discount factor
double lambda; // TD-lambda parameter
size_t max_steps;
std::deque<double> rewards;
std::deque<double> values;Exact original notation
G_t^lambda = (1-lambda) * sum_{n=1}^{inf} lambda^{n-1} * G_t^{(n)}