summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-03 17:10:23 +0200
committerThanos Apollo <[email protected]>2024-01-04 04:26:01 +0200
commit439e83a689224ec24325a93a2602107b268725c2 (patch)
tree81582d717a650905d9841548dc2cc692951ac341
parent5eec5c982482a3df5f6820dacf7301ca7feae02b (diff)
gnosis-algorithm: Ignore initial interval if ef > 3.0
- Ignore gnosis-algorithm-interval values if ef > 3.0 - Add warnings not to set gnosis-algorithm-ef > 2.5
-rw-r--r--gnosis-algorithm.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el
index fee5624..ab94559 100644
--- a/gnosis-algorithm.el
+++ b/gnosis-algorithm.el
@@ -46,7 +46,10 @@ Second item: Second interval."
First item : Increase factor
Second item: Decrease factor
-Third item : Starting ef"
+Third item : Starting ef
+
+WARNING! Starting ef should not be above 2.5, it's recommended to keep
+it below 2.0"
:group 'gnosis
:type 'list)
@@ -109,20 +112,24 @@ Returns a tuple: (INTERVAL N EF) where,
;; Calculate the next easiness factor.
(let* ((next-ef (gnosis-algorithm-e-factor ef success))
;; Calculate the next interval.
+ ;; ef should not be > 3.0 unless the card is imported/edited,
+ ;; thus ignore initial intervals
(interval
(cond
;; First successful review -> first interval
((and (= successful-reviews 0)
- (= success 1))
+ (= success 1)
+ (< ef 3.0))
(car gnosis-algorithm-interval))
;; Second successful review -> second interval
((and (= successful-reviews 1)
- (= success 1))
+ (= success 1)
+ (< ef 3.0))
(cadr gnosis-algorithm-interval))
;; TESTING
- ((and (= last-interval 0)
- (= success 1))
- (* ef 1))
+ ;; ((and (= last-interval 0)
+ ;; (= success 1))
+ ;; (* ef 1))
(t (if (= success 1)
(* ef last-interval)
(* ff last-interval))))))