This document describes the formulas and variables used by the SRS engine of the application.
The retention probability after a delay $t$ is:
\[P(t) = (1 - w)e^{-k t} + w\]We seek the interval $I$ such that $P(I) = R^*$:
\[I = -\frac{1}{k}\ln\left(\frac{R^* - w}{1 - w}\right)\]| Symbol | Name (field / param) | Description |
|---|---|---|
| $R^*$ | rstar |
target recall probability |
| $k$ | kFactor |
forgetting coefficient (short-term) |
| $\text{easeFactor}$ | easeFactor |
ease factor (adjusts $k$ during review) |
| $w$ | w |
long-term memory weight (determined by $\bar{R}$) |
| $w_{\max}$ | wMax (derived) |
$w_{\max} = \text{wMaxFactor}\cdot R^*$ |
| $\bar{R}$ | rbar |
weighted average of recent successes |
| $\lambda_q$ | lambdas[q] |
weighting factor associated with grade $q$ |
| $\mu$ | mu |
exponential decay rate during long pauses |
longPause |
longPause |
delay (days) after which state is fully reset |
minTolFactor |
minTolFactor |
minimum tolerance factor for delay |
| $I$ | interval |
current interval (Duration) |
nextReview |
nextReview |
DateTime of the next scheduled review |
lastReview |
lastReview |
DateTime of the last review |
history |
history |
grade history (list) |
learningStepIndex |
learningStepIndex |
learning step index (-1 = review mode) |
learningSteps |
learningSteps |
learning step durations (List<Duration>) |
easyInterval |
easyInterval |
interval in days for “Easy” graduation |
hardReviewFactor |
hardReviewFactor |
multiplier for “Hard” in review mode |
hardLearningFactor |
hardLearningFactor |
multiplier for “Hard” in learning mode |
easyBonus |
easyBonus |
multiplier for “Easy” in review mode |
iMax |
iMax |
maximum interval (days) |
defaultEF |
defaultEF |
default ease factor value |
defaultW |
defaultW |
default w value |
wMaxFactor |
wMaxFactor |
factor used to compute $w_{\max}$ |
dayBoundary |
dayBoundary |
duration representing the day boundary (Duration) |
(Verified: all fields present in SRSState and SRSConfig are listed above.)
After an observation obs (1 = success, 0 = failure) and a weight $\lambda_q$ depending on grade $q$:
\(w = w_{\max}\cdot \bar{R},\qquad w_{\max} = \text{wMaxFactor}\cdot R^*\)
On a successful review:
\[k_{\text{new}} = \dfrac{k_{\text{old}}}{\text{easeFactor}}\]With updated $k_{\text{new}}$ and $w$:
\[I_{\text{next}} = -\frac{1}{k_{\text{new}}}\ln\left(\frac{R^* - w}{1 - w}\right)\]Constraint applied: $I_{\text{next}} \le iMax$ (in days).
Let $\Delta t$ be the time elapsed since the last review and $I$ the expected interval. Define:
\[l = \max(0,\Delta t - I)\]Tolerance:
\[\text{tol} = \min(\text{longPause}, \text{minTolFactor}\cdot I)\]$\mu$ controls the rate of memory loss after a long absence.
Multiplying wMax by Rbar ensures that w <= wMax while avoiding an abrupt discontinuity.
learningStepIndex == -1.getLambda(q) and influence both $\bar{R}$ and the evolution of easeFactor:
computePreview* and apply* in SRSState.easeFactor) and update of easeFactor if in review mode.interval, nextReview, lastReview, history.File: docs/maths_and_srs/maths_srs.md — key formulas and variables of the SRS.