I work on a project where Spaced Repetition is essential, however I am not a specialist on the subject and I am afraid to reinvent the square wheel. My research pointed me two different systems, namely the Leitner system and the SM family of algorithms.

I haven't decided yet which system would best fit into my project. If I was to take a SM orientation, I guess I would try to implement something similar to what Anki uses.

My best option would be to use an existing Java library. It could be quite simple, all I need is to compute the time for the next repetition.

Has anyone heard of such an initiative ?

解决方案

I haven't looked at Anki's implementation but have you seen this one? quiz-me an SRS in Java.

Basically it goes like this

public static void calcuateInterval(Card card) {

if (card.getEFactor() < 3) {

card.setCount(1);

}

int count = card.getCount();

int interval = 1;

if (count == 2) {

interval = 6;

} else if (count > 2) {

interval = Math.round(card.getInterval() * card.getEFactor());

}

card.setInterval(interval);

}

If you really want Anki's algorithm, look through the source of Anki in Android available in Github. It is GPL though so you might need to buy a license.

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