lo-tp / sm2-plus

A Javascript Implementation of an Improved Version of Spaced Repetition Algorithm.
https://www.npmjs.com/package/sm2-plus
MIT License
54 stars 11 forks source link

How to do reviews #5

Open mjmeintjes opened 6 years ago

mjmeintjes commented 6 years ago

Thanks for this library.

I'm using it in a personal project to schedule reviews of info I want to remember.

I would love some information on how you use this to schedule reviews. Looking at the algorithm, it looks like the max interval between reviews is 5, and the max percent overdue is 2.

This means that items are coming up very frequently, more frequently than I would have thought.

As a comparison, Anki sometimes schedules cards months forward.

What I'm thinking about doing is also just ordering items by difficulty, so that the easier ones are way down in the queue and don't come up as often.

I was just wondering how you used this.

lo-tp commented 6 years ago

I think the solution to your high frequency problem may be doing some adjustment to the parameters of the algorithm.

mjmeintjes commented 6 years ago

Thanks. Do you have any suggestions for what parameters you use?

PMK89 commented 6 years ago

I got the same issue as mjmeintjes. Is it possible to achieve a similar spacing as Anki by changing the parameters?

lo-tp commented 6 years ago

Actually, it's nearly impossible to achieve an anki like spacing with sm2-plus. Both sm2-plus and the original sm2 algorithm have their own drawbacks. I think we need something new.

PMK89 commented 6 years ago

I read the sm2 algorithm is what Anki uses, that's why I used that implementation. I made a simple change to prolong the interval

For now I replaced the line: 1 + Math.round((difficultyWeight - 1) * percentOverDue);

by this, hoping to extend the previous interval weighted by 1 - difficulty cubed:

Math.ceil(Math.pow((1 - difficulty), 3) * word.interval) + Math.round((difficultyWeight - 1) * percentOverDue);

Because it's cubed only really low difficulties will prolong the interval. In the long run, I am going to try to implement the original Anki algorithm.

skenan commented 6 years ago

Hi @PMK89 , I wan to use your improvement, wonder how is the performance? Does it achieve your goal?

PMK89 commented 6 years ago

Hi @skenan it definitively prolongs the interval for elements with low difficulty. Cause it adds to the old interval it will be prolonging with every repetition as long the difficulty stays low aka is remembered well. But the SuperMemory algorithms are psychologically tested and optimized for learning performance, so it would be better to implement one of them exactly.