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

Properly convert FSRS 4.5 parameters into FSRS 5 parameters #3463

Closed
user1823 opened this issue Sep 30, 2024 · 5 comments · Fixed by #3375
Closed

Properly convert FSRS 4.5 parameters into FSRS 5 parameters #3463

user1823 opened this issue Sep 30, 2024 · 5 comments · Fixed by #3375

Comments

@user1823
Copy link
Contributor

@L-M-Sherlock @Expertium

The initial difficulties (D0) calculated using default FSRS 4.5 parameters with the formulas of FSRS 4.5 and FSRS 5 are quite different.

This implies that if the user doesn't re-optimize their parameters after updating to 24.10+, the scheduling is very likely to be worse than with FSRS 4.5. Obviously, we don't want the Anki update to make the scheduling worse.

Ideally, the user should re-optimize their parameters after updating to 24.10+. But, we can't assume that all users will do that. So, to reduce the damage, we should try to find out how to properly convert FSRS 4.5 parameters into FSRS 5 parameters (apart from just adding two zeroes).

Specifically, we want to find out how to convert w4, w5 and w7.

@Expertium
Copy link
Contributor

Expertium commented Sep 30, 2024

w7 is the same as before, though the exact numerical value isn't guaranteed to be the same, of course.
As for w4 and w5, I'm not sure. I made this to help you (and anyone else reading this) to visualize initial D: https://www.desmos.com/calculator/ujpkwjxgrl

@user1823
Copy link
Contributor Author

user1823 commented Oct 2, 2024

Thanks for the link. It was indeed helpful.

I propose the following:

Let the values of w4 and w5 in the FSRS 4.5 parameters be $a$ and $b$ respectively.

Then, we should perform the following calculations:

$$ c = a + 2b $$

$$ d = \frac{\ln\left(3b+1\right)}{3} $$

And these values should be used as the converted values of w4 and w5 in FSRS 5.

In the graph below,

  • the black line represents the initial D calculated using the FSRS 4.5 formula and the default FSRS 4.5 parameters
  • the purple curve represents the initial D calculated using the FSRS 5 formula and the default FSRS 4.5 parameters
  • the blue curve represents the initial D calculated using the FSRS 5 formula and the converted FSRS 4.5 parameters

image

@user1823
Copy link
Contributor Author

user1823 commented Oct 2, 2024

If you think that the converted parameters should produce exactly the same value of initial D for Again and Good (instead of Again and Easy), just use this formula for d:

$$ d = \frac{\ln\left(2b+1\right)}{2} $$

The downside is that the init D for Easy will become much lesser than in FSRS 4.5. However, this is probably not a serious issue because Easy is used less commonly than Good and it makes sense to optimize for the most commonly used buttons.

@Expertium
Copy link
Contributor

Expertium commented Oct 2, 2024

@L-M-Sherlock unless this is terribly impractical for some reason, use user1823's formulas (c and d) to internally convert w4 and w5 in Anki 24.10 beta (without notifying the user).

@L-M-Sherlock
Copy link
Contributor

The converting is executed in FSRS-rs. Please open an issue there to remind me.

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

Successfully merging a pull request may close this issue.

3 participants