[23.10 Desktop] Add a feature to automatically periodically re-optimize FSRS parameters

Yes, but I think we have 3 options:

  1. Keep SM-2 as the default forever
  2. Make FSRS the default now (or very soon) and add automatic optimization when time permits (say, 1 year later)
  3. Keep SM-2 as the default until dae gets the time to implement automatic optimization (say, for 1 year)

In my opinion, option 2 is better.

3 Likes

Expertium wants to hold one hostage because the other isn’t done.

Is there any update about automatic optimisation since then? :thinking:

Nope, it’s not coming any time soon

Would you look at that, another user who wants automatic optimization

Maybe I should start collecting screenshots of users who ask for automatic optimization and then show them all to Dae.

As I mentioned right at the top of the thread, a major concern here is the potential for conflicts that automatic changes to cards could cause, which can’t really be solved without major changes to the sync protocol. We could approximate such a feature with a pop-up confirmation dialog and some automatic syncs, but ensuring that all works correctly through the various startup flows like auto-sync, importing, etc on each of the clients is a fair amount of work which nobody has had time for yet.

I know this is a feature you’re keen on, but posts like the above are not really helpful. I’m well aware of the demand, but demand does not solve the technical issues, and your snide comments aren’t exactly motivating.

12 Likes

I also haven’t optimized FSRS yet because I didn’t know this was an option.

If anybody ever asks “Why do we need automatic optimization?” - here’s why

1 Like

