TL;DR: How exactly is recall period calculated in Anki (in a few lines of pseudo-code or equations)?
I would like to understand the logic which calculates the card review period.
Currently, I only have a high level conceptual understanding of how it works i.e. the more difficult the question is rated (by user response at each card recall and difficulty level assigned by the card creator (Easiness-Factor), the shorter the period until next recall.
The Anki Manual says Anki uses SuperMemo’s SM-2 algorithm but the link referencing that just takes me back to the Anki Manual home page (Anki Manual).
The nearest answer I could find was on SuperMemo:
1. Split the knowledge into smallest possible items.
2. With all items associate an E-Factor equal to 2.5.
3. Repeat items using the following intervals:
**I(1):=1**
**I(2):=6**
**for n>2: I(n):=I(n-1)*EF**
where:
* I(n) - inter-repetition interval after the n-th repetition (in days),
* EF - E-Factor of a given item
If interval is a fraction, round it up to the nearest integer.
4. After each repetition assess the quality of repetition response in 0-5 grade scale:
5 - perfect response
4 - correct response after a hesitation
3 - correct response recalled with serious difficulty
2 - incorrect response; where the correct one seemed easy to recall
1 - incorrect response; the correct one remembered
0 - complete blackout.
5. After each repetition, before computing the new interval, modify the E-Factor of the recently repeated item according to the formula:
EF':=EF+(0.1-(5-q)*(0.08+(5-q)*0.02))
where:
* EF' - new value of the E-Factor,
* EF - old value of the E-Factor,
* q - quality of the response in the 0-5 grade scale.
If EF is less than 1.3 then let EF be 1.3.
6. If the quality of the response was lower than 3 then start repetitions for the item from the beginning without changing the E-Factor (i.e. use intervals I(1), I(2) etc. as if the item was memorized anew).
7. After each repetition session of a given day repeat again all items that scored below four in the quality assessment. Continue the repetitions until all of these items score at least four.
So I tested this for the case of a single new card in a new deck in Anki v2.1.30 (without changing any of the default settings). Answered it correctly (selected “Good <10 mins”). It immediately asked me the same question again. I gave the same response again (“Good <10 mins”). Then it ended the session ("… finished this deck for now"). I checked the card details to find the the next recall was due tomorrow.
I don’t know what the units of the equation provided by SuperMemo for the first and second recall times (I(1):=1 … ) but I cannot see how I would get from those equations to the results I see in Anki. Please could someone help me understand what I am missing? Thank you.