brownbat / autoEaseFactor

Adjust ease factors in Anki based off of performance in order to hit a target success rate.
GNU General Public License v3.0
37 stars 8 forks source link

Ease factors always change when pressing adjust ease factors to performance #23

Closed xd-Neji closed 3 years ago

xd-Neji commented 3 years ago

Every time I review a card, the ease factor changes as expected. However after the ease factor changes and I click adjust ease factor, the the ease factor goes up or down again e.g. one of my cards had an ease factor of 280% before reviewing then after answering correctly it was 290% then clicked adjust ease factor to performance and it shot up to 330%. Is this normal, why do I have to select adjust ease factor every time to get the correct ease.

image

brownbat commented 3 years ago

Is this normal, why do I have to select adjust ease factor every time to get the correct ease.

That's not normal... "adjust ease factors to performance" should happen automatically as you review. So immediately after reviewing, there should be no need to do it again.

The only reason that menu option should be there is if someone reviews a lot on mobile, and wants to resynch their ease levels.

Meaning... it shouldn't change anything if you'd just reviewed on desktop.

Will definitely dig into this.

Could you send me your settings? Mostly curious if you have the new option, "reviews_only" set to true or false.

Thanks for reporting, sorry for the unexpected behavior.

xd-Neji commented 3 years ago

{ "leash": 100, "max_ease": 5000, "min_ease": 1000, "moving_average_weight": 0.2, "reviews_only": false, "stats_duration": 5000, "stats_enabled": true, "target_ratio": 0.85, "two_button_mode": true } these are my settings for the addon I only use anki on desktop.

tommy412 commented 3 years ago

Hello,

I was interested in this as well so I tried to replicate this.

A card was in relearn phase, with ease of 175%. After I pressed good, it jumped to 215%.

I then pressed adjust ease factor to performance. I rechecked the card in browser immediately and the ease factor became 217%.

Not sure if it's the same phenomenon as detailed above.

Before adjust ease factor to performance:  Pasted Graphic 2

after adjust ease factor to performance:

Pasted Graphic 4

xd-Neji commented 3 years ago

Yes that's exactly what happens to every single card I review and pressing adjust ease factor to performance sometimes lowers the ease and sometimes increases the ease. I disabled all of my addons and only had Auto ease factor enabled and the same thing still happened.

brownbat commented 3 years ago

Ok, thanks, this gave me some key hints.

A few distinct things contribute here.

1) Adjust to performance is looking at recent historical ease factors to generate an average, and it's adjusting the ease up or down from that average.

When you review on desktop, you add a brand new ease factor. That brand new ease factor wasn't considered as part of the average when it was calculated, but it is there to affect the calculation between review sessions.

This will tend to exaggerate the direction of the change in ease factor.

I think the best fix will be to have the deck options ignore the most recent ease factor. There are some corner cases that could get me into trouble though, like if there's only one review in the system, so I'll want to test this thoroughly before deploying it.

2) After learning steps are completed, Anki resets your ease factor to your deck's starting ease. This is more complicated, but more rare, and has a more limited impact.

So say you're in learning, and you fail 99 times in a row... this add on is changing the ease all over the place. But it doesn't affect scheduling, because in learning and relearning your scheduling is fixed by your settings. Once you graduate, all that ease factor history is ignored, and your "starting" ease from settings is applied.

Now if you run "adjust to performance," it will change that ease factor away from starting, probably dramatically.

But your next interval after learning is fixed anyway, so this doesn't all that much for the user. (It will affect your future ease factors slightly, but less and less with each review.)

3) I haven't confirmed, but it's possible the deck settings are using a different "leash" than your last review.

If you're starting your third rep on a card, it might use 2 leash to calculate how much to let the ease factor change, because you've only completed* 2 reps. But between sessions you've completed 3 reps, so the lease has a little extra freedom.

I think I can make this more consistent too, but again, will want to test it pretty thoroughly.

Sorry if some of this doesn't make sense or isn't helpful, I'm writing it a bit as a scratchpad before I turn in. Will look to tackle this this weekend, work permitting.

If it's any reassurance, these ease factor changes will converge after a few reviews. It is probably giving the wrong calculation for 1-2 reps, but the algorithm is self-correcting, so it will get back on track if you bear with it.

Even so, I'll look to make this behavior more consistent as soon as I can.

Thanks for pointing this out and the detailed info to help track it down!

brownbat commented 3 years ago

Ok, (1) is fixed in the latest update. After investigating, (3) wasn't an issue after all.

(2) is the hard one. Deck settings will still overwrite ease factors if a card is transitioning from learning to reviews. It shouldn't actually affect scheduling though, and determining how long ago a card transitioned states is a little tricky, so I'm going to set that aside for now.

Cards in that state will have slightly different factor averages, so their next ease factor will be somewhat different, but these will converge pretty quickly, it really shouldn't affect learning in the long run, especially now that the core part of this bug is fixed. (I'll still keep that in the back of my mind and keep an eye out for workarounds, just so everything can be as consistent as possible.)

Thanks for the help with this one!