Anki add-on: Auto Ease Factor

# 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. Warning: Does not seem to work with versions older than 2.1.21. NEW WARNING (28 Sep 2021): Haven't had time for new development, worried this will break with the v3 scheduler. License is open, forks are welcome. #### 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 #### 2021-03-21 Per deck settings, only working in latest stable releases (>2.1.40) with v2 scheduler. (Pending. This caused an issue where the config became inaccessible, so reverting for now. Hopefully able to diagnose and push these options soon.) #### 2021-02-08 Bugfix for NoneType error when using reviews-only setting. #### 2021-01-23 Happy new year! Fixing a compatibility issue with ReMemorize and generally ensuring past "rescheduling" events are not mistakenly counted as reviews. Huge kudos to lovac42 for talking me through this one on GitHub. #### 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 )

GitHub repository: brownbat/autoeasefactor
Repository description: Adjust ease factors in Anki based off of performance in order to hit a target success rate.
Languages: Python
Topics: anki, ease, flashcards