-
-
Notifications
You must be signed in to change notification settings - Fork 151
How does the scheduler work?
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.
When you launch the inspector and click Study Now, you will see the following:

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.

There are three parts of the scheduler's code.
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"

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.

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.

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

MaiMemo's papers at ACM KDD and IEEE TKDE: A Stochastic Shortest Path Algorithm for Optimizing Spaced Repetition Scheduling [中文版] & Optimizing Spaced Repetition Schedule by Capturing the Dynamics of Memory [中文版]
My fantastic research experience on spaced repetition algorithm: How did I publish a paper in ACMKDD as an undergraduate?
The largest open-source datasets on spaced repetition with time-series features: open-spaced-repetition/FSRS-Anki-20k & open-spaced-repetition/anki-revlogs-10k
FSRS is an independent open-source project driven by its community. We are grateful for the support from organizations like 墨墨背单词 (MaiMemo Inc.), who champion open source by enabling core contributors like Jarrett Ye to invest time and expertise into FSRS. This collaboration helps ensure FSRS remains a leading-edge, freely available spaced repetition algorithm for everyone.