35 0
Contact Author Sign in to rate

Auto Ease Factor

0.15MB. Updated 2020-11-01. Only supports Anki 2.1.x.

Description

# experimentalCardEaseFactor Dynamically adjusts ease factor on cards automatically after each rep, constantly seeking the right ease adjustment to hit a target success rate. See: eshapard's "Thoughts on a new algorithm for Anki for the original rationale. Important: **You must NOT/NOT use an interval modifier in your deck options**. Your interval modifier MUST be set to 100% (no change) for all decks. Otherwise this algorithm could be constantly chasing a moving target. #### Differences from eshapard's version Unlike eshapard's version, which requires four reviews before the algorithm kicks in, this version lets the algorithm adjust ease factors as early as possible, including using information from learning steps. Early data is less reliable, though, so we do two things: we limit how much the algorithm can change the ease factor at first, and we use a moving average to more heavily weight recent reps when calculating success rate. If it took you a long time to learn a card originally, but now you've really got it down, your ease will rebound very quickly. The 'leash' setting ties your ease factor down at first, which limits the initial swings of the algorithm until you've had many more reviews and better quality data. If you're used to ease factors very close to 250%, without a low leash, this algorithm can produce some alarmingly low (or high) ease factors. It will generally auto-adjust very quickly based on your performance though. My anecdotal experience is that it front loads the work a bit, causing more reviews with short intervals in the beginning for hard cards, but backing off quickly after I know a card well. ### Installation #### In Anki, Tools > Add-ons > Get Add-ons... Then use this code: 1672712021 #### Manual installation Create a new folder named *autoEaseFactor* in your Anki addons directory. Save `__init__.py`, `autoEaseFactor.py` and `YesOrNo.py` to this folder. If you don't want to use `YesOrNo.py`, you can simply disable 2-button mode in settings. ### Configuration There are a few options that can be configured by editing the addon: 1. 'target_ratio' is the success rate you want to aim for (e.g. 0.85 for an 85% success rate) 2. 'leash' controls how much the ease can change per review, so a small leash of 10 or 50 will not let the algorithm adjust things until it has much more data. 3. moving_average_weight indicates how much to focus on more recent results when determining success rate. Higher numbers will focus more on recent performance. (This is very sensitive, values between 0.07 and 0.3 are reasonable). 4. min_ and max_ ease set the bounds of how far the algorithm can set the ease. This is "per mille," so 5000 = 500%. 5. two_button_mode makes the system "pass/fail" -- you can disable that by setting this to false (though saving mental load on each review is the primary benefit of this add-on, so I would recommend you leave this true if you can). ## YesOrNo.py Hard and easy add more choices that delay reviews and make you responsible for determing your ideal ease rating. The ease factor algorithm adjusts ease for you, so you just need to choose either "Again" or "Good" on any given card. The YesOrNo.py addon changes your options to Pass/Fail to help streamline your self evaluation, similar to low-key Anki and ja dark's work that inspired it. I suggest that you use the YesOrNo addon and that you disable *Show next review time above answer buttons* in Tools > Preferences... Seeing the next review times will just distract you from studying. If you just want to try this out, but you're worried about losing all the ease factors you've built up so far, there's another add-on that lets you export a deck's current ease factors and re-import them later. You could use that to "save" your ease settings for a deck, try this add-on, then if you don't like it, reload your old ease settings later. Reset Ease Automatically: https://ankiweb.net/shared/info/12081346 (Import/Export Ease Factors is added to individual deck settings with that add-on.) ## Acknowledgments eshapard ja-dark cordone brownbat (me) (hat tip to the MIA crew for inspiration and to the AnKing for helping me figure out how all this works) I am not requesting support, but the original author, eshapard, can receive tips at this link: https://paypal.me/eshapard/1 Shout out to other devs working on similar issues: Straight Reward -- https://ankiweb.net/shared/info/957961234 ### Changes #### 2020-10-31 Improved consistency for setting ease through deck settings; clarified tooltip. #### 2020-10-18 Improved compatibility with other button add-ons. #### 2020-10-16 Improved version checking (bugfix, stability). #### 2020-10-13 Support for "reviews only" mode by popular request. I still worry this option will make the algorithm far less accurate, so I do not recommend it for 99% of situations. #### 2020-09-26 Big refactor that will mainly improve testing. (Tested on 2.1.26, 2.1.33, and 2.1.34). Added a standalone simulation utility to test how the algorithm works. simulator.py is added as a file in the addon's directory. Run it from the command-line in that directory with ``python simulator.py`` (or ``python3 simulator.py`` on Linux). You may need ``pip install PySide2`` first (``pip3...`` on Linux). #### 2020-09-11 Added deck options: import ease factors, export ease factors, and adjust ease factors using the algorithm outside review. The last one can be helpful to resynch your ease factors after reviewing on mobile. WARNING: This may be slow for very large decks (>5000 cards). UPDATE: This causes an error in earlier versions, so I've restricted it to only apply to Anki 2.1.26+ for now. Will work on a solution for lower versions soon. (More history on GitHub: https://github.com/brownbat/autoEaseFactor )

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

