66 23
Contact Author Sign in to rate

load balancer

<10kB. Updated 2020-08-06.
The author has shared 4 other item(s).


Checks amount of cards due and average ease of cards in ±X days of intended due date and schedules accordingly. Configuration options can be found in preferences. Here is a conversation where I accidentally was helpful and explained what the options do. 2020-08-05 fixed the config options not getting set on new anki profiles 2020-07-22 fixed wrapping a function that no longer exists 2020-02-17 fixed crash in the latest anki version 2018-09-12 fixed `<class 'bs4.featurenotfound'="">` bug 2018-09-09 2.1 support at last! 2017-07-08: added new option to load balance per-deck (thanks Tomás Godoi) 2014-01-10: fixed `KeyError: 'LBGIMinBefore'` 2013-12-22: ctrl-L to bring up window with debug output restore defaults button in deck config now works 2012-12-27: fixed calculating ease on days with no cards due 2012-12-24: idealIvl can be a float? weird 2012-12-22: updated to work with 2.0.4 2012-12-01: apply to cards going from lapsed to review 2012-11-28: better handling of siblings 2012-11-25: algorithm tweaking 2012-11-17: more uninitialized variables 2012-11-10: fixed divide by zero error 2012-11-07: algorithm tweaking graduating/easy interval modifiers in deck options 2012-11-06: new algorithm tooltips in preferences 2012-11-02: added a graph fixed bug where new cards did not have an ease set 2012-11-01: New algorithm for ease balancing Add option for minimum amount of days to use fixed bug where variables weren't getting initialized (Nice idea! However, I got an error.) 2012-10-31: implemented ease balancing as mentioned in "Good idea, but..." added preference dialog I can be contacted at jake [at] sharnoth [dot] com https://github.com/jakeprobst/anki-loadbalancer Thanks to Dariusz Laska for his help in tweaking/testing/refining the balancing algorithm. 2014-12-22: So the AnkiDroid people don't like modifications like this and provide no way to do it proper so I`ll maintain a branch with it: https://github.com/jakeprobst/Anki-Android/tree/loadbalancer ankidroid issue tracker: https://code.google.com/p/ankidroid/issues/detail?id=2152


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:


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

All Anki 2.1.x Add-Ons Contact Author


on 1676638866
Please update it
on 1673912976
It used to work nice, but the dev is out
on 1672869985
tired of spikes in your daily review load? get this addon
on 1661490306
Good work, this make day easier:)
thank you bro.
on 1632718863
Works on 2.1.44. Just stick with v1 scheduler and you're gucci.
on 1632464292
Not working in newer versions
on 1628473802
does not work, useless add on 2.1.41
on 1626703330
AnkiDroid, please...
on 1626115431
Does not work with V2 scheduler.
on 1622990656
on 1617364857
Could you please update it ?
on 1616555780
The load balancer works really good when it does but I think recently it seems to not balance my decks anymore. Hopefully author can respond soon.
on 1615252923
Stopped working with ver. 2.1.41
on 1615018194
This does what I want and I didn't even have to look at its settings. I'm surprised this functionality isn't part of Anki itself!
on 1612436237
rereport an error another guy had also: I have been seeing the same cards multiple times without recording my progress. I really hope this is resolved soon, because like I said: it is a good add-on.
on 1603644574
It is a good add-on, but in the recent weeks I have been seeing the same cards multiple times without recording my progress. I really hope this is resolved soon, because like I said: it is a good add-on.
on 1599681587
Does this work with V2 scheduler? Can someone please enlighten me?
on 1599642177
A must have addon for anyone that wants to do anki and not burn out
on 1598028054
EDIT: Works now! (1 hour later) :)
I am unable to install this add-on on Anki version 2.1.26. I cannot update Anki because my computer is too old.
on 1597487713
works on 2.1.30
on 1596585646
For some reason despite having the default settings, cards with an interval of 3d, which should then go on to 7d, are able to be sent to 5d - I noticed this was happening with a lot of my cards, so is this ignoring the 10% of interval rule?
on 1596584007
doesn't support v2 scheduler
on 1596572534
Crashed the app and forced me to delete it. Need to fix bug
on 1596441939
A fantastic piece of work that improves my Anki experience, I am very grateful to the developer(s), thank you!
on 1596153213
Is an amazing add-on! Doesn't work with Anki 2.1.29 yet though.
on 1596120289
Does not work on anki 2.1.29
on 1595544909
Was working excellently until yesterday's/today's update. Caused Anki app to crash with error prompt. Disabled add-on and Anki works fine.

-Resolved with update!
on 1595536162
Wow, it's been up and running since 2012! That's very impressive and it's really useful.
on 1595462346
Must update to the new 2.1.28 version of anki for it to work
on 1595461446
Latest update 7/22 not allowing Anki to open unless it is disabled
on 1595458100
Error message on restart after updating the add-on on 2.1.26, but the problem resolved upon upgrade to 2.1.28.
on 1594693521
Working on 2.1.26
on 1592849486
Not working with anki 2.1.8 (up-to-date upstream version in Debian)
on 1592732223
Doesn't work on version 2.1.15
on 1592304598
Code isn't working on the current version, hopefully this can be sorted soon!!
on 1590080019
Wish it worked on 2.1.15
on 1589140096
Can't add to 2.15!
on 1585790723
Good, but isnt working for me on v.2.1.15
on 1581971462
Love the addon. Now it work on 2.1.20
on 1579040141
If the card is at the maximum interval (for example, 60 days), it puts them all on day 60 instead of spreading them out
on 1567990390
on 1567303368
on 1547608110
Good! Thank you
on 1544863922
This add-on is a lifesaver ! I can't tell you how useful it is for me :)
I was thinking about an extra feature : since we can't "pause" anki for holiday periods for instance, would it be possible to exclude specific dates in advance such as birthday, or New Year's eve maybe a few months before so that anki doesn't schedule new cards on those specific dates, andsets them to the day before or day after ?
Thanks anyway!
on 1543710703
This doesn't work with Anki 2.1 and v2 experimental scheduler. All my cards pile up on the same day without getting distributed. Shame, because I really liked the v2 experimental scheduler, but in the end I had to switch back to Anki 2.0. Wish this had better support or could be fixed.
on 1542083091
Does this work with the 2.1 v2 experimental engine?

Does it work with learning steps, or just graduated cards?
on 1539289481
The cards new shedule is shifted a little to prevent work load peaks, after a while! your workload is about the same every day
on 1535178860
Any chance this excellent plugin gets ported to 2.1? This plugin is the only reason I haven't switched to 2.1!
on 1534598417
Does what it says in the tin, and does it well
on 1533924000
on 1532613462
Hope this works :D
on 1530265790
Absolutely essential. This should really get built into Anki proper.
on 1529943380
is the developement dead on this?
i'd like to have it on 2.1, is there anything like this??
on 1528588800
This makes the reviews time much more predictable, which is really nice.
I'm using it for years and it is a must have in my opinion.
on 1527379200
Very useful!
on 1527206400
no useful!
on 1522281600
All I get is:
Download failed: Invalid Code
tried several times even hand typing the number
on 1521676800
Anki is functionally useless without this add-on. Unless you are adding no more than a couple of new cards a day or every other day, the load spikes eventually make the program completely impractical. Averaging out the number of cards due each day allows you to schedule a fairly consistent (and short) time block to work, while still being able to add a practical amount of new cards per day so large decks can be learned in months rather than years.

This add-on NEEDS to be incorporated into Anki as a default part of the program, not just an add-on, as well as being made part of AnkiWeb and AnkiDroid. For some reason the AnkiDroid people don't seem to be interested in this anymore and there have been no new updates concerning it on that forum (unless I am missing something).
on 1505520000
Does this work on mobile (iphone)?

Fantastic plugin! Due to how I add cards in anki (based on my schedule in life), some days get drastically more new cards than others. This plugin has been fantastic at keeping my review times even everyday.

I do have one question. Does the load balancer work if I study with the iphone app? I always try to do my reviews on a computer in fear that it wont have any effect if I study while traveling. I guess this fear stems from my lack of understanding how exactly this plugin balances reviews.
on 1499817600
on 1491091200
on 1488844800
on 1485043200
on 1480204800
on 1458777600
on 1446940800
on 1446249600
on 1444953600
on 1422835200
Good idea, BUT...

The load balancer seems like a good idea, but there is no documentation of the settings, and worse still, it adds a meaningless graph called Difficulty Forecast; I have no idea what information that graph is showing. Please either explain it (and explain the settings), or delete it (maybe, if you want to keep the graph, make it optional?)
on 1422748800
on 1410912000
on 1410825600
on 1402099200
Seems to work, but no documentation

Seems like a great idea, but I'd like to know more about what it's doing before having it go to work on all of my cards (just as someone mentioned below, the options aren't incredibly intuitive)
on 1402012800
on 1397779200
Nearly perfect, needs proper settings explanation

This is really great concept, as many people have said already.

I think the only thing it misses is a proper explanation of settings.
Maybe write a Help/FAQ of some kind with each setting explained (I still don't know what the Workload:Ease fields do) with the values recommended for different learners and put them in the plugin/somewhere here?
on 1389052800

Same problem as the two reviews underneath me. Fix it and I'll start using it again.
on 1388880000
crash info

Traceback (most recent call last):
File "aqt/webview.pyc", line 21, in link
File "aqt/reviewer.pyc", line 315, in _linkHandler
File "aqt/reviewer.pyc", line 260, in _answerCard
File "anki/sched.pyc", line 84, in answerCard
File "anki/sched.pyc", line 537, in _answerLrnCard
File "/Users/myname/Documents/Anki/addons/load_balancer.py", line 156, in NEW_rescheduleAsRev
OLD_rescheduleAsRev(self, card, conf, early)
File "anki/sched.pyc", line 608, in _rescheduleAsRev
File "anki/sched.pyc", line 664, in _rescheduleNew
File "anki/sched.pyc", line 658, in _graduatingIvl
File "/Users/myname/Documents/Anki/addons/load_balancer.py", line 60, in NEW_adjRevIvl
if -1 not in [nc["LBGIMinBefore"], nc["LBGIMinAfter"]]:
KeyError: 'LBGIMinBefore'

(user name altered by poster)
on 1382486400
on 1378080000
on 1372896000
on 1370908800
Solves Many Problems In a Single Instance

Anki has a few bad habits,
Even with the new algorithms.

Load spikes is a significant problem that has always plagued anki.

Looking ahead in your schedule and seeing a large tower 4 days from now, steadily growing each day is not fun, and can be detrimental to progress.

In the past I had tried reviewing ahead with specially set featured decks.
The problem with this is that your interval is hardly changed when you review ahead. You end up in the long run merely pushing back a tower that will come back even larger. Cards which were due in 7 days are due again in 7 days, 3 in 3, 5 in 5, and don't forget you are adding new cards everyday. Sure the cards are easier but random recall errors occur, and the chances of this increase with the amount of cards you review in a day.

With this program you can set it to put cards a bit earlier or later (depending on ease) and even out the prospective workload.

It has not negatively affected by daily correct% (in fact it has raised it)
This is, quite frankly, an essential add-on, and should actually be incorporated into anki's programing.
on 1362096000
on 1360108800
on 1358553600
get rid of load spikes

According to my statistic graph forecast, in 12 days there are 80 mature cards that become due that day; when normally it is around 20. In 28 days, I have a similar "tower" of mature cards becoming due on that very day. Somehow, the default Anki scheduler produces load spikes, even in the long run with mature cards that have several months intervals already.

With this addon, the due forecast becomes perfectly even. You can customize its behaviour, e.g. how far to move cards into the past or future (personally, I prefer seeing cards a little earlier, so I reduced the future range to 1 day). The only feature that is missing is that it doesn't flatten the load spikes that are already there. But once you get past them it's perfect.

Thanks for this.
on 1358035200
Worked great until 2.0.4 - I look forwad to it working again!

I have been using this and LOVING IT. Since I loaded 2.0.4 it now crashes in a few ways.

I love it so much I wish there was a way to go back to Anki 2.0.3! Unfortunately I 'ran' when installing, I should have save-as's ANKI so that I could wipe out 2.0.4 and go back to 2.0.3 to use this add on.

One error in 2.0.4:
Traceback (most recent call last):
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.webview", line 21, in link
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.reviewer", line 298, in _linkHandler
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.reviewer", line 247, in _answerCard
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sched", line 77, in answerCard
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sched", line 785, in _answerRevCard
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sched", line 831, in _rescheduleRev
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.sched", line 909, in _updateRevIvl
File "C:\Users\Peter\Documents\Anki\addons\load_balancer.py", line 107, in NEW_adjRevIvl
rdiff, compdiff))
TypeError: 'NoneType' object is not callable
on 1355184000
on 1354320000
on 1352160000
on 1351814400
Useful tool to reduce daily load

It is a tool which has potential to reduce daily load and improve learning performance. It can take into account both due reviews and average easiness factors in order to reduce daily load. Thanks!