yodaiken/dolphinsr

Cause logic error by repeatedly applying "hard".

LinasKo opened this issue · 2 comments

I'm adapting this for a tiny project of mine, and as far as I see, a logic error can consistently be caused by generating a few cards, and then only picking "hard" as an answer.

This seems to happen in applyToLearningCardState, with an end state of rating = "hard" and prev.consecutiveCorrect = 1.

I think I found it.

} else if (rating.match(/^good|hard$/) && prev.consecutiveCorrect < 1) {

In pseudocode, it essentially boils down to:

if (isGood || isHard) && not isConsecutive:
    consecutive++
    repeat card

Looking at the anki flowchart in https://www.juliensobczak.com/inspect/2022/05/30/anki-srs.html, it seems what was meant may have been:

I think what was meant was:

if isHard || (isGood && not isConsecutive):
    consecutive++
    repeat card

In simpler words, if you remember the answer but are having trouble, it will treat it as a success (consecutive), but will make you repeat it until you're good at remembering it.

Note: this does fail the assumpition in types.ts, that in LearningCardState,
consecutiveCorrect: number; // 0 <= consecutiveCorrect < 2, int