Hacker News new | ask | show | jobs
by Jtsummers 1764 days ago
https://ncase.me/remember/

Not exactly example code, but the algorithm is well-described near the end. It should be sufficiently detailed to implement that particular variation.

https://www.supermemo.com/en/archives1990-2015/english/ol/sm...

Is one of the SuperMemo algorithms, particularly SM-2, described in pseudocode form. Again, should be enough to implement it yourself.

Other algorithms can be seen as variations on these themes. Like with Anki's implementation (and I believe also SuperMemo's) there is jitter added to the schedule so that too many cards don't show up together over and over. This is to avoid the issue of remembering something because of what it's with and not on its own. With language learning, say you enter a dozen cards on colors and review them all in one day, strictly speaking they could all end up recurring at the same time in the future. By adding jitter they get spread out so you can avoid accidental "topic" days and end up with a proper mix of cards for study.