Scheduler tweaks

@dae: I saw your comment that you plan to refactor the scheduler soon here.

When you modify the code maybe you could add a few features? I don’t necessarily mean user-facing options but some hooks, especially if you plan to rewrite parts in Rust so that the usual monkeypatching or wrapping would no longer work.

Here are some modifications I use or that I tried to change with add-ons and why I think that they might be of wider interest. In my view these modifications are just small tweaks and are not about fundamental changes to how scheduling works. I’m sure you already have a huge list of possible tweaks or useful additional hooks but maybe there’s some room for one or multiple additions so that I can still make the following add-ons in future Anki versions.

 

1
I have seen many requests about a more sophisticated scheduler akin to Supermemo’s SM17. I wouldn’t mind getting such far reaching changes and I’d also like to see some smaller changes (see the other numbers below) but all this is probably less relevant than a basic flash card mode. I mean the option to remove all randomization of intervals which also works mobile. Some setting that’s stored in the collection which needs an add-on for a gui interface to enable it or maybe even an option in the built-in deck options gui. This should be about five lines of code?

This was one of the most popular requests on reddit over the last three years. I don’t see relevant downsides.

I have used Supermemo and I just hate that there’s only the supermemo way and the wrong way and when people ask in the online documentation they are informed that they just don’t know what’s good for them in the long run and that if they just wait long enough they’ll come to see the wisdom behind each supermemo decision. I guess the forced randomization in Anki might also create such animosity for some.

Most of the benefits from Anki don’t come from the randomization (but the active recall and spacing parts). I guess there should be randomization by default but a discoverable way to disable it on a deck level would be great. This would be a few tiny changes in the code and make many people happy.

Today I was preaching about the benefits of Anki in another place and I was informed that Anki is just a fad with reference to the most recent podcast episode of Cal Newport’s podcast. In it Anki didn’t come off very good. Cal Newport is the “deep work” guy. He’s quite popular - at least I knew the name from German newspapers and weekly journals. A section labelled “the utility of fancy flashcard software [12:43]” sounds pretty negative to me. In effect Anki was described as only useful for rote memorization of what’s basically vocabulary though it would be questionable if Anki were worth it. For “conceptual study” you are encouraged to study some questions in a fixed order (“focused question cluster”). This sounds pretty close to Anki’s focus on active recall and the minimum information principle and studying by subdecks … If there were no forced randomization you could even exactly replicate this approach.

I also think that there should be an option (that also affects mobile) so that non-good answers never change the ease value. I don’t like it, but on reddit it was very popular. It makes Anki less opaque and if it’s off by default you are not encouraging users.

In a reddit thread from earlier this year I defended removing all randomization against the supermemo orthodoxy like this: Fixed order might also allow you a more “top-down” approach in learning, e.g. you could always learn some overview table or mindmap. Instead of seeing it all at once the first questions are about the center of your mind map. This should allow more free and less cued recall but again different “multi sided card” should suffice. This would also accommodate sceptics: Most successful older/established people today haven’t used Anki/Supermemo and always studied in fixed order. If you are new to Anki and not motivated to read up or experiment but just follow a heuristic to just exactly imitate what most other successful people do you would want a fixed order?

I’m kind of selfish in raising this point: If you have no randomization people will want to add notes (cards) in another position. In Anki there’s no such thing as “order” you only have due dates and the creation time. So the best way to permanently do this is probably to fake the note creation time since this also survives resetting all scheduling or sharing the note with other people. In general two values “creation time” and “order token” would probably be better. But this would require changes in the database structure so it will take a long time until it arrives. And it would also be more complication for regular users whereas you can sell “faked nids” as close to the real world: If I have a pile of flash cards with a post-it note “created 2020-08-15”, then tomorrow add another card I missed, and then review the pile in a month I wouldn’t remember (or care) about the creation dates. Arthur already has an add-on for this which doesn’t work because of this bug in 2.1.28+. So fixing this bug would be a good compliment to a non-random mode. And I really depend on Arthur’s add-on which is one of the reasons I’m stuck on 2.1.26 …

 

