-
Notifications
You must be signed in to change notification settings - Fork 0
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
Why are the due cards reversed? #7
Comments
There is a test to make certain the list ends up sorted, so it should be working properly. Obviously there may be a bug in the implementation of Remember (in case it was unclear) that "new" (never reviewed) cards should appear last, since the algorithm wants you to review all due cards first before adding anything new. |
Ok I can understand never reviewed cards appearing least.
|
Got it, no you're not doing anything wrong. So currently there is no specified "tie-breaking" of equivalently-scheduled cards (nor is the sort explicitly stable). This is largely irrelevant for cards that are not New or Learning, since intervals are "fuzzed" to have some randomness and thus equivalently answering two cards will result in slightly different intervals, but it shows up like this for New and Learning cards, since their intervals are fixed (or non-existent) and are not fuzzed. So the default behavior ends up often being inverting the original order of cards with equivalent duration, if the sort ends up being stable (due to the This isn't necessarily "wrong", but it's definitely not ideal, since we would like to have stronger guarantees about the order. It's an easy fix, but it's not clear to me which of the following represents the better fix:
The latter is perhaps preferable for an SRS algorithm? The former of course allows you to implement the latter if you desire that behavior by shuffling the input, though, so is more flexible (if more manual). I am not sure which behavior Anki actually uses, as it is not a specified part of the SRS algorithm. |
So lets say I had If I go though the deck in the order A -> B -> C I should get a new deck in this state right? ( The next time around I get CBAD, couldn't the order of the cards in Learning be determined by next due first? It would seem more intuitive to me. Would this correspond to your fix 1? |
The order is determined by next due first (or at the very least, should be, barring some bug that has snuck in). I think what you may be running into is that due amounts are only calculated in minutes, not seconds, so in your example, A, B, and C are all equally due. Basically, the algorithm sees: A Learning (due in 1 min) and views A, B, and C as equivalently due, even though they were reviewed a few seconds apart. If it is easy, would you mind waiting >60 seconds between reviews of them and see if they then appear in the expected order? (This isn't a "fix", I just want to make certain that this is why it's happening before we address it.) |
I checked, if I wait more than 60 seconds per card the cards then appears in the order I was expecting them too. Is there a reasons due amounts are not computed in seconds? I am doing vocabulary flashcards and most of the time only a few seconds are spent per card. |
Okay, good, so there aren't any bugs, per se, outside of the ordering of equivalently due cards.
I honestly could not tell you, since I wrote it like 4 years ago. I don't remember if I checked the Anki source and that was the way it did it or something else. My guess is just because the intervals themselves are in units of minutes, so that's the units of overdue-ness. I do think that it perhaps is better from an SRS perspective to not try to interpret "due"-ness on such short timescales, but at the same time, even a minute is too short of a timescale for that, probably. Basically, there are two decisions that need to be made to fix this.
The downside to increasing resolution to seconds is that you will see the same cards in the same order the whole time while in the learning stages (before fuzzing kicks in), versus say a random presentation order. Personally, I am leaning towards leaving the resolution at the scale of minutes, but shuffling the presentation order of equally due cards, so if you pass in What do you think of that behavior, or do you have ideas I'm overlooking? |
Shuffling the presentation order sounds good to me then. Thanks a lot for your all you explanations and for writing the library in the the first place! |
Okay, I've implemented that behavior. Pushing a new version is going to have to wait until tomorrow, as I (foolishly) didn't make a clean branch for v3 changes, so I'm going to have to do some cherry-picking to get a non-breaking release out. Please let me know if you encounter any other issues or pain points or have thoughts/wishlist items for #9, which is going to do a rewrite to a higher-lever API that handles more of deck management and such rather than just the base-level SRS algorithms. |
Ok thank you for implementing the change. As for the deck level management features, so far I have been able to make what I needed with the original API. In the app I am making I have a function collecting all due cards from all the decks in the the model, in order to do a general review. What use cases did you had in mind for combining decks? |
This is the sort of stuff that I'd like the package to handle automagically in v3. Basically, allow you to have a collection of decks, get due cards for all of them, study all due cards, or only a subset of the deck, etc. Just so there's less boilerplate to be written for most usecases. (Obviously, the barebones SRS stuff will still be exposed to avoid breaking extant code.) I'd also like to support more "advanced" things like burying and filtering cards, review limits, etc.. |
In
SpacedRepetition.SMTwoAnki
I do not understand why you useList.Extra.reverseMap
at the end ofgetDueCardIndices
andgetDueCardIndicesWithDetails
.By doing this the cards most in need of review are sent to the end of the list right?
Removing it fixed a bug I had, but maybe the problem was on my side.
The text was updated successfully, but these errors were encountered: