I love v3 custom scheduling

Since I have a lot of cards that I used to find difficult but now know better (thanks, Anki!), I’ve often found myself wishing that if that card keeps getting marked “Good,” the ease would gradually revert back to 250% rather than stay at the now unwarranted 130%. Traditionally, I’ve try to address this by inspecting the ease and choosing “Easy” or “Good” to manually bring the ease to the level I think is best, but this is cumbersome at best and short-circuits the benefits of Anki’s intelligent scheduling at worst.

Now, with the v3 scheduler, I’ve added the following code to my decks that I thought I’d share in case anyone else finds it useful (or wants to suggest improvements).
image

Basically, this says that if I choose Good, the ease moves by .05 towards 2.5, so cards that I always answer as normal gradually move back to the default ease as shown below.

I’ve been doing this for several weeks and almost never feel the need to manually adjust a card for having a “no-longer accurate” ease.

Note that this currently only works for me on Anki Desktop as described here and here but the link above says that eventually

This will allow advanced users to make adjustments to the standard scheduling behaviour, that apply on all platforms.

Thanks for this great feature!

13 Likes

Excellent!
Would you mind posting the code in text so I can try it out?

if (
  states.good.normal &&
  states.good.normal.review &&
  states.current.normal.review
) {
  let oldEase = states.good.normal.review.easeFactor;
  let diff = 2.5 - oldEase;
  states.good.normal.review.easeFactor +=
    Math.sign(diff) * Math.min(0.05, Math.abs(diff));
}

Edited to fit @mps’s correction below.

7 Likes

I just realized there’s an error in the above code. Please use this instead

if (states.good.normal && states.good.normal.review && states.current.normal.review) {
    let oldEase = states.good.normal.review.easeFactor;
    let diff = 2.5 - oldEase;
    states.good.normal.review.easeFactor += Math.sign(diff) * Math.min(0.05, Math.abs(diff));
}

(The point of the min is to keep the restoring force from overshooting 2.5, so I should never move more than the remaining distance).

On a related note, I was wondering it there was a way to access the starting ease from the scheduler to avoid “hardwiring” the 2.5?

Thanks,
Mike

4 Likes

Only the current/next states are exposed in that interface at the moment.

1 Like

Thanks for this trick!

Say I have my starting ease at 2.0 instead of 2.5, and want to increase the ease by 0.2 when I press “Good”, would this code work:

if (
  states.good.normal &&
  states.good.normal.review &&
  states.current.normal.review
) {
  let oldEase = states.good.normal.review.easeFactor;
  let diff = 2.0 - oldEase;
  states.good.normal.review.easeFactor +=
    Math.sign(diff) * Math.min(0.2, Math.abs(diff));
}

That code moves the ease .2 towards 2. So if the ease is 1.3, it will become 1.5, but if the ease is 3, it will become 2.8. Is that what you want?

2 Likes

Is there a way to check for tag here? I would like to do this for leeches.

Also, I’m a bit confused by the example given in the docs:

// increase ease factor by 0.2 when Easy used on a review
if (states.good.normal?.review) {
  states.easy.normal.review.easeFactor =
    states.good.normal.review.easeFactor + 0.2;
}

Is there a mistake here? First of all, it’s a weird functionality since ease is already increased when pressing easy. Second, aren’t we checking if we are pressing good in the if-clause?

I guess states.xxx is which button we are pressing? But what’s state.current? I couldn’t really wrap my head around the different states just by looking at the code. Some documentation would be nice.

The default behaviour is 0.15, not 0.2.

Custom scheduling has access to the next states of all 4 answer buttons, and can adjust the ones it wishes to. current is the current state of the card, before any answer button is pressed.

1 Like

@mps Is this the latest version?

If you updated, could you post the code again? Thanks

Hi @cjdduarte ,
I have not updated, so it should still be good

Mike

1 Like

@mps
Does it change Interval for you? Try and press Good, see the Interval, undo review, press Easy, compare if Intervals are the same when pressing Good and Easy. It didn’t change Interval for me. If it doesn’t change Interval, what is the point of using it? It is still better to use Easy.

I believe the intervals are based on the current ease, so this code, which adjusts the next ease, doesn’t immediately impact that (of course, pressing Easy will give you a shorter interval than pressing Good, just like it usually does), but it does over time as the new ease gets factored into the intervals created by future reviews.

In my code, pressing 3 nudges the ease back towards 250, so future intervals will gradually grow to reflect your Good understanding when you have established a new pattern. Here’s an example from my studying.

Every “Good” review increases the ease by 5, so now my intervals are growing much faster than without the custom scheduling code, which would leave me eternally with an ease of 130, no matter how many times I press Good even though I no longer needs such frequent reviews, resulting in many unnecessary reviews.

2 Likes

Hi,
How can I add this additional window to my Anku Desktop as well?
image

Install Extended Card Stats During Review

2 Likes

By the way there’s an addon with a rather funny name that does more or less this: Straight Reward - AnkiWeb

2 Likes