open-spaced-repetition / fsrs4anki-helper

An Anki add-on that supports Postpone & Advance & Load Balance & Easy Days & Disperse Siblings & Flatten
https://ankiweb.net/shared/info/759844606
MIT License
192 stars 14 forks source link

Reschedule all cards works differently between the FSRS4 Javascript (Anki 2.1.66) and the FSRS4 native (Anki 23.10) [BUG] #253

Closed cjdduarte closed 10 months ago

cjdduarte commented 11 months ago

Describe the bug

With the same weights in both versions and using the same database, when triggering the "Reschedule all cards" function in Anki 2.1.66 for today, there are 175 cards to review.

In Anki 23.10 using the integrated FSRS, and again triggering the "Reschedule all cards" function, it tells me to review 325 cards.

Environment

L-M-Sherlock commented 11 months ago

Could you check the extra reviews' card info?

cjdduarte commented 11 months ago

Anki 2.1.66

image

Anki 23.10

image

user1823 commented 11 months ago

It seems to be the same issue as https://forums.ankiweb.net/t/anki-23-10-beta/34912/87.

In v23.10, the add-on uses Anki's FSRS code to calculate the stability.

cjdduarte commented 11 months ago

It seems to be the same issue as https://forums.ankiweb.net/t/anki-23-10-beta/34912/87.

In v23.10, the add-on uses Anki's FSRS code to calculate the stability.

So in this case, would Anki 23.10 be "more correct"? Because this has been my perception. Or is it the opposite?

L-M-Sherlock commented 11 months ago

Could you paste your weights here?

cjdduarte commented 11 months ago

0.3524, 0.3869, 1.9765, 22.3079, 4.7508, 1.0115, 0.8749, 0.0000, 1.5617, 0.1000, 1.0117, 2.1119, 0.1170, 0.2724, 1.2289, 0.0626, 2.6100

user1823 commented 11 months ago

And your request/desired retention?

By the way, the stability calculated by the helper add-on (in 2.1.66) is correct based on the weights while that calculated by Anki is not.

cjdduarte commented 11 months ago

And your request/desired retention?

By the way, the stability calculated by the helper add-on (in 2.1.66) is correct based on the weights while that calculated by Anki is not.

0.9

user1823 commented 11 months ago

And your request/desired retention?

0.9

Fine. So, the helper add-on (in 2.1.66) is working correctly but the built-in FSRS in Anki 23.10 is not. @L-M-Sherlock, this needs to be investigated.

@cjdduarte, if you think that the intervals given by the add-on are incorrect, it might be possible that the optimizer has some bug. But before suspecting that, read this:

For many users, SM-2 tends to show new cards at unnecessarily short intervals. So, when users switch to FSRS, they tend to feel that the intervals for new cards are too large. But these larger intervals match the target retention (configured in the scheduler code) better. By using these larger intervals, FSRS can prevent many of the unnecessary reviews that happen when using SM-2.

If you still want to decrease the intervals, you can increase the requestRetention in the scheduler. But note that this will decrease all the intervals, not just the first intervals.

L-M-Sherlock commented 11 months ago

Yeah, the result of built-in FSRS is incorrect. I will try to reproduce this bug.

L-M-Sherlock commented 11 months ago

Anki 23.10

Could you move the card into a separate deck and reschedule the deck? I can't reproduce this bug in my device. Or you can send your collection file to me, and it will help me locate the bug quickly.

cjdduarte commented 11 months ago

Anki 23.10

Could you move the card into a separate deck and reschedule the deck? I can't reproduce this bug in my device. Or you can send your collection file to me, and it will help me locate the bug quickly.

07.5-Segurança da Informação.apkg.zip

I took that example of mine. See if it helps

cjdduarte commented 11 months ago

0.3524, 0.3869, 1.9765, 22.3079, 4.7508, 1.0115, 0.8749, 0.0000, 1.5617, 0.1000, 1.0117, 2.1119, 0.1170, 0.2724, 1.2289, 0.0626, 2.6100

L-M-Sherlock commented 11 months ago
image

It's correct in my device after rescheduling.

cjdduarte commented 11 months ago
image

It's correct in my device after rescheduling.

Anki 2.1.66 or Anki 23.10 (beta3)?

This weight?: 0.3524, 0.3869, 1.9765, 22.3079, 4.7508, 1.0115, 0.8749, 0.0000, 1.5617, 0.1000, 1.0117, 2.1119, 0.1170, 0.2724, 1.2289, 0.0626, 2.6100

L-M-Sherlock commented 11 months ago

Version ⁨23.10 (8214aa42)⁩, with your weights.

cjdduarte commented 11 months ago

