Skip to content

How does the scheduler work?

Jarrett Ye edited this page Sep 25, 2022 · 6 revisions

Requirement

To more deeply understand the working process of the FSRS4Anki scheduler, we recommend you install AnkiWebView Inspector . The following text will use the screenshot with the Inspector window.

And please note, open the inspector before you start the review.

How to see the execution of the scheduler?

When you launch the inspector and click Study Now, you will see the following:

image

The left window shows the running code of custom scheduling.

F10 or the button in the next figure is used to execute the code per line.

image

Details about the scheduler

There are three parts of the scheduler's code.

Set parameters

Line 5-18 are setting the parameters for all cards. Line 24-40 are setting the parameters for a specific deck.

Related discussion: [Question] How to workaround with Anki custom scheduling not being "Per Deck"

image

Check the states of scheduling

Line 142-192 are used to check the scheduling states. In Anki, there are four types of states for card scheduling: New, Learning, Review, and Relearning. Learning and Relearning are the same in scheduling. And there are two types of decks: normal and filtered. In normal decks, all reviews will modify the interval of cards. But in filtered decks, only checking the box Reschedule cards based on my answer in this deck will allow Anki to update the interval of cards. The FSRS4Anki scheduler also supports filtered decks.

image

Calculate memory states

The FSRS4Anki scheduler will calculate memory states from your rating and the DSR model. The scheduled interval is based on memory states and your custom parameters.

image

If the memory states are lost, the FSRS4Anki scheduler will convert the Anki's built-in scheduling information to the memory states.

image

Clone this wiki locally