Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSRS memory states revert to SM-2 after changing deck #3521

Open
jcznk opened this issue Oct 22, 2024 · 7 comments
Open

FSRS memory states revert to SM-2 after changing deck #3521

jcznk opened this issue Oct 22, 2024 · 7 comments

Comments

@jcznk
Copy link

jcznk commented Oct 22, 2024

I'm using Anki 24.10 beta 4. This also occurs in version 24.06.3 (Windows 10, qt6). Testing was done on a new profile.

After changing a card's deck, the FSRS memory state (Stability, Difficulty, Retrievability) are lost and replaced with SM-2's Ease. This seems to affect both the scheduling and sorting. For example, when sorting by Difficulty Ascending, these cards are always shown first since they no longer have a Difficulty.

In the example below, all reviews were performed using a filtered deck, but the same behavior seems to occur for "regular" review entries.

Memory state and intervals before changing the deck:

Memory state and intervals after changing the deck:

@dae
Copy link
Member

dae commented Oct 22, 2024

That is by design. They are recalculated when the card is reviewed again.

@jcznk
Copy link
Author

jcznk commented Oct 22, 2024

May I ask the reasoning behind this design choice? From my understanding, it seems to negatively impact both the scheduling intervals and the sorting.

@brishtibheja
Copy link
Contributor

Ah, I have faced this before but I failed to reproduce it later.

I assume it was done so that memory states need not be recalculated everytime deck is changed? Can we not still keep the previous parameters though so that sorting isn't affected?


@jcznk In case you didn't thought of this, clicking optimise will fix this issue. Just make sure the cards aren't suspended.

@user1823
Copy link
Contributor

user1823 commented Oct 22, 2024

I assume it was done so that memory states need not be recalculated everytime deck is changed?

Yes, different decks can have different presets and therefore different parameters. So, the memory states from the previous deck need to be cleared.

Can we not still keep the previous parameters though so that sorting isn't affected?

Do you mean memory states? We can't keep the previous ones. Otherwise, Anki has no way to know at the time of review if the saved memory states were calculated using the parameters of the new preset or the old preset.

From my understanding, it seems to negatively impact both the scheduling intervals and the sorting.

Because the memory states are recalculated just before you answer a card, the scheduling is unaffected. However, stats and sorting are affected.

Recalculating the memory states just after moving the card should be possible. I don't know why Anki doesn't do that. Maybe performance concerns? @dae

@jcznk
Copy link
Author

jcznk commented Oct 22, 2024

@brishtibheja @user1823 Thank you both for the insights, and for the tip regarding optimization. I have updated the opening post and the topic title to use more accurate terminology.

@jcznk jcznk changed the title FSRS parameters reset to SM-2 after changing deck FSRS memory states reset to SM-2 after changing deck Oct 22, 2024
@jcznk jcznk changed the title FSRS memory states reset to SM-2 after changing deck FSRS memory states revert to SM-2 after changing deck Oct 22, 2024
@dae
Copy link
Member

dae commented Oct 26, 2024

Deck changing is a common operation, and we don't want expensive calculations every time it happens.

Keeping the old memory state would require some extra flag so we know to discard it at study time. And it would mean your stats are still wrong - they'd just contain stale data, instead of missing data.

@brishtibheja
Copy link
Contributor

brishtibheja commented Oct 26, 2024

And it would mean your stats are still wrong - they'd just contain stale data, instead of missing data.

Not every time, often we move things between decks that share the same preset (also note that FSRS users make presets on the basis of content, so they're more likely to shift cards to a deck sharing same preset).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants