AI in Education

Spaced repetition scheduling

Spaced repetition schedules a review right before you are about to forget, which turns out to need far less total study time than cramming while remembering the same amount.

On this page 6
  1. Why it exists
  2. How it works
  3. Where you have already seen it
  4. An honest warning
  5. Remember this
  6. What to learn next

One lesson, three depths. Pick the one that fits you today — you can switch any time.

Beginner — No maths. Plain English.

Spaced repetition schedules a review right before you are about to forget something, instead of on a fixed daily routine.

Think about a bucket with a slow leak, used to water a plant. Fill it once and walk away, and by evening it is empty. Top it up right before it runs dry, again and again, and you use far less water overall to keep the plant alive all week.

Memory leaks the same way. Spaced repetition tops it up right on schedule, not too early, not too late.

Why it exists

Cramming the night before an exam works for the exam, and fails a month later. Psychologists call this the forgetting curve — a sharp early drop in memory of anything newly learned. That drop flattens out the more times something is successfully recalled.

Reviewing too early wastes time on something you still remember perfectly well. Reviewing too late means relearning from scratch. Spaced repetition times each review for the point where memory is fading but not yet gone. That is the review that does the most good for the least effort.

How it works

Many Indian students studying for competitive exams already use a physical version of this: a Leitner box system, flashcards sorted into boxes reviewed at different frequencies.

Box 1 (review daily)  ->  got it right  ->  moves to Box 2 (review every 3 days)
                       ->  got it wrong ->  stays in Box 1

Box 2  ->  right  ->  Box 3 (review weekly)
       ->  wrong  ->  back to Box 1

A card you keep getting right drifts into boxes reviewed less and less often. A card you get wrong falls straight back to daily review. Software versions of this, like Anki, do the same thing with finer-grained intervals calculated per card instead of a handful of boxes.

Where you have already seen it

  • Anki and similar flashcard apps, used heavily by medical and language students for exactly this reason.
  • Duolingo's reminder to "practice" a specific word or lesson, timed to when you are likely close to forgetting it.
  • Any vocabulary app that shows a word you learned weeks ago right when you were about to lose it.

An honest warning

Spaced repetition is well studied for memorising discrete facts — vocabulary, dates, formulas. It is not a general solution for deep understanding, problem-solving skill, or creative work, none of which reduce cleanly to "recall this fact on schedule".

Treat it as a strong tool for retaining specific facts over time. It is not a replacement for the harder, slower work of actually understanding a subject.

Remember this

  • Spaced repetition times each review for right before you would forget, based on the forgetting curve.
  • A remembered fact gets reviewed less often over time. A forgotten one resets to frequent review.
  • It memorises facts well. It is not a substitute for building real understanding.

What to learn next

Developer — Code and libraries.

Setup

No installation needed — this is plain Python arithmetic.

Minimal runnable code

This implements the SM-2 algorithm, the scheduler originally built for SuperMemo and still the basis of Anki's default scheduling.

sm2_scheduler.py
def sm2_update(ease, interval, reps, quality):
    # quality: 0 (total blackout) to 5 (perfect recall)
    if quality < 3:
        # forgot -- start the schedule over for this card
        reps = 0
        interval = 1
    else:
        if reps == 0:
            interval = 1
        elif reps == 1:
            interval = 6
        else:
            interval = round(interval * ease)
        reps += 1

    ease = ease + (0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02))
    ease = max(ease, 1.3)  # ease factor never drops below 1.3
    return ease, interval, reps

# One flashcard, reviewed six times with these self-rated recall qualities (0-5)
qualities = [4, 5, 5, 2, 4, 5]

ease, interval, reps = 2.5, 0, 0
for i, q in enumerate(qualities, start=1):
    ease, interval, reps = sm2_update(ease, interval, reps, q)
    print(f"review {i}: quality={q}  ->  next review in {interval:2d} day(s)  "
          f"(ease={ease:.2f}, streak={reps})")
Output
review 1: quality=4  ->  next review in  1 day(s)  (ease=2.50, streak=1)
review 2: quality=5  ->  next review in  6 day(s)  (ease=2.60, streak=2)
review 3: quality=5  ->  next review in 16 day(s)  (ease=2.70, streak=3)
review 4: quality=2  ->  next review in  1 day(s)  (ease=2.38, streak=0)
review 5: quality=4  ->  next review in  1 day(s)  (ease=2.38, streak=1)
review 6: quality=5  ->  next review in  6 day(s)  (ease=2.48, streak=2)

What actually happened

The interval grows fast while answers stay good: 1 day, then 6, then 16. This card was heading toward being reviewed once a month or less, for very little ongoing effort.

  • Review 4's quality of 2 (below the quality-3 threshold used here as the "remembered it" cutoff) resets reps to 0 and interval to 1. The whole growing schedule for this card starts over, exactly as forgetting a real fact should reset how soon you see it again.
  • ease, the ease factor, adjusts how fast intervals grow for this specific card. A card that is consistently easy gets a rising ease factor and grows its interval faster over time. A card that gets forgotten pulls its ease factor down, slowing future growth even after recovery.
  • The ease factor is floored at 1.3, so a very difficult card never grows so slowly that it is effectively abandoned — it still gets scheduled again, only more often than an easy one.

