Saturday, July 10, 2021

srf - Spaced Repetition Flashcards

It is over a month since I started using srf for study instead of Aniki.

I prefer the scheduler in srf. The main reason I wrote it was to implement the scheduler to my preferences. I would have written an Anki add-on to do this if it were possible, but the only way to modify the Anki scheduler is to fork Anki and make pervasive changes. I didn't want to do that. The scheduler in srf is much simpler than that in Anki. Simple is good.

Like Anki, there are four options when a card is reviewed: again, hard, good and easy. Again resets the card to a 10 second interval and sets the factor according to the previous interval (if the previous interval was longer, the factor is larger). Hard reduces the interval by half and reduces the factor by 50. Good increases the interval according to the current factor and increases the factor by 50. Easy increases the interval according to the current factor, with a minimum of one week, and increases the factor by 200.

The factor controls how quickly the interval increases when Good or Easy are selected. The interval increases exponentially at a rate determined by the factor. New interval = old interval * factor / 1000. Factor changes at every view, decreasing for Again or Hard and increasing for Good or Easy. The scheduler hunts for an appropriate factor. The assumption is that different factors are optimum for different cards. But this might all be excess complexity. It probably is and I might simplify this at some point in the future.

Keep in mind that one doesn't study strictly according to the schedule. One studies for a period then takes a break. Perhaps one or a few study sessions per day. Maybe sometimes not studying for several days. Thus the fine details of the scheduling algorithm are not important. What is important is that the interval increases at a reasonable rate if the card is remembered and decreases if it is not remembered.

Again immediately reduces the interval to 10 seconds, which is also the initial interval for a new card. This is very short, but it is expected to increase rapidly. The factor varies according to the previous interval: 1000 if the previous interval is very short, up to 10000 if the previous interval was a year. Thus the rate the interval increases depends on what the previous interval was. Selecting Again twice in a row will reduce the factor to 2000. The expectation is that a card that had reached a long interval before being forgotten probably doesn't need a lot of close repetition: just a few reminders then quickly return to a longer interval.

Hard reduces the interval by half. If a card is repeatedly hard, the interval will decrease exponentially, down to 30 seconds. And the factor is decreased a little (50).

Good increases the interval according to the factor and increases the factor a little (50).

Easy increases the interval as Good does, except with a minimum interval of 7 days, and increases the factor a little faster (200).

If all is well, cards should mostly alternate between Hard and Good. In the early stages of learning, Again might be used, but eventually one should get beyond forgetting a card completely. Easy isn't necessary, but it will save time if a card is in fact very easy in the early stages of learning.

There are no decks in srf, nor any of the complexity that goes along with them. 

The only way to get cards into srf is to import an Anki database.

I hope, before too long, to implement four enhancements to srf:

  1. UI to edit notes
  2. UI to edit cards
  3. import/export of notes and cards, including import for Anki published decks
  4. Tags on notes and/or cards and filter by tag for selective study

But lately, I am busy studying and with other projects, so I may not get to these for a while. I suppose the next big motivation will come when I want to change or add a few notes, then when I have learned the notes/cards I have and want to add more in bulk. But I have 30,000 cards yet to study, so that day may not come for a while yet.

No comments:

Labels