FSRS4Anki Documentation

repository·main·Indexed 24 days ago

https://github.com/open-spaced-repetition/fsrs4anki

A modern spaced-repetition scheduler for Anki based on the Free Spaced Repetition Scheduler (FSRS) algorithm. It provides a scheduler to replace Anki's default logic and a machine-learning optimizer to tune parameters based on individual memory patterns. The documentation covers installation for various Anki versions, configuring desired retention, optimizing parameters using RMSE and Log Loss, and managing add-on compatibility.

Tokens
5.2K
Snippets
4
Records
26
Agent score
88%

What's inside FSRS4Anki

  1. Understand FSRS versions and scheduler requirements

    main

    To use FSRS in Anki, you must ensure the v3 scheduler is enabled.

    There are two versions of FSRS:

    • FSRS v4: Used by some older versions of Anki (e.g., Anki 23.10).
    • FSRS-4.5: Used by the newest versions of Anki.

    Both versions use the same number of parameters but differ in the shape of the forgetting curve. The old v2 scheduler (SM-2 algorithm) is not supported in Anki 23.10 or newer.

  2. Access FSRS developer and research resources

    main

    Developers and researchers can find additional resources in the Awesome FSRS repository:

    • Implementations: FSRS in various programming languages.
    • Research: Academic papers, datasets, and research notebooks.
    • Learning: A guide titled "Spaced Repetition Algorithm: A Three-Day Journey from Novice to Expert".
  3. Compute minimum recommended retention

    main

    This experimental tool calculates a desired retention value that minimizes the ratio of study time to knowledge acquired, aiming for the most efficient study plan.

    How to use:

    1. Locate the tool in your deck options.
    2. Adjust Days to simulate based on your goal (e.g., 365 days for an exam in a year, or 1825 days for long-term language learning).
    3. Use the resulting value as a reference for your desired retention setting.

    Important Considerations:

    • Efficiency: The tool finds the value that minimizes the workload/acquired knowledge ratio.
    • Setting Retention: You can set your desired retention higher than the recommended value if you want to do more work to remember more. However, you should not set it lower than recommended, as that would result in doing more work to remember less.
  4. Enable FSRS in Anki

    main

    To enable FSRS, navigate to Deck Options and locate the FSRS section (in Anki 24.04+) or the Advanced section (in versions prior to 24.04). Toggle the FSRS switch.

    Important Notes:

    • This setting is shared by all deck presets.
    • Enabling FSRS will cause settings like "Graduating interval" and "Easy bonus" to disappear as they are no longer relevant.
    • If you previously used custom scheduling, delete any FSRS code in the custom scheduling field before enabling native FSRS.
    • If using the FSRS4Anki Helper add-on, ensure it is updated to the latest version.
  5. Verify if a deck benefits from a dedicated FSRS preset

    main

    If you want to determine if a specific deck should have its own unique FSRS parameters, follow this evaluation workflow:

    1. Baseline: Go to the deck options, copy the current FSRS parameters, and create a new preset for that deck. Paste the copied parameters into the new preset.
    2. Evaluate Baseline: Click Evaluate and record the RMSE and log loss values.
    3. Optimize: Click Optimize in the new preset to generate new parameters.
    4. Evaluate Optimized: Click Evaluate again and record the new RMSE and log loss values.
    5. Compare: If the new parameters result in lower RMSE and log loss values, save the new preset.
  6. Evaluate FSRS parameter fit using RMSE and Log Loss

    main

    You can assess how well your current FSRS parameters fit your review history by clicking the Evaluate button under the FSRS parameters field. This provides two metrics:

    • RMSE (bins): Represents the average difference between the predicted probability of recalling a card (R) and the actual measured probability from your history. For example, an RMSE=0.05 means FSRS is off by approximately 5% on average.
    • Log loss: A statistical measure of fit (interpretation is less intuitive).

    Note: Smaller numbers for both metrics indicate a better fit. RMSE and log loss are not perfectly correlated; a deck might have a low RMSE but high log loss, or vice versa.

  7. Find optimal FSRS parameters

    main

    The FSRS optimizer uses machine learning to find parameters that best fit your review history. To optimize, click the Optimize button located under the FSRS parameters field in your deck options.

    Key details:

    • Review Requirements:
      • Anki 24.06+: No minimum reviews required.
      • Anki 24.04: At least 400 reviews required.
      • Older versions: At least 1000 reviews required.
    • Scope: Parameters are preset-specific. If you have decks with very different difficulty levels, use separate presets for them.
    • Optimization Scope: Parameters are calculated from the review history of all decks using the current preset. You can change which cards are included by adjusting the search (similar to Anki Browser search) before clicking optimize.
    • Resetting: To reset parameters to default, click the anticlockwise open circle arrow to the right and bottom of the FSRS parameters field.
  8. Manage FSRS parameters and optimization frequency

    main

    To keep FSRS accurate, you should periodically re-optimize your parameters:

    • Optimization Frequency: A good rule of thumb is to optimize once per month. Alternatively, you can optimize after every $2^n$ reviews (e.g., after 512, 1024, 2048 reviews, etc.).
    • Preset Strategy: Use different presets for different types of material (e.g., one for Japanese vocabulary and one for Geography) to allow for different optimal parameters. Use the same preset for similar material (e.g., two different decks of Japanese vocabulary).
  9. Quick Start: Enable and Configure FSRS

    main

    To quickly set up FSRS in Anki:

    1. Enable FSRS: Go to Deck Options, scroll to the FSRS section (or Advanced in Anki versions before 24.04), and toggle FSRS on. This is a global setting.
    2. Configure Steps: Ensure all learning steps (under New Cards) and re-learning steps (under Lapses) are shorter than 1d and can be completed on the same day (e.g., 10m or 30m). Avoid 23h.
    3. Optimize Parameters: Click the Optimize button under the FSRS parameters field. If you have insufficient review history (fewer than 400 reviews in Anki 24.04 or 1000 in older versions), use the default parameters.
    4. Set Desired Retention: Choose a value for desired retention (the proportion of cards recalled successfully). A value of 0.90 (90%) is a good starting point. Higher values increase workload.
    5. Save: Click Save before closing the deck options window.
  10. Verify if FSRS is working correctly

    main

    You can confirm FSRS is active and responding to your settings using these methods:

    Manual Test:

    1. Review a new card and note the interval shown above the answer buttons.
    2. Undo the review.
    3. Change your Desired Retention setting to either 0.99 (maximum) or 0.7 (minimum).
    4. Review the card again. If FSRS is working, the intervals should change.

    Using Helper Add-on:

    • Download and enable the Helper add-on and enable "Display memory state after answer".

    Note: If intervals do not change, verify that the preset is applied to the correct subdeck, as subdeck settings override parent deck settings.

  11. Best practices for grading cards with FSRS

    main

    To maintain the accuracy of the FSRS algorithm, follow these grading habits:

    • Grade based on recall, not interval: Choose the button based on how easy it was to answer, not how long you want to wait until the next review. Avoid avoiding the "Easy" button just because it shows long intervals; this skews your history.
    • Avoid 'Hard' for forgotten cards: If you forgot a card, press Again. Only use Hard if you recalled the information but with significant hesitation.
    • Don't change habits: FSRS uses your past rating history to predict future intervals. Changing your grading style mid-stream can affect accuracy.
    • Use 'Advance' for exams: If you need to see cards sooner due to an upcoming exam, use the Advance function from the Helper add-on rather than changing your grades, as this avoids skewing your grading history.