I just tested it again here. Check this out: My Anki is the Version ⁨23.10 (d2f392ff)⁩

image

cjdduarte commented 11 months ago

Something very strange happened: In my original deck, it persists at that value. But when I exported the card and imported it again, the value corrected.

image

L-M-Sherlock commented 11 months ago

I guess the memory state didn't update normally in your first attempt.

cjdduarte commented 11 months ago

I managed to reproduce it:

1 - Import this deck:

collection-2023-09-29@14-01-26.zip

2 - Delete the Javascript, enable the SRFS, and input these weights: 0.3524, 0.3869, 1.9765, 22.3079, 4.7508, 1.0115, 0.8749, 0.0000, 1.5617, 0.1000, 1.0117, 2.1119, 0.1170, 0.2724, 1.2289, 0.0626, 2.6100 3 - Save 4 - Order to reschedule all 5 - Filter by this ID: 2261631

image

cjdduarte commented 11 months ago

However, if I export just this card, delete it, and then reimport it, it goes back to those above values.

image

But the important thing is that I managed to reproduce the error with the steps above.

cjdduarte commented 11 months ago

I FOUND OUT.

I have several deck groups. When applying the weight, it is only saving in the current one.

image

I had to command it to save in all.

image

I think many people are not aware of this.

cjdduarte commented 11 months ago

Is the standard to apply the weights by group or generally? Even the deck groups with weights that remain empty exhibit a different behavior;

L-M-Sherlock commented 11 months ago

The weights only works for those decks using the preset. It will use the default weights if the weights field is empty.

L-M-Sherlock commented 11 months ago

@dae, we need to write a document for that. Where can we write it?

cjdduarte commented 11 months ago

The weights only works for those decks using the preset. It will use the default weights if the weights field is empty.

Resolved. All the differences were because of this. The problem is that when no weight exists, the Helper doesn't run. However, when I insert 1, it enables.

Suggestion: As you said yourself, either make this very well informed, or also make it possible to be universal like "Custom Scheduler".

dae commented 11 months ago

@L-M-Sherlock I will add documentation inside the decks screen when I have a chance

@cjdduarte If all of your decks have approximately the same difficulty, you can make them share the one preset if you want a single set of weights.

cjdduarte commented 11 months ago

@L-M-Sherlock I will add documentation inside the decks screen when I have a chance

@cjdduarte If all of your decks have approximately the same difficulty, you can make them share the one preset if you want a single set of weights.

Here's the translated text:

@dae , I'm still thinking about how I will reorganize my decks. As I study to take exams and the content is extensive, I apply "weights" to the subjects.

For example, if one subject is worth 30% of the exam grade and another subject is worth 5% of the exam, I set up to study 30 new cards from that subject and 5 cards from another subject. Thus, I maintain a 30/5 ratio. Imagine this for 25 subjects (that's why I have several deck groups).

However, this solution becomes complicated with this new way of using the integrated FSRS. I value simplicity. In my case, it would be registering the weights just once. Or simplifying the groups.

Anyway, I have to rethink the best way between how I have studied today and the new functionality. I have to adapt to the new way of using Anki.

user1823 commented 11 months ago

In the v3 scheduler, the new cards per day setting can be deck-specific in addition to being preset-specific.

So, you can use the same preset for multiple decks while still having different new cards per day setting for them.

cjdduarte commented 11 months ago

In the v3 scheduler, the new cards per day setting can be deck-specific in addition to being preset-specific.

@user1823 , good point. I know about the feature, but I've never used it. As a long-time user, sometimes we get stuck in our old ways.

It will probably be the most correct solution for my case. Thanks for reminding me.

user1823 commented 11 months ago

In the v3 scheduler, the new cards per day setting can be deck-specific in addition to being preset-specific.

@user1823 , good point. I know about the feature, but I've never used it. As a long-time user, sometimes we get stuck in our old ways.

It will probably be the most correct solution for my case. Thanks for reminding me.

Well, the same case was with me. Just a few days ago, Damien reminded me of the feature.

cjdduarte commented 11 months ago

@dae and @L-M-Sherlock , I noticed that the log functionality was removed from the native version. However, wouldn’t it be the case to keep it and add the information about the current card weight? Example:

FSRS enabled
**Preset: (Default or XYZ or ABC)**
D: 10
S: 5.74
R: 89.59%

I think this would help those who want to keep the logs to learn what's happening in this improvement?

image

user1823 commented 11 months ago

You can simply view the card info to know about the current states.

L-M-Sherlock commented 10 months ago

I noticed that the log functionality was removed from the native version.

Maybe we can allow the card template to read DSR states from the card. You can request this feature in the Anki forum: https://forums.ankiweb.net/