mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
replace fi adjustment with factor
This commit is contained in:
parent
745bbe1382
commit
d9348e72dd
2 changed files with 7 additions and 7 deletions
|
@ -68,7 +68,8 @@ defaultConf = {
|
||||||
'ease4': 1.3,
|
'ease4': 1.3,
|
||||||
'fuzz': 0.05,
|
'fuzz': 0.05,
|
||||||
'minSpace': 1,
|
'minSpace': 1,
|
||||||
'fi': [10, 10],
|
# in beta11+
|
||||||
|
'ivlfct': 1
|
||||||
},
|
},
|
||||||
'maxTaken': 60,
|
'maxTaken': 60,
|
||||||
'timer': 0,
|
'timer': 0,
|
||||||
|
|
|
@ -790,14 +790,13 @@ did = ? and queue = 2 and due <= ? limit ?""",
|
||||||
interval = (card.ivl + delay/2) * fct
|
interval = (card.ivl + delay/2) * fct
|
||||||
elif ease == 4:
|
elif ease == 4:
|
||||||
interval = (card.ivl + delay) * fct * conf['ease4']
|
interval = (card.ivl + delay) * fct * conf['ease4']
|
||||||
# apply forgetting index transform
|
# apply interval factor adjustment
|
||||||
interval = self._ivlForFI(conf, interval)
|
interval = self._ivlWithFactor(conf, interval)
|
||||||
# must be at least one day greater than previous interval; two if easy
|
# must be at least one day greater than previous interval; two if easy
|
||||||
return max(card.ivl + (2 if ease==4 else 1), int(interval))
|
return max(card.ivl + (2 if ease==4 else 1), int(interval))
|
||||||
|
|
||||||
def _ivlForFI(self, conf, ivl):
|
def _ivlWithFactor(self, conf, ivl):
|
||||||
new, old = conf['fi']
|
return ivl * conf.get('ivlfct', 1)
|
||||||
return ivl * math.log(1-new/100.0) / math.log(1-old/100.0)
|
|
||||||
|
|
||||||
def _daysLate(self, card):
|
def _daysLate(self, card):
|
||||||
"Number of days later than scheduled."
|
"Number of days later than scheduled."
|
||||||
|
@ -1002,7 +1001,7 @@ did = ?, queue = %s, due = ?, mod = ?, usn = ? where id = ?""" % queue, data)
|
||||||
return dict(
|
return dict(
|
||||||
# original deck
|
# original deck
|
||||||
ease4=oconf['rev']['ease4'],
|
ease4=oconf['rev']['ease4'],
|
||||||
fi=oconf['rev']['fi'],
|
ivlfct=oconf['rev']['ivlfct'],
|
||||||
minSpace=oconf['rev']['minSpace'],
|
minSpace=oconf['rev']['minSpace'],
|
||||||
fuzz=oconf['rev']['fuzz']
|
fuzz=oconf['rev']['fuzz']
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue