Skip to content

Commit

Permalink
Feat/new fuzz range for overdue card
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Apr 26, 2024
1 parent 4ce1ff9 commit 442f31b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions schedule/reschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def apply_fuzz(self, ivl):
else:
return int(self.fuzz_factor * (max_ivl - min_ivl + 1) + min_ivl)
else:
last_review = get_last_review_date(self.card)
due = self.card.odue if self.card.odid else self.card.due
if due > last_review + max_ivl + 2:
current_ivl = due - last_review
min_ivl, max_ivl = get_fuzz_range(
current_ivl, self.elapsed_days, current_ivl
)
min_num_cards = math.inf
best_ivl = (max_ivl + min_ivl) // 2 if self.allow_to_past else max_ivl
step = (max_ivl - min_ivl) // 100 + 1
Expand Down

0 comments on commit 442f31b

Please sign in to comment.