Skip to content

Commit

Permalink
update FSRS-5 formula & fix CMRR (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Jul 29, 2024
1 parent d777058 commit 538d520
Show file tree
Hide file tree
Showing 3 changed files with 372 additions and 448 deletions.
808 changes: 366 additions & 442 deletions fsrs4anki_optimizer.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions fsrs4anki_scheduler.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FSRS4Anki v5.0.0 Scheduler Qt6
// FSRS4Anki v5.0.2 Scheduler Qt6
set_version();
// The latest version will be released on https://github.com/open-spaced-repetition/fsrs4anki/releases/latest

Expand Down Expand Up @@ -201,7 +201,7 @@ function next_interval(stability) {
}
function next_difficulty(d, rating) {
let next_d = d - w[6] * (ratings[rating] - 3);
return constrain_difficulty(mean_reversion(w[4], next_d));
return constrain_difficulty(mean_reversion(init_difficulty("easy"), next_d));
}
function mean_reversion(init, current) {
return w[7] * init + (1 - w[7]) * current;
Expand Down Expand Up @@ -308,7 +308,7 @@ function is_empty() {
return !customData.again.d | !customData.again.s | !customData.hard.d | !customData.hard.s | !customData.good.d | !customData.good.s | !customData.easy.d | !customData.easy.s;
}
function set_version() {
const version = "v5.0.0";
const version = "v5.0.2";
customData.again.v = version;
customData.hard.v = version;
customData.good.v = version;
Expand Down
6 changes: 3 additions & 3 deletions fsrs4anki_scheduler_qt5.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// FSRS4Anki v5.0.0 Scheduler Qt5
// FSRS4Anki v5.0.2 Scheduler Qt5
set_version();
// The latest version will be released on https://github.com/open-spaced-repetition/fsrs4anki/releases/latest

Expand Down Expand Up @@ -207,7 +207,7 @@ function next_interval(stability) {
}
function next_difficulty(d, rating) {
let next_d = d - w[6] * (ratings[rating] - 3);
return constrain_difficulty(mean_reversion(w[4], next_d));
return constrain_difficulty(mean_reversion(init_difficulty("easy"), next_d));
}
function mean_reversion(init, current) {
return w[7] * init + (1 - w[7]) * current;
Expand Down Expand Up @@ -317,7 +317,7 @@ function is_empty() {
return !customData.again.d | !customData.again.s | !customData.hard.d | !customData.hard.s | !customData.good.d | !customData.good.s | !customData.easy.d | !customData.easy.s;
}
function set_version() {
const version = "v5.0.0";
const version = "v5.0.2";
customData.again.v = version;
customData.hard.v = version;
customData.good.v = version;
Expand Down

0 comments on commit 538d520

Please sign in to comment.