This still doesn’t solve the technical difficulties dae was writing about ([23.10 Desktop] Add a feature to automatically periodically re-optimize FSRS parameters - #87 by dae).

Maybe the neccessary steps can be broken down, so that small, simple PRs can be created. This would still require contributers with the neccessary knowledge and time though.

1 Like

Well, there is this issue: Automatically optimize when FSRS first enabled? ¡ Issue #3697 ¡ ankitects/anki ¡ GitHub

But nobody commented there since it’s creation in January

I understand your point. I think an additional reason (the the ones dae mentioned above) that nobody commented in this issue is the following sentence:

This would only help new users - once #3616 is introduced, it would become somewhat less useful, as new users would have FSRS enabled at first start.

Basically: Why work on something that won’t be relevant in the close future?

Also: More atomic TODOs might help to get this feature going and to gain some contributers that might want to work on this. As an example, flow charts are sometimes used to make the neccessary steps very obvious, while having small, actionable steps a contributer / dev could take.

I think the best case scenario would be to have automatic optimization of FSRS parameters done once the Anki app is opened. So, it would automatically update based on the previous day’s settings. Then, since it wouldn’t be continuously re-optimizing during the study session itself, it wouldn’t use up memory / resources, or provide delay to answering questions.
So, it would essentially be similar to the user manually clicking on “Optimize All Presets” each morning basically, but would not involve rescheduling the cards.

The problem is ensuring there are no sync conflicts between different devices. That’s what is holding progress on this issue.

I see.
Wouldn’t that be the case regardless, if I manually click on “Optimize All Presets”?
I’m not a coder, so I don’t have in-depth knowledge of the issue of course. However, I’m not sure what the difference in effects regarding sync conflicts would be if I manually click on “Optimize All Presets” vs. if the program automatically “clicks” on that button. My intuition is the result is ultimately the same. Perhaps, it there are some form of sync conflicts, an intermediate / temporary solution, for now, may just be having the program effectively automatically click on “Optimize All Presets” and then for now just dealing with the conflicts. Although, I think if, using the solution I proposed above, if the automatic optimization is done whenever the Anki App is opened, that may theoretically solve the issue. So, for example, say I open it on device 1, and it auto-optimizes. I answer a few dozen questions. Then, on the same day (or some other day), I open Anki on device 2, it would just auto-optimize based on all the new data as well. So, theoretically, that may solve the issue, because the auto-optimization would be based on the opening of the app, and therefore would auto-update to the most recent parameters given all of the cards’ review data (I think this is how it currently does it whenever we manually click on “Optimize All Parameters”.
Intuitively (again I’m not a coder), I think this should effectively bypass the issue, because each device would automatically be updated to the most up-to-date parameters upon Anki opening.
Just my thoughts. But, maybe someone with more knowledge could mull this over, and if this isn’t the exact solution, perhaps it could inspire something similar that might fix the issue with a relatively simple solution / not too much work needed for the developers on this issue

One additional thought, since it’s also related to the syncing issue, if I’m using say Deck A on a device 1, and then want to transfer to device 2, I’ll click on sync first on device 1 and then on device 2. If not, then I’m just repeating the same cards for no reason on device 2 (but then, that’s just my own fault to be fair). And so, another potential way of doing this is to also have it auto-click the “Optimize All Presets” upon clicking “Sync”, so it would do both tasks as well. Although, I think that having it just done on app-opening might be more consistent overall, since it takes the entire day into consideration. However, the additional optimization along with the sync, may not hurt as well.
I don’t know, just throwing out some ideas here

I don’t know the details myself, ask @dae, though he may be a bit tired of explaining this issue :sweat_smile:

1 Like

I think this is likely minimized by auto-optimizing at the opening of Anki each day and on each time they manually click the general “Sync” button, so worst that can happen would be the optimization for that particular day is temporarily “lost” up until they realize they forgot to click on the “Sync” button before moving to the second device. I think that should largely bypass the issue, if auto-optimizing presents is done on opening Anki App and on click “Sync”. So, for example, upon closing the Anki App, it also automatically syncs, so would also auto-optimize.
Also, my understanding is when using a mobile device for example, it will ask if you would like to use the device’s current “knowledge” to override other syncing, or if you would like to sync to override the device, prior to initiating the syncing.
If we want to be really stringent about it, I’m sure most people have one default device that they generally most use for Anki, or default to I mean. And so, the other potential option is to have a way to select a default device, and then on all other devices, it would first prompt before automatically syncing, which would prompt the user to first sync on their default device if they have not already done so. So, the effect of this is, it would sync at the end of the study session on Device 1, say at 15:00. Then, would sync that onto Device 2. Then at the end of the study session of device 2, say at 17:00, let’s say the user would go back to Device 1, but forgot to sync on Device 2, at the end of their session. Device 1 would attempt to sync, but sync the parameters are already updated, no change would be made. User would realize they forgot to sync on Device 2, and would do so such that they can continue where they left off using Device 1. This would optimize based on current studying on Device 2. Then, Device 1 would copy that essentially, since it would first sync the cards completed, then auto-optimize based on that.

So, theoretically, it would just require the following:
Upon completing the normal sync that occurs (which happens: (i) whenever the app is opened or closed) or (ii) whenever “Sync” is manually clicked by the user in order to switch to another device), then “Optimize All Parameters” button would be effectively automatically clicked by the Anki program.

Theoretically, to my intuition at least, that should bypass the problem of any sync conflicts.
Although, feel free to mull it over as well, and hopefully another solution may pop up, if this doesn’t solve it. I think, however, if it doesn’t, it’s likely a simple enough bypass to the issue that would get at least 99% of the way there, since it’s done relatively periodically. It also wouldn’t take up undue resources during study times as well, since it’s only done whenever the program does those specific syncs (upon opening and closing the Anki program, and upon manually clicking the “Sync” button)

Dear colleagues!

Maybe let’s forget about the issue of sync with other apps and just add this as optional, by default disabled feature in the Anki preferences? Who wants to enable it - will enable.

Sonner or later I think this will be implemented anyway so this is not waste of time :wink:

1 Like

This may be a very underrated solution, considering Anki also allows manual changing of all of the FSRS parameter numbers as well. It could have a simple text warning next to it such as:
“Automatic FSRS calibration: Please ensure last device used is synced at end of studying session”

The main difference is that if you manually click that button, without having synced changes you made on another device, then you caused the sync conflict yourself. If the app clicks it for you, then any resulting sync conflict is Anki’s fault.

In your proposals, you seem to be assuming that the problem is that this device hasn’t been synced. Often the problem is that something happened on another device that hasn’t yet been synced – and that can’t be solved from this device. You also seem to be ignoring the additional sync-load that would come from re-optimizing daily/every sync. That’s an actual delay that is visible to users, and would have a significant impact on the AnkiWeb servers, and users with limited/throttled/slow internet.

Not every user has perfect sync habits – even users with auto-sync on open/close available to them (i.e. on desktop and AnkiDroid). Making some change to certain notes/cards/scheduling on one device when you’re out of sync is usually not the end of the world. But FSRS optimization updates the state of every active card in your collection, which means you should expect sync conflicts would become more noticeable and more harmful.

Anyone who has proposals for how to crack this nut needs to start by accepting that sync conflicts are common and can be incredibly disruptive to learning. They are certainly a more significant issue than the unfortunate hurdle of needing to manually optimize your parameters every once in a while.

And then when thousands of users enable it (after Expertium or AnKing casually mentions that it exists …) – are you offering to provide support to help them deal with the fallout? Don’t forget that there’s no real solution to the sync-conflict issue, and sync conflicts can happen to anyone, even the most sensible of users.

3 Likes

You changed my mind :slight_smile: Let’s add red warning that if feature is enabled then “no help is provided from Anki community - it can destroy your life!”. After that - let’s implement :slight_smile: