Hi,

This is old code, in the new version this reads as follows:

                if new_grade == 2 or new_grade == 3:
                    if timing in ["ON TIME", "EARLY"]:
                        new_interval = actual_interval * card.easiness
                    else:
                        # Learning late and interval was too long, so don't
                        # increase the interval and use scheduled_interval
                        # again as opposed to the much larger
                        # actual_interval * card.easiness.
                        new_interval = scheduled_interval

Which does the same, but it hopefully a bit more self explanatory.

What we are doing in this code is making certain provisions for when we are either learning a card a card ahead of schedule or too late.

Peter

On 02/19/2013 12:16 AM, Vit wrote:
    Hello Peter.
Would you please explain this code.

Here's the relevant code:

             if new_grade == 2 or new_grade == 3:
                 if *actual_interval* <= scheduled_interval:
new_interval = actual_interval * item.easiness
                 else:
new_interval = scheduled_interval
---------------
  Do you apply this code to both - newer and mature cards?
Thank you.
PS. Your tip on Tag Replacement is soooo helpful !!

--
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to