Common mistakes

Treating "correct" as binary instead of graded. Real SM-2 uses a 0-5 quality scale, not only right or wrong, because how confidently you recalled something matters for how soon it should return. Collapsing this to binary loses real signal.

Applying one global interval to every fact. The entire point of a per-card ease factor is that some facts are inherently easier to remember than others. A single shared interval for a whole deck throws that information away.

Assuming a forgotten card should be removed from the deck. A reset to interval = 1 is the system working correctly, not a failure. Forgetting and re-learning, at gradually spaced intervals, is how the fact eventually sticks for good.

Try it yourself

Change the quality sequence to [5, 5, 5, 5, 5, 5] — a card that is never once forgotten. Watch how quickly the interval grows compared to the example above, and compare the final ease values. That comparison is the entire reason SM-2 tracks ease per card instead of using one fixed growth rate for every fact.

What to learn next

Researcher — Mathematics and papers.

The forgetting curve

Ebbinghaus (1885) modelled retention as decaying roughly exponentially with time since last review, in the absence of further review:

R(t) = exp(-t / S)
  • R(t) — probability of successful recall at time t after the last review.
  • S — a stability parameter, larger for well-consolidated memories, smaller for fragile ones. S itself increases with each successful spaced review, which is the mechanism spaced repetition exploits: each review refreshes the memory, and also slows the future rate of decay.

Spaced repetition scheduling amounts to choosing the next review time t* such that R(t*) sits at some target retention probability (commonly 0.80-0.90 in modern scheduler design), balancing review frequency against acceptable forgetting risk.

SM-2 and successors

SM-2 (Wozniak, 1990), implemented in the developer example, uses a per-card ease factor EF (initialised at 2.5, floor 1.3) updated after every review based on a 0-5 quality rating q:

EF' = EF + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))

Interval growth after the second successful repetition is exactly interval' = interval * EF, a per-card geometric growth rate. SM-2's main documented weakness is that it fits ease per card using only that card's own review history, discarding cross-card and cross-student regularities a larger dataset could exploit.

FSRS (Free Spaced Repetition Scheduler), adopted as Anki's modern default scheduler as of 2023, replaces the SM-2 heuristics with a small trained model estimating each card's memory stability and difficulty from a much larger feature set — including response time, historical accuracy pattern, and card content similarity — fit via gradient-based optimisation against a large corpus of real review logs, rather than the fixed formula above.

Optimal scheduling as a decision problem

Formulated as optimal control, the scheduling question is choosing review times to maximise expected long-run retention subject to a total-reviews budget — Tabibian et al. (2019) frame this explicitly as a stochastic optimal control problem and derive a scheduling policy, MEMORIZE, with provable retention guarantees under their forgetting-curve model, an alternative to the heuristic SM-2/FSRS family.

Evaluation

Scheduler quality is measured by retention achieved for a fixed total review count (or conversely, review count needed for a fixed retention target), evaluated against held-out review logs — predicting whether a real review at a real elapsed time would have succeeded, then comparing schedulers by the review count needed to sustain a chosen target retention level. This needs real longitudinal review data; synthetic evaluation using an assumed forgetting-curve model, as in the developer example here, can favour whichever scheduler's assumptions most closely match the simulation and does not substitute for validation against real learners.

Papers

  • Ebbinghaus, H. (1885). Über das Gedächtnis (translated as Memory: A Contribution to Experimental Psychology). Origin of the forgetting curve.
  • Wozniak, P. A., Gorzelanczyk, E. J. (1994). Optimization of Repetition Spacing in the Practice of Learning. Origin of the SM-2 family of algorithms.
  • Tabibian, B. et al. (2019). Enhancing Human Learning via Spaced Repetition Optimization. PNAS. The MEMORIZE optimal-control formulation.
  • Ye, J. et al. (2022). Optimizing Spaced Repetition Schedule by Capturing the Dynamics of Memory. IEEE TKDE — one of several papers behind the FSRS approach.

Current state

Heuristic per-card schedulers (SM-2 and its direct descendants) remain widely deployed for their simplicity and predictability. Learned schedulers (FSRS and related data-driven approaches) are gaining adoption where enough review-log data exists to fit them reliably, and generally outperform SM-2 on retention-per-review-count in published comparisons, at the cost of needing a substantial training corpus SM-2 does not require.

What to learn next

What to learn next

These follow on from what you just read.

  • AI in Education

    Automated essay scoring

    Automated essay scoring predicts the score a human grader would give, and it correlates well with human scores on average while remaining gameable by long, repetitive, well-punctuated nonsense, a genuine and well-documented weakness.

  • AI in Education

    Building an LLM tutor

    A good LLM tutor is designed to guide a student toward their own answer instead of handing it over, the same habit a good human tutor already has, and it needs that design because a confidently wrong answer can teach a wrong fact as easily as a right one.

  • AI in Education

    Predicting which students will struggle

    An early-warning model flags students likely to fall behind, using attendance and grade trends, purely so a teacher can step in sooner, and a wrong flag can do real harm if it changes how that student gets treated.