Skip to content

Advanced methods of optimization

Jarrett Ye edited this page Nov 22, 2023 · 2 revisions

Command Line

There is a python package for the optimizer. This package has torch as a dependency, so note it might take about half a gigabyte of space.

Installation

Install the package with the command:

python -m pip install fsrs_optimizer

You should upgrade regularly to make sure you have the most recent version of FSRS-Optimizer:

python -m pip install fsrs_optimizer --upgrade

Usage

Export your deck and cd into the folder to which you exported it.
Then you can run:

python -m fsrs_optimizer "package.(colpkg/apkg)"

You can also list multiple files, e.g.:

python -m fsrs_optimizer "file1.akpg" "file2.apkg"

Wildcards are supported:

python -m fsrs_optimizer *.apkg

There are certain options which are as follows:

options:
  -h, --help           show this help message and exit
  -y, --yes, --no-yes  If set automatically defaults on all stdin settings.
  -o OUT, --out OUT    File to APPEND the automatically generated profile to.

Expected Functionality

image

image

Anki Addon EXPERIMENTAL (Anki <= 2.1.66)

Download and install this version of the anki helper addon either by git cloning it into the anki addons folder or downloading it as a zip and extracting the zip into the anki addons folder.

Install the optimizer locally.

image

Please pay attention to the popup.

image

After that has downloaded and installed you should be able to run the optimizer from within anki.

Press the cog next to any given deck and hit the optimize option.

image

Anki may then hang a small while while it loads the optimizer.

image

Hit yes to find the optimum retention, Hit no to not or hit cancel to pick a different deck.

If all is well you should then get a toolbar popup which tells you the progress of the optimization.

image

You should then get the stats in a format which is easy to copy into the javascript scheduler.

image

These values are saved in the addons config file which can be found and edited in anki if you want to change the retention manually for example.

image

If there are any issues with this please mention them on this pull request here.