2 shorter ivls for very mature cards
The basic idea is that it’s more costly to forget very mature cards so that I want to have slightly shorter intervals for them so that I forget them less often. If each review lasts 10 seconds and …

  • if the next review interval will be 500 days then the “time investment needed to remember the card contents per day” is 10/500 = 0,02 seconds/day (for the next 500 days = until the next repetition).
  • if the next review interval is 20 days then the “time investment needed to remember the card contents per day” is 10/20 = 0,5 seconds/day (for the next 20 days = until the next repetition).
    So keeping the very mature cards in mind for an additional day takes 25times less time investment.

Maybe I made some mistake in this calculation but so far I haven’t seen it. At the moment I directly overwrite _nextRevIvl but I guess I could also wrap it with “around”.

 

3 Dynamic Lapse Interval.
This add-on modifies the the deck setting for “Lapse-New interval”: Showing a lapsed card with a prior interval of 5 days after 4 days (80%) might be good but if the card had an interval of 5 years waiting 4 years for the first review after a lapse is too long for me. I would prefer less than a year (<20%). I’d prefer to have an option/addon that sets the lapse interval at 100% for short intervals and 25% for long intervals. For intervals between those two extremes the lapse interval is adjusted in a linear fashion. These values are user adjustable.

 

4 “Reset on second consecutive fail”
If I have e.g. “Lapse-New interval” set to 25% and fail a card with an interval of 360 days. The next interval will be 90 days. If in 90 days I get it wrong again the new interval will be 22 days. But if I’ve truely forgotten the card I needed an interval of one day and to get down to this would take a long time. So I have an add-on that resets on the second consecutive fail. For this the successful reviews that are driven by “Lapses-Steps” are ignored and I only count ratings from the revlog table that are “rev” reviews.

I still have more ideas but I’m afraid I already have the longest post in this forum so far … For 2-4 I could post some relevant functions in the current code but since your refactoring them this doesn’t seem that helpful.

Anyways, thanks for your time.

5 Likes

Appreciate the detailed feedback, I’ll bear it in mind as I work through the changes. Like custom template filters, this is an area that people like to customize, so I am hoping to come up with something that can be extended.

1 Like

very good, on point suggestions. I would love to see them implemented in Anki.

I believe Anki has too many improvements within functionalities other than … studying process. Scheduling and interval calculations improvements should be a priority unless it’s not a main point for Anki.
We can create such sophisticated flashcards but we can’t improve learning process.
The question is what is the main aim for Anki?
@guillempalausalva, @dae, @AnKingMed, @abdo, @mmdj2 what do you think guys?

1 Like

for myself, I really like to have control over all of them. to be able to customize all of them, try different things in scheduling.
and I think the people who are already using it and know how to use it, will like this too. because it gives them more control.

but on the other side, adding more features without having an Easy Mode will just confuse new users more.

it already has too many features and things that you can change.
which is totally OK for users that know how to use them. but for new users, that want to just use Anki, having even more options is just gonna confuse them. because they don’t understand what each option does.

so, while I want those features for myself, I want some button or option to that disables all options that you normally don’t need to change when you’re just starting anki.

I think in this way, more users can ‘just use’ anki and after they see the magic, they can enable Advanced Mode to have advanced features and be able to customize everything to their liking.

I didn’t want to open a general discussion about all the ideas imaginable that could go into the anki scheduler or about the “main aim” of Anki.

My point was much more narrow: It’s about adding a few internal APIs in the file schedv2.py which regular user won’t see. I only posted because Damien recently announced that he’s dealing with the scheduler anyway so that now it’s cheaper to implement some of them. Admittedly the “non-random mode” change might be useful for e.g. some future “easy mode” but advocating for such a wide ranging GUI overhaul was not my point.

I’m particularly interested in point 2.

I find it very helpful Anki in the first months but when approaching 1 year I tend to forget cards anyway.

Is there any study on how the curve should be adapted to users? It really does not only depends on users alone but on the argument, and other factors, but I would be very happy to see some more options in this field. As an example it could present more choices and as the interval gets longer the default should be placed on a lower interval.

1 Like

I have the same. I have set a maximum interval option to 365 but it is not the best solution.

to add, it would be really nice to have ‘load balancer’ or ‘load balanced scheduler’ built into anki. I almost never use anki ios anymore so I don’t have days with too many reviews compared to other days