1672712021

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1610886096
Great add-on, I was looking for something like this. However after reviewing each card a box appears in the bottom left corner. There is some information in it, however I do not want this box to appear. Is there any way to turn this off? I use "No distraction full screen" add-on and do not want to have any distractions while reviewing. Thanks for all the hard work!
on 1610478476
I'm using Anki on two seperate desktop computers.

Am I right with my assumption that using your addon with both Anki installations won't work for me, because both instances of the addon would collect data independently? :(
on 1610364790
I'm not sure why but if I press good on a card and the next schedule is 2021-06-03 and then press ctrl + z and good for the same card, it schedules to 2021-05-27. Doing it again, it schedules to 2021-05-23 and then to 2021-05-25.

So for some reason the due date isn't constant, and it definitely should be.

Edit: I take everything back. It's because Anki has a "Fuzz_Modifier".
on 1610213599
I never write reviews , but this ... it literally changed my life.

I never had so much fun reviewing anki cards. It literally feels so much better and now it feels like i do the cards with purpose its insane.

i cant thank the author enough seriously

EDIT: i've got a question , i've put the ease factor on 3000 at max but one of my cards just got 310% is this a bug or intentional?
on 1606102430
This should be part of the Anki application
on 1605953234
Thanks, I'll try it out.

I have erased YesNo from __init__.py because I want to continue using ReMemorize. ReMemorize is a big time saver.

I suggest adding a convenient config option to (dis-/re-en-)able YesNo.

edit: Thanks, it works for me.

edit 2: Having only two rating possibilities is a benefit nevertheless – it saves time and working memory.

edit 3: To answer another reviewer's question about ReMemorize (and "ReMemorize buttons"): There is not much difference compared to usage without Auto Ease. You could think that you get crazy high eases, but this is not the case: Even when you schedule a card by "36500" (36500 days into the future), this is treated like a normal "Easy (4)" grading as far as ease is concerned. To summarize, the add-ons don't change the relationship between next interval and ease.

edit 4: I use an upper ease limit of 400% and a lower limit of 160%.Even cards that I have been reviewing since 3 years ago usually don't go above 400. As said in the description, the upper limit reduces error. The lower limit keeps me out of ease hell and identifies bad cards as leeches earlier.
Comment from author before post was edited
There is now an option to do just that.

Try setting "two_button_mode" to false in the config. Let me know if that works for you!
on 1605499641
Seems to be working great as intended. Would love it if there was an option to "adjust east factor to performance" for ALL decks either as a hotkey or automatically whenever I sync.
on 1605155133
This is so great. Saved me a lot of time.

Curious how would the add-on perform in custom study decks?
Will the reviews in the custom study deck influence the calculation that this add-on does?
on 1604309343
MUST HAVE! simple as that! SAVES YOU TIME with no impact on recall!

It ADJUSTS the INTERVAL of EACH card = Each card hardness is stimulated in UNIQUE INTERVALS for Ultimate Performance!!

If you don't quite adjust your intervals by hand this is a very useful AUTOMATED way to do it.

