[Feature Request] Set Anki custom scheduling per deck/option

Recently, I implemented an Anki custom scheduling and released it on GitHub. Some users found that the parameters of the scheduler, which are generated by the optimizer from the decks’ review logs, varied in different decks. It may be due to the difference in difficulty on each deck.

The current Anki custom scheduling affects the entire collection. Could it be set per deck/option? It is reasonable to use different parameters of the scheduler for different decks. By the way, the advanced parameters of Anki’s built-in scheduler can be set per option. So I believe it is possible to be implemented on the custom scheduling, too.

3 Likes

It’s only possible to provide a single block of code, but you can make it behave differently depending on the deck using a bit of a hack: if you add <div id=deck>{{Deck}}</div> to the card template, your custom scheduling code can extract the deck name from the DOM, and vary its behaviour as necessary.

4 Likes

I think it’s a bit counterintuitive that custom scheduling is set in the deck options. When I first used it, I also expected it to only affect the current deck.

Maybe the scheduling tab in the Preferences screen is a more fitting location - if there are no plans to support per-deck scripts in the future.

5 Likes

True, but the tooltip does document this, and having it on that screen means that when people complain of scheduling issues and include a screenshot of their deck options, it’s obvious when they’re not using the default behaviour.

Is it a viable workaround to put each deck into a designated profile? I’ve noticed that enabling the v3 scheduler for one profile doesn’t affect other profiles. Accordingly, you can also have different custom scheduling code in different profiles.

One disadvantage of this is that the browser only searches within one profil.

That was exactly what I did. I have dedicated profile for each deck, but still, the “custom scheduling” is being shared between all the profiles.

To make sure I understand you right: Anki has different code in each profile, but only applies the code from one profile to reviews, no matter in which profile you are reviewing?

To be more specific, whatever javascript code you put in the “Custom scheduling” box in any profile, the same code will appear in all the profiles. You can actually quickly try it yourself:

  1. Type “hello” in the “Custom scheduling” box in any profile
  2. Observe “hello” showing up in the “Custom scheduling” boxes of all the profiles.

Hope this clarifies the confusion.

1 Like

The setting is not shared across profiles, but I don’t recommend using more than one: Synchronizing multiple profiles - Frequently Asked Questions

1 Like

That was exactly what I did. I have dedicated profile for each deck, but still, the “custom scheduling” is being shared between all the profiles.

I apologize for my errors in the quoted reply I made a few days ago. So wherever I said “profile”, what I really meant was “preset”. I was confused between these two terminologies.

To be more specific, whatever javascript code you put in the “Custom scheduling” box in any profile, the same code will appear in all the profiles. You can actually quickly try it yourself:

Type “hello” in the “Custom scheduling” box in any profile
Observe “hello” showing up in the “Custom scheduling” boxes of all the profiles.

Hope this clarifies the confusion.

I apologize @jambamboleo for my errors in the quoted reply I made a few days ago. So wherever I said “profile”, what I really meant was “preset”. I was confused between these two terminologies.

2 Likes

I also was surprised recently when I realized that, although custom scheduling is set in the option group, it affects all option groups. It entirely changed my plans of using the custom scheduling (FSRS). @dae, I think at least there should be an indication in the Deck Options screen that the custom scheduling affects all deck option groups (like, instead of “Custom Scheduling”, saying “Custom Scheduling (apply to all Deck Option groups)”, otherwise the user will hardly realize that.

1 Like

The built-in docs do mention this, but I’ve added a mention of it to the FAQ as well. The JS code can detect which deck is active; I believe FSRS already supports per-deck customizing.

1 Like
4 Likes

This is bringing me to a GitHub but I don’t know how to access the file