Add-on - Anki Leaderboard - bug report - xp formula

In add-on “Anki Leaderboard”, there is “XP formula” for ranking players. When calculating “XP formula” in Excel using official formula from official website, I get different results from these which are calculated automatically in official Leaderboard.

First problem might be in using 100 instead of 100% in “days studied percentage” part. Although, even if adjusting by 108.6704 to match exactly the first player it doesn’t match other players. For some players this adjustment increases their XP and for some it decreases.

Excel calculations (check xp vs xp_calculated):
image

Leaderboard

XP formula from official website:
image

Add-on code: 175794613
Add-on name: :trophy:Anki Leaderboard - Compete with friends to boost motivation (Fork by Shige)
XP formula source: shigeyukey github io/shige-addons-wiki/anki-leaderboard html
Excel link: docs google com/spreadsheets/d/1upFcqquP0V_xNMyTqN2Efo73jKzy-DG6/edit?usp=sharing&ouid=103888143921972963182&rtpof=true&sd=true

Edit: formatting, typos

1 Like

The best place to report a bug with an add-on is directly to the developer by whatever communication channel they have requested that bugs be reported. See the add-on page, Contact Author – https://ankiweb.net/shared/info/175794613 .

2 Likes

They use formulas for different purposes.
One depends on the FSRS algorithm and the other does not.
If it is really practical, the formula to calculate total retention would be something like
Total retention = (total revision - total errors) / total revision) * 100

3 Likes

Hello thanks for reporting the problem.
The cause of this problem is that the XP formula is partially omitted.

days studied percentage :
As you said this is calculated at 100.

Retention :
Retention is bonus is added, so it will be a little larger than the actual value.
(e.g. 70% → 85%, 40% → 55% )

Retention Bonus:
85%-100% -> 100%
70%-84%  -> 85%
55%-69%  -> 70%
40%-54%  -> 55%
25%-39%  -> 40%
10%-24%  -> 25%
 0%-9%   -> 0%

If you want to do the calculations in Excel, try this. (Use 100 for Retention, not 100%. It will be % after calculation.)

=IF(F8 >= 85, 1, IF(F8 >= 70, 0.85, IF(F8 >= 55, 0.70, IF(F8 >= 40, 0.55, IF(F8 >= 25, 0.40, IF(F8 >= 10, 0.25, 0))))))
2 Likes

Thank you for clarification and fast response. I have tried your formula, and now its working.

I am just curious, what is the reason for using the bonus instead of real retention? Some players (like myself) are getting bigger bonus then others, that might be a bit unfair.

1 Like

The reason for this is that retention is calculated by ranges.
Basically the retention rate recommended by Anki is 80-90%, and dedicated learners may aim for 90-95% or so. It is possible to aim for 95%-100%, but this is not efficient because the learning workload increases significantly, like this:

This means that Anki retention rates are not recommended to be perfect or as high as possible, and possibly slightly lower is more efficient for learning.

So I think 85% would be a reasonable range to be in the same range as 100%, 85% users do not need to go higher, and 95%+ users can lower the retention rate to make learning more efficient and not affect XP. (If the retention rate is changed to the same value as it is, users may make learning inefficient by making the retention rate as high as possible.)

1 Like

Thanks for reply, I believe that now I understand it. So in case of 85-100%, it’s designed this way to not encourage people to overlearning since beyond certain point that would be inefficient, that makes sense.

Although as eroscard suggested, Leaderboard is calculating Again rate not True Retention. According to his formula that’s in my case 33.3% while Total True Retention according to FSRS helper is 65.2%. The latter, I believe corresponds to the Desired retention graph and the Again rate not. If my chain of suggestions and thoughts is right, in that case I would recommend renaming retention in Leaderboards and addons-wiki to Again rate.

Edit: formatting

1 Like

Hmmm? I didn’t know about this. “True Retention” is a feature that has existed for at least 5 years before FSRS was released, so I think it works independently of “Desired retention” which is a feature of FSRS.
If the FSRS Helper True Retention are different they may have developed a new and different True Retention. I think the term “Again rate” is also only used in FSRS (maybe). In any case I think a calculation method compatible with FSRS and SM2 would be ideal.

1 Like

Thank you for your response and explanation, I am not pro in this all :sweat_smile:. I did some research and I take back my renaming suggestion, I thought these terms in FSRS helper are the widely established ones but it seems that it isn’t the case, thus my assumption was flawed.

1 Like

I added the XP calculation to the Wiki FAQ.
Stats like retention are not well documented, so I’m not sure exactly how to calculate them (I think need to read the code directly), I will look into it next time.

1 Like