IF YOU DON'T DO ANYTHING AT ALL = WASTING A LOT OF YOUR PRECIOUS TIME!!
on 1603318477
This is immensely useful. 10/10.

I just wish they would make it easier to port this to Anki mobile, as I do at least half of my reviews there... I will pray.
on 1602660347
awesome function!
on 1601930094
Love this. 2 things:

(1) It seems ctrl-Z to undo, might not undo the effects of this? For example, a card had 1.5 year jump (I thought) if I said yes, I accidentally hit no, ctrl-z to undo and go back and noticed the yes interval was now 1.6 years. Apologies if I just saw it wrong.

(2) Does setting a New Interval matter? I have it set to 80% because I don't want to completely start over on a card if I get it wrong. Should New Interval be set to something specific and/or will it affect this addon's worth and effect?

Thank you!
Comment from author
Thanks for the feedback!

(1) There was some odd behavior with undo in an earlier version, but after an update last month and focused testing, it should behave consistently. If you see something like this again, please let me know, raise an issue on GitHub, especially if you can find a way to duplicate it. (Even when there was a bug, the differences were pretty small percentages, so any adjustments should become really minor over time.)
(2) I've played with a few different new intervals, 4% to 80%, and haven't come up with a perfect number. I think 80% is reasonable though. Sometimes you miss a card that's on the tip of your tongue, and really a 100% interval would be fine. Sometimes you completely forget it, and really need to go back to learning from scratch. There's not a perfect way to handle both cases, but small numbers can really up your workload. So long as you don't find a bunch of cards perpetually stuck in relearning, >50% might be the right approach.
on 1601654642
Very interesting! If i use it for a while and then i revert to the normal scheduler, will it mess up my reviews or it'll be fine?

Also:
1) if i use to reschedule my cards, the addon will work fine ? for example if i add some cards that i already know well just because i want to have them in my collection, and i reschedule them to be reviewed in a few months, how will the addon behave?
2) if i use an addon that add more buttons (rememorize buttons) that add for example easier, easiest ecc. with intervals up to 10x the easy interval (that i often use for situation such as above) will the addon go crazy or it will be fine?
3) should i change my deck options to match the addon functioning (aside interval modifier)? for example are long learning steps still needed? Right now i have 15 60 1440 for new cards and 25 1440, would it be better to avoid learning steps bigger than a day (that as far as i know have the only meaning of avoiding ease hell) or is it ok?
4) if i deactivate yesorno and keep 4 buttons, would i defeat the meaning of the addon? Or is it still fine? in this case what would be the difference compared to not having the addon?

Thank you very much!
Comment from author
> 1) If i use it for a while and then i revert to the normal scheduler, will it mess up my reviews or it'll be fine?

The review stats are untouched, just the ease factor, so the only risk is that some cards might end up in ease hell because of that. You could either export your current ease factors using deck options, or use an add on like Rising Orange's Reset-Ease-Automatically to bring all your ease values back into a more normal range:
https://github.com/RisingOrange/Reset-Ease-Automatically

> 2) rememorize... I've heard some people say the YesOrNo add on doesn't play nice with ReMemorize, so you'd disable that. I think ReMemorize scheduling will work when you say 10x, but then next time you review if you hit a more normal button, my add-on will calculate the ease based on the performance and the average intervals... the combo is not really well tested, so I'm not 100% sure how it ends up, but I think they could be compatible.

> 3) deck options

People will have different opinions here. I just put learning and relearning steps for the first day, then let the algorithm take over right away. (ejs originally wrote the algorithm, and he had learning steps out to like a month). I just want as much performance-based feedback as early as possible. The advantage of shorter cycles is that the algorithm gets more feedback really quickly and helps the intervals climb faster. But if they work for you, and you don't feel like cards are constantly bouncing back to relearning after waiting a week, they might be completely fine.

4) if i deactivate yesorno and keep 4 buttons, would i defeat the meaning of the addon?

As I see it, the primary benefit of the add on is that performance based feedback means you don't have to think about the difference between hard/good/easy. You just know it or you don't. If you use those buttons perfectly consistently, the add-on won't have that much advantage, they'll both find the right ease factor after a while.

