SM-2 Algorithm
SM-2 is the classic spaced-repetition scheduling algorithm: after each self-graded review, it updates an ease factor and computes the next interval.
SM-2 is a spaced-repetition scheduling algorithm, published by Piotr Wozniak in 1987 for SuperMemo, that computes when to next review each item based on your self-graded recall — easy items drift out to long intervals, hard items snap back to short ones.
It is the algorithm behind the explosion of spaced-repetition software: Anki's scheduler descends from it, and countless learning systems implement it outright. Its endurance comes from a rare combination — it captures the essential dynamics of the forgetting curve in a handful of arithmetic operations anyone can implement in an afternoon.
How it works
Each item carries three values: an ease factor (EF, starting at 2.5), the current interval in days, and a repetition count. After every review you grade your recall from 0 to 5, and SM-2 updates the item:
- Grade 3 or higher (successful recall): the interval grows. First success: 1 day. Second: 6 days. After that, new interval = previous interval times EF — so a mature item with EF 2.5 goes 1, 6, 15, 38, 94 days.
- Grade below 3 (failed recall): repetitions reset and the item returns tomorrow, though EF is retained.
- The ease factor itself adjusts with every grade: perfect 5s nudge it up, hesitant 3s pull it down, with a floor of 1.3 so no item's growth stalls entirely.
The elegance is per-item adaptivity. Vocabulary you find trivial stretches toward multi-month gaps; the concept that keeps slipping stays on a tight leash. No global schedule could do both.
Why it matters
SM-2 operationalizes the spacing effect — it is the difference between knowing that distributed review beats cramming and actually running distributed review across two thousand items without a spreadsheet meltdown. It also embodies an honest principle: the schedule is driven by demonstrated recall, not by time spent or pages turned. You cannot negotiate with it; you either retrieved the answer or you did not. Newer algorithms (SM-18, FSRS) model memory more finely, but SM-2 remains the reference implementation of the idea and more than good enough in practice.
A worked example
You add the item: "What does an ease factor floor of 1.3 prevent?" — EF starts at 2.5.
Review 1 (day 0): grade 4. Next interval: 1 day.
Review 2 (day 1): grade 5. Next interval: 6 days. EF rises to ~2.6.
Review 3 (day 7): grade 3. Next interval: 6 x 2.6 = ~16 days.
EF dips to ~2.46 — the hesitation cost you.
Review 4 (day 23): grade 2. Failed. Repetition resets;
see it again tomorrow, EF ~2.14.
Four reviews, and the algorithm has already learned this item is harder for you than average — and scheduled accordingly.
How Miatz uses it
SM-2 is the scheduler inside the Miatz daily training loop: every concept a learner touches becomes a reviewable item, graded on recall, with due dates computed by the algorithm. Learners also implement SM-2 themselves as an early coding rep — a tidy exercise in state, arithmetic, and edge cases — so the tool that schedules their memory is one they have built with their own hands.
