Skip to content

Commit

Permalink
Fix/clip post-lapse stability (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Dec 17, 2024
1 parent 20a712d commit b442a7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scheduler_basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func (bs basicScheduler) reviewState(grade Rating) SchedulingInfo {

func (bs basicScheduler) nextDs(nextAgain, nextHard, nextGood, nextEasy *Card, difficulty, stability, retrievability float64) {
nextAgain.Difficulty = bs.parameters.nextDifficulty(difficulty, Again)
nextAgain.Stability = bs.parameters.nextForgetStability(difficulty, stability, retrievability)
nextSMin := stability / math.Exp(bs.parameters.W[17]*bs.parameters.W[18])
nextAgain.Stability = math.Min(nextSMin, bs.parameters.nextForgetStability(difficulty, stability, retrievability))

nextHard.Difficulty = bs.parameters.nextDifficulty(difficulty, Hard)
nextHard.Stability = bs.parameters.nextRecallStability(difficulty, stability, retrievability, Hard)
Expand Down
2 changes: 1 addition & 1 deletion scheduler_longterm.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (lts longTermScheduler) reviewState(grade Rating) SchedulingInfo {

func (lts longTermScheduler) nextDs(nextAgain, nextHard, nextGood, nextEasy *Card, difficulty, stability, retrievability float64) {
nextAgain.Difficulty = lts.parameters.nextDifficulty(difficulty, Again)
nextAgain.Stability = lts.parameters.nextForgetStability(difficulty, stability, retrievability)
nextAgain.Stability = math.Min(stability, lts.parameters.nextForgetStability(difficulty, stability, retrievability))

nextHard.Difficulty = lts.parameters.nextDifficulty(difficulty, Hard)
nextHard.Stability = lts.parameters.nextRecallStability(difficulty, stability, retrievability, Hard)
Expand Down

0 comments on commit b442a7c

Please sign in to comment.