However if you ever hit Again too many times and have a really hard time judging when to hit Easy to climb out of Ease hell... this algorithm does prevent that by automatically scaling your ease factor to recent streaks. It will crash your ease factor when you get some errors, but every success will pull it back up, so you don't have to worry about getting stuck in short cycles forever.

So if you wanted to keep lots of buttons, the addon can still help you guard against ease hell. It will also still accelerate your super easy cards to have really long intervals so they don't bog down your deck. But it's not going to be quite as useful as taking the plunge and just ditching the mental load of multiple buttons completely. It's a judgment call, play around with it, but there's a high temptation to over-optimize Anki. If you get a process that pretty much works for you, go with it for a while, the most important thing is just doing your reps.

Thanks for the feedback and interesting questions! Best of luck!
on 1601647069
EDIT2: provvisory FAQ that anyone can edit if you are interested https://docs.google.com/spreadsheets/d/1GPN9WkEhdG0ZprQ3a7quKU5fnaFe965CfjzqdwQ1sG4/edit?usp=sharing

Super promising! Is it possibile to know how the addon behave when you split your reviews between mobile and pc? Or if you have two different pc where you do anki (both with the addon)? Would it break it?

EDIT: thank you very much for the answer! I suggest you to make a FAQ with this kind of answers :)
Comment from author
Great question. If you have two different PCs with the add-on, you shouldn't see any changes.

If you use mobile, there's a risk -- it's like the algorithm will be frozen the whole time you're on mobile, but will fix itself next time you review on PC.

Most times that won't make a huge difference, but the worst case scenario is if you suddenly failed a card a couple times on PC, then only reviewed on mobile after that for a long time. The algorithm normally drops your ease really low, then rubberbands it back up as you succeed. If you transition from PC to mobile, you could get in a version of mobile ease hell because the algorithm isn't there to tell it to recover.

There's a workaround -- if you just log in on PC and use the new deck menu option to "Adjust Ease Factors to Performance." It will put everything back on track, so you don't even have to necessarily review on PC at all anymore, so long as you run the algorithm across the deck periodically. (More often would be better, of course, but even if you only do this once every few days, you might still be fine.)

EDIT: Nice FAQ. Maybe I'll pull something like this together on GitHub, but until then, I added a couple answers. Thanks!
on 1601632919
Really great execution and concept. Feels like it should be native functionality tbh.

Like others, from a theoretical perspective I wish I could exclude (or underweight) the card learning process relative to reviews, but I'm not actually sure how much difference this would make in practice. To clarify this, for example, assume I don't care if I fail cards 50% of the time in the learning phase, as long as I pass cards 85% of the time in the review phase. Having the algorithm aim for an average of 85% pass rate across both learning and reviews means that I will (in this example) be reviewing cards too often, with >85% review pass rates compensating for <85% learning pass rates. My apologies if I've misunderstood how the algorithm works, this just appears to be the case from my stats after a few weeks of use.

Thanks so much for making this. It is, but for a purely ideological difference, perfect.
on 1601375055
amazing :)
Comment from author
Thanks for the feedback!
on 1601350774
Really love the add-on and the simplicity of the 2 button mode! This add-on really feels like it is making a difference in my studies. I would really like if the author could update the 2 button mode to be compatible with the Advanced Review Bottom Bar add-on, just so I maintain my fully customized interface.
Comment from author
I submitted a patch to the main Anki devs to make it easier for add-ons to change review buttons, I'll flag it for the ARBB's author. If we're all using that same interface, then everything should get much more compatible.

In the meantime, I found the button styling from AnKing works really well with my add on. Not really the same, I know, but worth checking out in its own right:
https://ankiweb.net/shared/info/374005964

