Hacker News new | ask | show | jobs
by erolx 2096 days ago
https://en.wikipedia.org/wiki/SuperMemo
1 comments

Thanks. I read the section “ Description of SM-2 algorithm” but I don’t what determines when to show a given card.
I'd look at this from the SuperMemo site: https://www.supermemo.com/en/archives1990-2015/english/ol/sm...

It does a better job of explaining the algorithm. Initially all cards will have an e-factor (easiness in the wiki description) of 2.5. Your card database should have the following per card:

  contents, e-factor(easiness), repetition, interval, last_shown_date
You can optionally add in a next_review_date which you'll calculate after showing and grading the card. Query your database (which may be a flat file, sqlite, whatever) for all cards whose interval + last_shown_date (initially this should be the creation date) is today or earlier (or whose next_review_date is today or earlier if you calculated that already). Those are the ones to review.

You can also distinguish between new, learning, and review cards. New cards have repetition of 0, learning have repetition of 1 or 2, and review are higher than that. This can help with determining which cards to show each day. If you create 1000 new cards today, you don't want to review them all in the same day. A reasonable count may be 20 new + 20 learning + 100 review. This means with 1k new cards today, assuming you learn all of them and don't reset any, you have 50 days to get all the new cards learned, 57 or so days to move all of them to review, and after that you start reviewing them. During that time, your busiest review would only be 140 cards or so. Play with those numbers based on your own experience.

Something Anki does is increase the interval based on the actual review date. So let's say I review something and the new interval is 100 days. If I don't get to it for 200 days and it's "easy" (3 or 4 or 5), should it only be modified by easiness * 100? Anki adjusts it (in my understanding) by the actual interval (not the minimum) so it'd be easiness * 200. On a really easy card that means 500 days from now, versus only 250 days if the target interval were used. An example of this being helpful, I have a Spanish deck with a lot of verbs, some I know well like "ser". If I don't study for a couple months and "ser" pops up, I know it without thinking I give it a 5 and I don't see it for a very long time. A harder verb for me like "olvidar" that I get wrong would just get reset back to 0 repetitions/smallest interval.