summaryrefslogtreecommitdiff
path: root/gnosis-algorithm.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-17 03:19:11 +0200
committerThanos Apollo <[email protected]>2024-01-17 03:21:35 +0200
commite84e10e71db5722cb742056b80e64b054bf4bfcc (patch)
treef59bbe591f37e2a242eddd32bf186cf152873283 /gnosis-algorithm.el
parent3d2fd9cf51f0a88afb524e1f67fce2c91f9f9854 (diff)
gnosis-algorithm-next-interval: Adjust for failure-factor
- Make sure it's not above 0.8, unless user is using failure factor > 8
Diffstat (limited to 'gnosis-algorithm.el')
-rw-r--r--gnosis-algorithm.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el
index 1756e8e..596bc7c 100644
--- a/gnosis-algorithm.el
+++ b/gnosis-algorithm.el
@@ -152,8 +152,10 @@ Returns a list of: (INTERVAL N EF) where,
(> fails-c 3))
;; When fails-c is above 3, use 150% or 180% of
;; failure-factor depending on the value of total failed
- ;; reviews
- (* (* failure-factor (if (>= fails-t 10) 1.8 1.5)) last-interval))
+ ;; reviews. It should not be above 0.8
+ (* (max (min 0.8 (* failure-factor (if (>= fails-t 10) 1.8 1.5)))
+ failure-factor)
+ last-interval))
;; For custom review sessions.
;; When successful-reviews-c is above 0, multiply its value
;; with ef