A Discussion of the Anki Algorithm
SRS is one of the most powerful learning tools we have available to us. However, it’s no secret that Anki is pretty un-optimal out of the box. This is (sort of) for good reason.
For starters, there’s not nearly enough research on the subject of spaced repetition, especially when it comes to the algorithm itself. Anki uses the SM-2 algorithm, which was created for SuperMemo in the 1980s. SuperMemo on the other hand has been continuing to update their algorithm, and as of 2019 they are on SM-18.
The reason for such a gap is because the SM-2 algorithm is publicly available, while the newer versions aren’t.
That said, newer isn’t necessarily better. A comparison in Battle of the Spaced Repetition Heavyweights: Anki vs. Supermemo showed that while the total number of reps and review time was lower for SuperMemo, so was the the accuracy.
For those that are too lazy to click on the actual article, the average accuracy for Anki was 91.8%, while SuperMemo was 65.7%.
This result may come as a surprise to those assuming that decades of research and algorithm refinement should have resulted in something far superior to SM-2. However, it actually makes a bit of sense.
There’s no shortcut to learning. No matter what, you have to put in serious effort to reach proficiency in something. Trying to reduce that work will obviously show effects in your retention.
Furthermore, SRS algorithms historically haven’t been particularly scientific anyways, so it’s hard to say for sure that a newer implementation will definitely be better than its predecessor.
One major difficulty in designing a good algorithm is the sheer breadth of things that can be learned. For example, learning new vocabulary is much different than learning mathematical formulae. There’s even a significant difference between learning new vocabulary in your native language and your target language.
Given that there’s so much variance of things to be learned, it’s hard to expect a single algorithm to be equally effective for all of them. For that reason, it’s useful to take matters into your own hands — examine your own learning statistics, and slowly make tweaks over time.
In order to improve the effectiveness of Anki, we first need some sort of way to define and measure “effectiveness”. The generally agreed upon metric (and what we’ll also be using) is true retention. True retention doesn’t come with Anki by default, you’ll have to install the addon. There’s actually a few options you have to pick from:
- True Retention (the original)
- True Retention by Card Maturity
- True Retention by Card Maturity Simplified
While all three are useful, I personally prefer True Retention by Card Maturity.
However, this isn’t the only useful metric. In fact, if you looked at true retention alone, you’d be missing some crucial elements:
- New Cards Per Day
- Review Count
- Review Time
Fortunately, these statistics are built in to Anki, so there’s no need to install any addons.
These three metrics provide useful information that you would have otherwise missed had you only looked at true retention. Consider the following:
A pair of identical twins are using Anki to learn French. Both twins have identical settings, and have near-identical retention rates. As an experiment, one twin changes their new cards per day to 30, while the other twin changes theirs to 10.
With this change, do you think the twins will still have the identical retention rates?
Trying to jam more and more things into your head in the same period of time will have diminishing returns, and at some point likely have adverse effects.
Suppose, on the other hand, one twin learned using vocabulary cards, while the other learned using sentence cards. While it’s possible (although unlikely) that they could have similar retention rates, their review times would vary drastically. Supposing that one twin finished 30 minutes quicker, that 30 minutes could be spent immersing.
What if one twin made a change to their learning steps that doubled their number of reviews, but it ended up reducing their average answer time by 75%?
These are all scenarios that can’t be measured by true retention alone. However, true retention still remains at the heart of each issue. Even if vocabulary cards could reduce your study time by 30 minutes, if it halves your retention rate it’s a useless change.
I would love to provide some formula using these metrics that would most accurately define SRS effectiveness. However, I don’t really have a good way of doing so, and I’m not sure it would even be a great idea if I could.
Instead, all of our following discussions will be firstly targeting true retention rate at the highest priority. Following that is new cards/day and review time, which have roughly the same priority. Lastly, review count may occasionally be discussed, but it’s a less important metric than the others due to how closely related it is with review time.
Before discussing settings, we should get addons out of the way (since they’ll have their own settings to deal with).
While there are plenty of addons that I would love to recommend, here I will only be discussing addons that play a role in optimizing the previously mentioned metrics.
Straight Reward is the solution I prefer for solving ease issues within Anki. From the Ankiweb page:
This add-on increases the ease of Anki cards when you consecutively rate them “Good”, or “Easy”. Rating a card “Good”, or “Easy” is considered a “success”. Once you exceed a specific amount of successes, it is considered a “success straight”. In such a case, Straight Reward will raise the ease of these cards. The default settings will mean that you need three consecutive successes to recover the ease loss after pressing “Hard”, and four to recover from “Again”.
A notable aspect of this addon is that it will apply itself upon sync, which means even if you do the majority of your reviews on mobile, this will still work as long as you occasionally sync on your PC.
Straight Reward solves one problem, and one problem only: ease hell. However, there are multiple options for combating this problem, and you should be aware of the alternatives.
Low-Key Anki was previously a very popular solution. It simply removed the ease system from Anki entirely. However, that’s a bit of a crude solution and removes some of the main benefits of SRS. Feel free to use this solution if you want, it’s worked for many people, but I personally believe it’s a less-than-ideal “solution”.
Auto Ease Factor is the main competitor of Straight Reward. Both are very good at what they do. Therefore, I think it warrants a bit more discussion on comparing the two.
To start, you should understand the approach that each addon takes to solve the problem. Straight Reward will give your ease a “boost” after getting a card correct a certain number of times. On the other hand, Auto Ease Factor will automatically adjust the ease up or down over time to try to hit the target retention you’ve set.
Both solutions work, but both also have some drawbacks.
Straight Reward has the issue of being perhaps a bit less logically sound than Auto Ease Factor. A common complaint is that the boost you get from Straight Reward is arbitrary, not really backed on anything in particular. On the other hand, Auto Ease Factor has a particular retention it’s aiming for, and it will methodically adjust over time to try to hit that point.
Auto Ease Factor has a few issues.
To start, it’s a bit sketchy when used in conjunction with “micro-learning-steps” (more on that later). It also is apparently a bit worse than Straight Reward for people who mainly rep on mobile (although I haven’t tried it myself).
Perhaps the biggest downside is that it can try to force your retention down. For example, if your target retention is 85%, but your actual retention is 92%, it will force you to fail until you are at 85%. Depending on the person, this behavior could actually be desirable. For others however, it could be a big turn off.
Migaku Vacation is another potential solution for maintaining card ease, although admittedly I don’t know much about how it works. I don’t use it for reasons mentioned in the Load Balancer section.
Similar to Load Balancer, PassFail is a non-mandatory addon, but it may be desirable for you. As part of the solution to solving the ease problem, PassFail removes the easy/hard buttons. Of course, you could simply not press those buttons and get by perfectly fine without this addon. This can help with making sure you don’t accidentally press them though.
Progress Graphs and Stats for Learned and Matured Cards
This addon does exactly what it’s called. From the Ankiweb page:
Anki includes a Review Count graph that plots the total reviews for learning, relearning, young, and mature cards. This graph is great if you want to know how many reviews occurred in each category, but it can be difficult to understand progress using it. Since one of the goals is to learn cards and have them eventually mature, this plugin tracks statistics for that specifically.
This addon may be useful as a metric by which you tweak your settings. It may also just be interesting to look at occasionally.
Learning Step and Review Interval Retention
This addon provides retention statistics for each of your individual learning/relearning steps.
This is incredibly useful for optimizing your learning steps between different decks.
I’ll be the first to admit that these settings aren’t perfect. However, they’re the best that I’ve come across so far. I’m always looking for ways to improve them though, so let me know if you have any suggestions.
You can read this menu via Tools > Preferences (or Ctrl+P).
The first three options are completely optional.
Anki 2.1 scheduler is worth enabling in my opinion. It doesn’t change too much, but it does have a number of small fixes that you can read about here. I’ve been using it for over a year now without noticing any issues.
I will talk about learn ahead limit a bit later.
This is one of the most contentious settings among Anki users. All 3 options have valid use cases which will depend on the person. Let’s talk about some of them.
Show new cards before reviews
This is probably the most common option. The benefit it has over mixing new cards and reviews is that it’s easier and less annoying. The benefit it has over showing new cards after reviews is that it gives you time to get through your learning step intervals.
For example, suppose your learning steps were: 1 5 60. If you did your new cards at the end, you’d be done before your 60m interval was up. However, by doing them at the beginning, it allows for those intervals to play out a bit.
Show new cards after reviews
I believe this to be the least “correct” option, however it’s the one I’m using currently. The reason is, it’s the most flexible out of all the options. In particular, it’s the best for people with busy or changing schedules.
Suppose you work from 9am to 5pm. Perhaps you can fit in 20 minutes of Anki before work or at lunch, and then you finish your reviews at home at the end of the day. However, maybe something comes up and you have to stay late. Or maybe you’re just too exhausted at that point to finish your reps.
If you did your new cards first, you’d be stuck doing the full workload in that scenario. However, if you do them at the end, you could decide to skip out on some/all of the new cards (only doing reviews).
Again, in terms of effectively learning things, I would not recommend this setting at all. However, if life dictates that you frequently need to skip learning your new cards, you might throw them at the end to make the option a bit easier.
Mix new cards and reviews
This is technically the most “correct” option. In chapter 3 of Make It Stick, the author introduces the idea of interleaved learning, which I think loosely applies here. The idea is that by learning several unrelated things at once, they’ll all stick better in the long term.
However, the main benefit of mixing new cards and reviews is the subject of chapter 4, Embrace Difficulties. The idea is, learning happens when your brain struggles to retrieve information. If you come up with the solution immediately, you’re not learning (you’re remembering). The harder your brain works at retrieving information, the more learning occurs.
The reason why this is relevant is that mixing new cards and reviews doesn’t give you any indication of whether or not you “know” the word. It could be new, it could be known. Regardless, you’re going to have to spend some time really trying to think about it.
Even if the word is new to you, the act of trying to think of the reading/meaning of it will do you great service in learning it. Had you done all of your new cards before/after your reviews, you probably wouldn’t think to much about them because you know they are unknown so there’s no need to expend the effort trying to recall them.
I don’t have super strong opinions on the Load Balancer settings, I got these from Animecards.
If you’re using a newer version of anki your deck options won’t look like this, so it may be difficult to follow along. Instead, hold the shift key on your keyboard when you press the “options” button, and it will show you an options menu similar to the pictures below
I’d recommend creating separate options groups for each deck you use. This is useful for making small adjustments to individual decks rather than being forced to apply those changes to everything.
Learning steps are one of the most interesting settings available to us, so it’s worth giving it some extra attention. To start, I’ll show my current learning steps, and afterwards I’ll talk a bit about how I reached these steps, as well as how you might consider tweaking them for your own decks/needs.
My steps were originally based on the Animecards setup.
The most interesting aspect of this setup is the last step: 60 minutes. The reason this is interesting is because it’s paired with a setting from the preferences window, Learn ahead limit. This setting allows you to see a card x minutes before it’s actually due. In the Animecards setup it’s set to 900 minutes, while I have mine set to 400.
Learn ahead limit will only show you the card early if there are no other cards to view. Otherwise it will wait until the correct time specified by your learning steps. This means that if you do your new cards first and your reviews only take 45 minutes, then you’ll see your final step at the end of the 45 minute session (instead of having to wait the full 60 minutes).
You might then ask, what’s the point of setting a 60 minute interval if we’re going to review it early?
The point of that interval isn’t to test yourself on the card after 1 hour — it’s to test yourself at the end of the session.
60 minutes should be long enough that you can finish all your other reviews in that time. The point of the 60 minute interval is to over-shoot your estimated review time, then use the learn ahead limit to see them at the end.
After using 1 5 60 for awhile, I came across a few people making a case for longer learning steps. For some people their longest steps even went up to 30 days!
The argument for longer learning steps is based on two main points:
- Cards ease isn’t affected while they’re in the learning state.
- Cards should be “learned” after they graduate.
The issue with graduating after only 1 day of reviews is that you’re very likely to forget difficult cards within the next day or so. However, by that point the card will continually lose ease due to failures. This means that by the time you actually “learn” the card, its ease will be completely tanked.
Another issue with this setup is that cards in the “learning” state are optimal for learning new things, while graduated cards are not. That is, if you graduate a card without fully learning it, you’ll have a much more difficult time learning it than if it had remained in the learning queue longer.
Therefore I decided to experiment with the steps 1 5 60 900 4000 6900. The larger steps would let me see the card after 1 day, 3 days, and 5 days. My graduating interval was 7 days.
I found this to be a good change that kept any unknown cards from being graduated. That is, if a card left the learning state, I was confident that I knew it. Of course, I would still forget cards occasionally, but I almost never found myself with leeches (since, in my opinion, a leech is caused by an unlearned card graduating).
After using 1 5 60 900 4000 6900 for awhile, I was introduced to the idea of “micro-steps” by nocompo on Discord. These steps frontloaded the effort by cramming hard upon first seeing the card. After the cramming period, the steps would be normal again. So for example, the steps might be 0.08 0.16 0.32 0.64 5 1440.
These micro-steps aren’t really useful for reviewing known information. However, they are fantastic for learning new information. When it comes to learning vocabulary, it’s incredibly useful to gain repeated exposure up front before trying to start testing on it.
I decided to try out this concept by using the steps 0.32 0.64 5 60 900 4000 6900.
Of course, adding these extra micro-steps would add to my number of daily reviews. Despite that, I found that my total review time actually lessened. This is for a couple of reasons.
First, it made me stop failing the 5 minute interval nearly as much.
Suppose your steps are 1 5 60. Say you pass the 1 minute interval. Then you have to wait 5 minutes before seeing it again, but by then you’ve forgot it. Fail, and wait for the 1 minute interval again, before getting another shot at waiting another 5 minutes. What if you fail again?
I found that for difficult cards, those first 2 steps were what was dragging me down. I needed some more exposure to make the words start to stick before I started testing myself on them. With the micro steps, even if they don’t stick it only takes me a few seconds before I see it again, not a few minutes.
Second, I found that by the time I got to the 60 minute interval, I would know the words much better with the micro steps setup. Originally, by that point I would have to really struggle to recall a word after 60 minutes. Perhaps I would spend 20-30 seconds racking my brain to think of the reading/meaning. However, with the micro steps setup my retention for the 60 minute step is 98.5%! My retention is much higher, and along with that, my answers are much quicker.
After this setup for awhile, I eventually decided to drop my longest step — leading to my current setup 0.32 0.64 5 60 900 4000. The reason for this is simply because after reaching the final interval, it was soul crushing to go back through all of the micro steps and work my way back up again. My new graduating interval is 5 days to reflect this change.
February 2022 edit: As pictured, my steps are now 0.32 5 60 1300. There are a couple of reasons for this that I’ll explain so you can decide for yourself what to make your steps.
First, I removed the longer steps, so my longest step is only 1 day after seeing the card for the first time. This is because failing the longer intervals got really frustrating over time, and I didn’t notice enough benefit to warrant keeping them. Instead, I keep a 1 day interval for my last step just to make sure I know it well enough, and then let the algorithm handle it from there. This is something I’d recommend for pretty much anyone at this point.
As for the microsteps, that’s a bit trickier. As you learn more words in your target language, it becomes increasingly easy to learn new ones. Microsteps are incredibly useful in the beginning when learning words is difficult, but once you get better they become unnecessary and just add extra reviews without much benefit. For that reason, I still recommend microsteps at the very beginning, but at some point I think it’s better to mellow out to something similar to my current steps.
There’s nothing particularly interesting here. I should mention that maximum reviews/day, along with maximum interval should be set very high. If you limit those options, you miss out on some of the main benefits of SRS.
These settings are for the Straight Reward addon. My settings aren’t particularly special, and are perhaps a bit conservative. However, since my starting ease is 300% anyways (which is the same as my stop at ease), none of this really matters too much unless I fail a few times at the beginning which will lower my ease.
The follow is an alternative, which is the settings used by Ihillman, and may be preferable.
Of course, feel free to modify these numbers however you see fit. It is a bit arbitrary (not particularly scientific), so it may be worth slowly adjusting and finding the sweet spot for yourself.
I know many people took MattvsJapan’s advice and have been using 70% since they started learning Japanese. However, this might not be ideal (even if it is painful to lose a long interval).
I previously used 2 60 for my relearning steps, along with a new interval of 50%. My retention for those are 96.9% and 99.7% respectively. I recently decided to switch my settings due to the following argument by nocompo:
Here’s the thought from a theoretical view. Anki does well as long as it predicts our current forgetting curve. The curve depends on our current “strength of memory”. When we lapse, the current strength is unknown.
The re-learning step(s) we re-train the item so the memory strength increases a bit from (unknown) to (unknown + some value). It’s still an unknown.
Let’s look at a case. Say we correctly answered a card after 3 months, then it’s next review interval is 250% of that so 7.5 months. At 7.5 months we fail the card.
(Scenario A) Suppose we did 3 re-learning steps then lower the interval to 70% or 5.3 months. At 5.3 months we review and we pass, or fail… oops. So we did 4 reps to find out the learning curve is fine, or it’s wrong and have to repeat. In the best case scenario after 4 steps we succeeded at an interval of 5.3 months (1min, 10min, 15min, 5.3 months). In the worst case we do 4 steps and then repeat next time with with a 3.7 month interval.
(Scenario B) Suppose instead we do 1 re-learning step and reset the interval to 25% or 1.9 months and at 1.9 months we pass, or we fail. So we did 2 reps to find out the learning curve is fine, or it’s wrong and have to repeat. It’s more likely to be fine than Scenario A since the interval is shorter. In the best case scenario after 4 steps we could get to 12 months (10min, 1.9 months, 4.8 months, 12 months). In the worst case we do 2 steps and then repeat next time with a 0.5 month interval.
Hopefully you can see the theory that B might converge to the ideal interval quicker, and also has more up-side potential for the same number of reps.
As far as handling leeches… My approach is a bit unpopular.
Many people set their leech threshold very low (like 4 maybe), and set it to suspend. Personally, I really dislike it when Anki auto-suspends my cards. I like being more in control of things and making my own judgement. If I feel like a card isn’t worth the effort, I tend to suspend/delete it manually when it comes up.
However, even though I’m pretty much handling leeches manually, I do allow Anki to suspend a card if I fail it 11 times. 11 is a bit arbitrary, feel free to pick a different number if you want.
The idea is, if a card reaches that point and I haven’t manually suspended it, I acquiesce that my own judgement was wrong and it’s probably not worth the continued effort.
How Note Type Affects Retention
The main card types are:
- Word cards
- Sentence cards
- Word context cards
These cards form a sort of balance between speed and retention, and you’ll have to make sacrifices somewhere.
Word cards are extremely fast to review, but will give you the worse retention.
Sentence cards will likely give you the best retention rate, but will be extremely slow to review.
Word context cards will be somewhere in the middle (which is why they’ve sort-of become the standard).
Personally, I use word context cards where I test on the word only on the front, and (sometimes) listen to the sentence audio on the back (while reading along). Some people only review the sentence on the back when they fail the card, others do it every time. I do it depending on how tired I am that day.
If you are just starting out (<1000 words known), I think it’s probably worth your time to do sentence cards since they’ll probably give you a better feel for the context in which words are used. After that, feel free to switch to a quicker note type if you feel like it, or stick with sentences all the way if you enjoy them (lots of people have done nothing but sentence cards for years and found success with them).
On the Subject of Retention Rate
Due to this legendary blog post the prevailing advice has always been to aim for a retention rate somewhere between 80%-90%. Personally I like to be closer to 90% (or even a bit higher if possible) than 80%.
This is simply because it’s much more enjoyable to review cards when you’re getting them correct. However, like I mentioned earlier, learning isn’t easy. If you’re not struggling, you’re also not learning.
It’s important to find a balance of actually learning and your own happiness. I think it’s equally important to not dread your reviews every day. If you’re really hating Anki, trying adjusting some settings to force your retention rate upwards.
If your retention is below 80%, that’s definitely a sign that some changes need to be made.
Before going on this quest to optimize Anki, I had been using the Low-Key Anki setup for about 8 months. My 1 month retention was 79%. 2 months into making these tweaks it had risen to 88%. And it was noticeable.
In addition, my 30 day total review count rose from 7192 reviews to 11253 reviews. Micro steps likely played a big role in that.
Despite the increase in reviews, my 30 day total review time lowered from 1507 minutes to 1435 minutes.
Anki And Immersion Feed Off Each Other
Any immersion-centric language learner knows that Anki plays a secondary role in the learning process. In particular, Anki helps you more easily recognize words in your immersion.
However, the opposite is equally true.
By immersing more, you will pass your Anki reviews more. By extension, slipping up on your immersion will almost assuredly lead to lower retention rates in Anki.
I’m sure I’m preaching to the choir, but to anyone who’s made it this far, I’ll end with the following words:
- Removed the “Load Balancer” section (the addon doesn’t work on newer versions of anki and is seemingly no longer maintained)
- Updated learning steps