1- // FSRS4Anki v5.3.4 Scheduler Qt5
1+ // FSRS4Anki v6.0.0 Scheduler Qt5
22set_version ( ) ;
33// The latest version will be released on https://github.com/open-spaced-repetition/fsrs4anki/releases/latest
44
@@ -8,8 +8,7 @@ const deckParams = [
88 {
99 // Default parameters of FSRS4Anki for global
1010 "deckName" : "global config for FSRS4Anki" ,
11- "w" : [ 0.40255 , 1.18385 , 3.173 , 15.69105 , 7.1949 , 0.5345 , 1.4604 , 0.0046 , 1.54575 , 0.1192 , 1.01925 ,
12- 1.9395 , 0.11 , 0.29605 , 2.2698 , 0.2315 , 2.9898 , 0.51655 , 0.6621 ] ,
11+ "w" : [ 0.2172 , 1.1771 , 3.2602 , 16.1507 , 7.0114 , 0.57 , 2.0966 , 0.0069 , 1.5261 , 0.112 , 1.0178 , 1.849 , 0.1133 , 0.3127 , 2.2934 , 0.2191 , 3.0004 , 0.7536 , 0.3332 , 0.1437 , 0.2 ] ,
1312 // The above parameters can be optimized via FSRS4Anki optimizer.
1413 // For details about the parameters, please see: https://github.com/open-spaced-repetition/fsrs4anki/wiki/The-Algorithm
1514 // User's custom parameters for global
@@ -21,17 +20,15 @@ const deckParams = [
2120 {
2221 // Example 1: User's custom parameters for this deck and its sub-decks.
2322 "deckName" : "MainDeck1" ,
24- "w" : [ 0.40255 , 1.18385 , 3.173 , 15.69105 , 7.1949 , 0.5345 , 1.4604 , 0.0046 , 1.54575 , 0.1192 , 1.01925 ,
25- 1.9395 , 0.11 , 0.29605 , 2.2698 , 0.2315 , 2.9898 , 0.51655 , 0.6621 ] ,
23+ "w" : [ 0.2172 , 1.1771 , 3.2602 , 16.1507 , 7.0114 , 0.57 , 2.0966 , 0.0069 , 1.5261 , 0.112 , 1.0178 , 1.849 , 0.1133 , 0.3127 , 2.2934 , 0.2191 , 3.0004 , 0.7536 , 0.3332 , 0.1437 , 0.2 ] ,
2624 "requestRetention" : 0.9 ,
2725 "maximumInterval" : 36500 ,
2826 } ,
2927 {
3028 // Example 2: User's custom parameters for this deck and its sub-decks.
3129 // Don't omit any keys.
3230 "deckName" : "MainDeck2::SubDeck::SubSubDeck" ,
33- "w" : [ 0.40255 , 1.18385 , 3.173 , 15.69105 , 7.1949 , 0.5345 , 1.4604 , 0.0046 , 1.54575 , 0.1192 , 1.01925 ,
34- 1.9395 , 0.11 , 0.29605 , 2.2698 , 0.2315 , 2.9898 , 0.51655 , 0.6621 ] ,
31+ "w" : [ 0.2172 , 1.1771 , 3.2602 , 16.1507 , 7.0114 , 0.57 , 2.0966 , 0.0069 , 1.5261 , 0.112 , 1.0178 , 1.849 , 0.1133 , 0.3127 , 2.2934 , 0.2191 , 3.0004 , 0.7536 , 0.3332 , 0.1437 , 0.2 ] ,
3532 "requestRetention" : 0.9 ,
3633 "maximumInterval" : 36500 ,
3734 }
@@ -99,7 +96,7 @@ if (Object.keys(params).length === 0) {
9996const w = params [ "w" ] ;
10097const requestRetention = params [ "requestRetention" ] ;
10198const maximumInterval = params [ "maximumInterval" ] ;
102- const DECAY = - 0.5 ;
99+ const DECAY = - w [ 20 ] ;
103100const FACTOR = 0.9 ** ( 1 / DECAY ) - 1 ;
104101// global fuzz factor for all ratings.
105102const fuzz_factor = set_fuzz_factor ( ) ;
@@ -229,7 +226,11 @@ function next_forget_stability(d, s, r) {
229226 return + Math . min ( w [ 11 ] * Math . pow ( d , - w [ 12 ] ) * ( Math . pow ( s + 1 , w [ 13 ] ) - 1 ) * Math . exp ( ( 1 - r ) * w [ 14 ] ) , sMin ) . toFixed ( 2 ) ;
230227}
231228function next_short_term_stability ( s , rating ) {
232- return + ( s * Math . exp ( w [ 17 ] * ( rating - 3 + w [ 18 ] ) ) ) . toFixed ( 2 ) ;
229+ let sinc = Math . exp ( w [ 17 ] * ( rating - 3 + w [ 18 ] ) ) * Math . pow ( s , - w [ 19 ] ) ;
230+ if ( rating >= 3 ) {
231+ sinc = Math . max ( sinc , 1 ) ;
232+ }
233+ return + ( s * sinc ) . toFixed ( 2 ) ;
233234}
234235function init_states ( ) {
235236 customData . again . d = init_difficulty ( "again" ) ;
@@ -325,7 +326,7 @@ function is_empty() {
325326 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 ;
326327}
327328function set_version ( ) {
328- const version = "v5.3.4 " ;
329+ const version = "v6.0.0 " ;
329330 customData . again . v = version ;
330331 customData . hard . v = version ;
331332 customData . good . v = version ;
0 commit comments