Giter Club home page Giter Club logo

thyagoluciano / sm2 Goto Github PK

View Code? Open in Web Editor NEW
182.0 6.0 22.0 106 KB

SM-2 is a simple spaced repetition algorithm. It calculates the number of days to wait before reviewing a piece of information based on how easily the the information was remembered today.

License: GNU General Public License v3.0

Dart 64.23% Kotlin 2.88% Swift 8.51% Objective-C 0.80% HTML 23.58%
dart dart2 flutter package sm2 spaced repetition supermemo supermemo2 algorithm

sm2's Issues

How to use this algorithm?

Hi, your code looks interessant but i can’t figure out how to use it. I can see that it’s written in Dart but i don’t really know this langage.
Can you pls provide some guidance on how to run this github repo?

Thanks

New Ease Factor only calculated when q >=3

sm2/lib/sm.dart

Lines 25 to 26 in 5a7081f

easeFactor = previousEaseFactor +
(0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02));

I think the SM-2 algorithm is not implemented correctly here because EF is not calculated on every review. When a q below 3 is given, the EF is not calculated. This means that when q is between 0-2 it has no effect on the EF what so ever, which is not how the algorithm is intended to work.

The algorithm is intended to lower the EF when the user keeps answering incorrectly (q 0-2). In the current code base, the Ease Factor can never go below 2.5 which is the default value.

PreviousInterval shoud be an integer not double

According to the readme, previousInterval should be an integer, not double.

double previousInterval,

And there is also a bug in example:

    SmResponse smResponse = sm.calc(
      quality: 0,
      repetitions: 0,
      previousInterval: 2.5,
      previousEaseFactor: 0
    );

default value for previousInterval should be zero, and previousEaseFactor should be 2.5 not zero.

Dart pub

Hello, you wrote a great package, and as I understand it, this is your package pub.dev/packages/sm2
Can you set the correct links in pub.dev? Because at the moment the buttons “Repository (GitHub)” and “View/report problems” refer to github.com/thyagoluciano/flutter_radio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.