place a minimum bound on average factor

Since SM2's grading has a bias towards starting high and going down (fail/hard
decrease the interval more than easy increases it), more conservative users
find their average interval reaches the minimum allowable interval and the
times given by hard/good start to converge. In the future, the whole concept
of using the average interval for new cards should be revisited to see if the
data supports it
This commit is contained in:
Damien Elmes 2010-02-01 05:01:23 +09:00
parent 3106ecd80d
commit 9b61d86096

View file

@ -122,6 +122,7 @@ class Deck(object):
factorFour = 1.3
initialFactor = 2.5
minimumAverage = 1.7
maxScheduleTime = 36500
def __init__(self, path=None):
@ -696,6 +697,7 @@ type = 0 and isDue = 1 and combinedDue <= :now""", now=time.time())
self.averageFactor = (self.s.scalar(
"select avg(factor) from cards where type = 1")
or Deck.initialFactor)
self.averageFactor = max(self.averageFactor, Deck.minimumAverage)
# recache css
self.rebuildCSS()