FSRS : Dynamic Preset Selection (For Sound's Fork)

AnkiWeb addon 1798968356

Assigns FSRS presets to cards through ordered Anki search rules, using the first match, with configurable presets, parameter optimization, and grade or interval splits.
AI-generated summary; may contain mistakes.

schedulingfsrs

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-10-07
Anki versions
2.1.1~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-10-07 (25 days before the snapshot).
  • Test files: 5.
  • Commits in the last year: 7.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-10-07
History across monthly snapshots

Loading…

Similar addons

Anki FSRS Preset Manager

Manages FSRS presets in a single table for editing retention, steps, and version, running optimize/evaluate, bulk-applying values, and setting deck-level overrides.

schedulingfsrsdeck-management

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-08-11
Advanced FSRS Simulator

Simplifies Anki's FSRS simulator by letting users simulate a deck, its subdecks, or a preset, inspect included cards and counts, adjust settings, and compare runs on one graph.

schedulingfsrsstatisticsdeck-management

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.2~ Updated 2026-09-23
Audio Files

Adds an editor button that searches Forvo, Wiktionary, and Open Russian for audio matching field or selected text, uploads it to Anki, and appends a sound tag.

card-creation

35 votes 71% approval πŸ‘ 30 Β· πŸ‘Ž 5 ⭐ 1 Updated 2022-07-30

Description

FSRS Dynamic Preset Selection

FSRS Dynamic Preset Selection lets you choose FSRS parameters by card search rules instead of only by deck preset assignment.

With normal Anki, a card gets its FSRS parameters from the deck preset attached to its deck. This add-on lets you define extra FSRS presets in the add-on configuration, then assign them to cards with ordered Anki searches. During review, Anki uses the first matching dynamic preset for the card. Cards that do not match any dynamic rule keep using their normal deck preset.

Requirements

This add-on requires an Anki build that supports dynamic FSRS preset overlays. It will not work on standard Anki releases that do not expose this FSRS overlay API.

What It Is For

Use this add-on when cards in the same deck should use different FSRS parameters. Common examples:

  • separate FSRS parameters for cards created from different sources
  • different parameters for first-answer outcomes such as first Again, Hard, Good, or Easy
  • one deck organization, but several scheduling profiles selected by tags, note fields, or other Anki search terms

The add-on does not move cards between decks and does not change deck options. It only provides card-specific FSRS preset selection to Anki.

Basic Usage

  1. Open Anki's add-on manager.
  2. Select FSRS Dynamic Preset Selection.
  3. Open Config.
  4. Add one or more dynamic FSRS presets.
  5. Choose a deck and optional search filter for each preset.
  6. Move presets up or down to set precedence.
  7. Save the configuration.

Rules are evaluated from top to bottom. If a card matches multiple presets, the first matching preset wins.

Presets And Rules

Each dynamic preset has:

  • a display name
  • an FSRS version
  • FSRS parameters
  • desired retention and historical retention
  • an optional deck
  • an optional search filter

The deck and search filter are combined into an Anki search rule. For example, a preset with deck Japanese and search tag:yomitan applies to cards matching both terms.

Advanced users can also define explicit ordered rules in the JSON config. Each rule maps an Anki search query to one dynamic preset id.

First-Answer Split

The Split checkbox creates four related preset rows for first Again, Hard, Good, and Easy outcomes. This is useful when you want separate FSRS parameters based on the first grade a card received.

Each split row keeps its own parameters and desired retention. The generated rules use Anki's firstgrade:N search term.

Optimizing Parameters

The config screen can optimize one dynamic preset or all visible dynamic presets.

Optimization updates the draft parameters shown in the dialog. You still need to save the add-on configuration for those parameters to be written to Anki's dynamic FSRS overlay.

For FSRS-7 presets, the Same-day Reviews checkbox controls whether same-day reviews are included during optimization for that preset.

Checking Which Preset Matched

In Card Info, the add-on can show the dynamic FSRS preset that matched the card and the rule that selected it. This is display-only information to help verify your configuration.

If no dynamic rule matches, the card uses its normal deck preset.

Important Notes

  • Search rule order matters.
  • Cards can stay in their current decks.
  • Dynamic presets are stored in Anki's synced collection configuration.
  • Add-on UI preferences and draft configuration are local until saved.
  • Searches using FSRS metric properties such as prop:r, prop:s, or prop:d are rejected for dynamic preset rules, because those values depend on the selected FSRS preset.

Troubleshooting

If a card does not use the expected preset:

  • check the Card Info dynamic preset rows
  • confirm the card matches the generated Anki search
  • move the intended preset above broader matching presets
  • check that the add-on configuration was saved
  • confirm you are running a compatible Anki build

If optimization does not produce useful parameters, check that the preset search matches enough reviewed cards for FSRS optimization.

README

FSRS Dynamic Preset Selection

Anki add-on that maps cards to add-on-defined FSRS presets using ordered search rules. The add-on writes Anki's synced fsrsPresetOverlay collection config and lets Anki core resolve the effective FSRS preset during scheduling, search, browser, and stats operations.

This add-on requires an Anki build that exposes:

  • Collection.set_fsrs_preset_overlay()
  • anki.collection.FsrsPresetOverlay

Configuration

The add-on config contains add-on FSRS presets and ordered rules:

{
  "presets": [
    {
      "id": "addon:example:medical",
      "name": "Medical",
      "fsrs_version": "seven",
      "params": [],
      "desired_retention": 0.9,
      "historical_retention": 0.9,
      "deck": "Medical",
      "search": "firstgrade:1"
    }
  ],
  "rules": [
    {
      "search": "tag:medical",
      "preset_id": "addon:example:medical"
    }
  ]
}

The add-on config screen edits the preset list directly. If a preset has a deck selected and/or a search filter, the add-on writes one combined rule like deck:"Medical" firstgrade:1 before the advanced rules entries. Preset ids are generated from the preset name. Use Move Up and Move Down in the dialog to change preset precedence.

The config screen can refresh card counts for the current draft rules. Each preset row shows how many cards its generated query selects. The deck summary below the preset table shows, for every normal deck, how many cards are not selected by any generated or advanced rule. It also shows the same unselected count with is:new cards removed.

Use the Same-day Reviews checkbox on an FSRS-7 preset row to control whether same-day reviews are included when optimizing that preset. Use Optimize on an individual preset row to recompute only that preset's parameters. Use Optimize All to recompute every visible preset row in current order. While optimization is running, each row's optimize button is replaced by a progress bar: pending rows show Pending, the active row shows Optimizing, and completed rows show Done. The active row is filled from Anki's backend optimizer progress.

For the common first-answer split workflow, check Grade Split on a preset row. The row is replaced with four grade rows for Again, Hard, Good, and Easy. They inherit the row's name, deck, and search filter, but keep separate desired retention, same-day optimize, and parameter values. Their generated queries are ordered as deck:"..." firstgrade:N <search>.

The interval split checkbox creates Young and Mature rows using stored card intervals. In Days mode, Young uses prop:ivl<N and Mature uses prop:ivl>=N. In Percent mode, the add-on reads the current matching cards' stored intervals, computes a day cutoff for the bottom percentage, then writes the same prop:ivl rules. If both grade and interval split are checked, the tree shows eight leaf rows with both Grade and Interval labels. Interval split rows also emit simulator rules that keep the stable deck, grade, and search selector separate from the simulated interval bound.

Rules are evaluated by Anki core in order. The first matching rule assigns the card's FSRS preset. Cards that do not match any rule use their deck-config FSRS preset.

Development

Anki loads the installed add-on from ~/Library/Application Support/Anki2/addons21/1798968356, not directly from this source repo. Copy changed runtime files into that folder and reload or restart Anki before testing in the app.

When reading deck options through collection.decks.config_dict_for_deck_id(), remember that Anki returns a legacy Python dict. Extra deck-option fields stored in Rust as DeckConfig.inner.other are flattened into the top level, so fsrs7IncludeSameDayOptimize is read as config["fsrs7IncludeSameDayOptimize"]. This add-on stores the FSRS-7 same-day optimize choice on each add-on preset; the deck option is only used to initialize older presets that do not yet have the field.

Run tests with:

python3 -m pytest