Another option -- you can disable the two button mode in my add on in config. My add-on will treat both "Good" and "Easy" the same if you do that, that might let you use both for now, just with a few redundant buttons.
on 1601289680
One of the best add-ons there are. It feels like the scheduling as improved immensely.
Comment from author
Thanks! Really great to hear it helps!
on 1600067348
Makes way more sense than the standard algorithm, I wouldn't go back to using anki without this.
I don't really agree with learning steps mattering for ease factor determination though. What is even the reason for having learning steps if they act like normal reviews in all but name? I wish that part was at least optional.
Comment from author
Thanks for the feedback, I've definitely been thinking about that issue a lot recently based on yours and other comments.

The original rationale for considering learning steps is that it's really hard for the algorithm to get enough data to make smart decisions from reviews alone.

You're right, that does reduce the distinction between learning and review. I've basically just accepted that, and I just have one or two learning steps now and then hand it over to the algorithm to take it from there. But ejs, the original author, used more like a full month of learning steps, so his version didn't use the algorithm until very late in a card's life. Very different philosophy! It's not my path, but I respect that approach.

So... even though I worry about the limited data you'd get, requests to limit it to reviews only are pretty common, so hopefully I can add that feature soon. (It's a little complex, and I want to get it right, so bear with me, but I am prioritizing it.)

It will be a little bit dangerous for people to limit the data that much, so I might put up a big warning, but I'm all for people playing around with different options to find the path that works best for them.
on 1599571304
Greate addon! I just would like to disable it for filtered decks, because some times I just want to review some cards without changing anything..
Comment from author
Thanks for the feedback!

There's been some discussion on GitHub about only applying this to certain modes. I'm not sure how quickly I'll be able to implement that, but I bumped it up to priority, it's a popular request.
on 1599174445
How is this different than ANKI 2.1 SCHEDULER? Thanks!

Also should I tick enable the scheduler while i have this on?
Comment from author
As I understand it, the new scheduler mainly changes how cards are scheduled when leaving custom decks. AnKing has a more thorough overview:
https://youtu.be/Vo8PkFeVW3A

This add-on is more about making sure the intervals are correct during normal reviews, so after any individual rep the ease factor is adjusted so that the next review will be spaced appropriately--sooner if you missed the rep, later if you passed. I've tested with both the v2 scheduler and the older scheduler, so either should work with this add-on.
on 1598258038
Really love this addon!!!
on 1598122000
Great add on... I wonder if this also changes the lapse interval to the previous one just as eshapard pointed out...
on 1597294145
Good job and thank you for porting this addon. I hope you will continue to support this addon in the foreseeable future. Are you considering a special setting for each deck since the learning steps are varied to different decks?
on 1596977619
Amazing addon, thank you for continously working on it
on 1596400683
It's too early for me to say whether I feel like it's an improvement over the default algorithm, but I like the idea of it, and not needing to think about how well I remember each review that I got right makes individual reviews go by a little faster. I also appreciate being able to change many of the ways that the scheduling works in the config. I think a target ratio of 85% is a little too strict, so I'm glad that I can lower it to a more modest 80%.
Comment from author
Welcome any additional feedback, thanks for the comment!

(The original comment also pointed out an issue, and noted that Issues weren't enabled on GitHub. Issues are enabled there now, thank you for catching that!)

For other commenters, there's some additional discussion over on GitHub now, welcome any feedback here or there.
on 1596103265
Very nice addon! I wonder if it's compatible with "Induction Booster". So far, I haven't seen issues.
on 1596013552
I got some problem with the version 2.1.15 but after updating it went great
on 1595887060
After the avgEase addon has fallen out of date, this should get me back up and running. Thank you very much for putting this together.
on 1594257467
Thank you very much for your work much appreciated. Great it works with 2.1 !
on 1594076496
This is working really well. My True Retention rate is increasing steadily since using this plug-in, while my review time has not significantly increased.
Excellent idea from the original author, and thanks to the current one for keeping it up-to-date and therefore useable!
on 1593097837
Great addon
Is it possible to set different desired succes rates for different decks?
Thanks
on 1592049633
You're a beast! Thanks for all your contributions to the SRS community, buddy.
on 1591902118
Have been using this add on for a long time. Glad to see it updated!
on 1591780280
Really cool to finally see my favorite Add-On on ankiweb. I've used the original for ages and it helped me immensely to get to my yes-answers to a reliable average.