41 4
Sign in to rate

load balancer

<10kB. Updated 2018-09-13. Supports both Anki 2.0.x and 2.1.x.

Description

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. 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 [dot] probst [at] gmail [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 </class>

Download

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

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

1417170896

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.

Other Anki 2.0.x Add-Ons Other Anki 2.1.x Add-Ons Ask a Question

Reviews

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
Essencial
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 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 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 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
Crash

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 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 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 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!