Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in SM-2 algorithm? #1

Open
suragch opened this issue Mar 1, 2018 · 2 comments
Open

Bug in SM-2 algorithm? #1

suragch opened this issue Mar 1, 2018 · 2 comments

Comments

@suragch
Copy link

suragch commented Mar 1, 2018

Should it be >= rather than ==. (Otherwise self.repetitions == 0 is not handled.)

if self.repetitions == 1: self.interval = 1

https://github.com/theq629/fulgurate/blob/master/cards.py#L34

@15921483570
Copy link

Should it be >= rather than ==. (Otherwise self.repetitions == 0 is not handled.)

if self.repetitions == 1: self.interval = 1

https://github.com/theq629/fulgurate/blob/master/cards.py#L34

@suragch
according to Dr. Piotr Wozniak's article

After each repetition session of a given day repeat again all items that scored below four in the quality assessment. Continue the repetitions until all of these items score at least four.

case self.repetitions == 0 is handled as new card, at line 23. and then, it should be included in new_cards at line 81. if you see line 105-107, you could know the app break only when there's nothing new and nothing to review.

so it is indeed handled.

@theq629
Copy link
Owner

theq629 commented Dec 31, 2022

I am trying to get back to maintaining this. I agree with @15921483570 , the algorithm as documented should not change the interval if the repetitions are at zero, and it doesn't matter because of the way the cards are run. However,
strictly the code should not be changing the interval at all in this case, so line 36 should be elif self.repetitions > 2.

Given that the package separates the core card update code from run_cards() it's also possible that it should have an option to reset the interval in this case, but on the other hand the calling code could do that if its relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants