# spaced repetition algorithms I'm writing Space Cadet, a REST-based engine to automate Spaced Repetition practice in an minimally opinionated way. Ultimately, I want anyone who uses this engine to be able to write their own spacing algorithms, but since I'm the guinea pig here, I'll simply implement a few simple ones and use them randomly (and blindly) over time, then after a period I'll look at my recall accuracy to see which algorithm was best suited to me and my memory, if any at all. [Interactive notebook here.](https://observablehq.com/@luciyer/spaced-repetition) Let's look at a few examples. ## uniform repetition Every `h` hours, for example, `h = 72`: ![[media/sr1.svg]] ## simple exponential function Every `h = 2**n` (2-to-the-nth) hours where `n` is the repetition number: ![[media/sr2.svg]] ## ebbinghaus' forgetting curve Assuming `R >= 0.9` (retention of 90% or better), we can make assumptions about what function models `S`, or "stability of memory." If stability increases exponentially, ie. `S = e**t` (e-to-the-t) where T is time. ![[media/sr3.svg]] If stability is linear, ie. `S = et`: ![[media/sr4.svg]] If stability shows decreasing marginal returns, ie. `S = C*sqrt(t)` where `C` is some constant: ![[media/sr5.svg]] That's all for now. These are very oversimplified, but ultimately that's inconsequential as I only need them for testing purposes. An ideal algorithm would be a bit more complex (ie. "content or context aware") and adaptive over time. That's a little beyond the scope of what I want to figure out at this time.