Skip to content

Commit

Permalink
only create new fuzz range for specific easy day
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Apr 26, 2024
1 parent 442f31b commit 26b5115
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions schedule/reschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ 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
)
if not self.allow_to_past
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 26b5115

Please sign in to comment.