From bc19cca217e4cc8693fd408c4d2425b32cf216fc Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 22 Jul 2024 09:33:55 +0300 Subject: gnosis-algorithm: Add interval threshold & unlimit init-interval. * Adding threshold value that will be used to reset interval to 0 when c-fails reaches threshold. * Inital interval now can be more than 2 items, allowing for further customization of gnosis algorithm. --- gnosis-algorithm.el | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 33e3232..787d7ec 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -169,17 +169,27 @@ by DECREASE." (gnosis-algorithm-round-items new-ef))) (cl-defun gnosis-algorithm-next-interval (&key last-interval ef success successful-reviews - failure-factor initial-interval) + failure-factor initial-interval c-fails + threshold) "Calculate next interval. -LAST-INTERVAL: number of days since last review +LAST-INTERVAL: Number of days since last review + +C-FAILS: Total consecutive failed reviews. + EF: Easiness factor -SUCCESS: t if review was successful, nil otherwise -SUCCESSFUL-REVIEWS: number of successful reviews -FAILURE-FACTOR: factor to multiply last interval by if review was unsuccessful -INITIAL-INTERVAL: list of initial intervals for initial successful + +SUCCESS: non-nil when review was successful. + +SUCCESSFUL-REVIEWS: Number of successful reviews. + +FAILURE-FACTOR: Factor to multiply last interval by if review was unsuccessful. + +INITIAL-INTERVAL: List of initial intervals for initial successful reviews. Will be used to determine the next interval for the first 2 -successful reviews." +successful reviews. Until successfully completing INITIAL-INTERVAL reviews, for every failed attempt next interval will be set to 0. + +THRESHOLD: Upon having C-FAILS >= threshold, set next interval to 0." (cl-assert (< gnosis-algorithm-ff 1) "Value of `gnosis-algorithm-ff' must be lower than 1") ;; This should only occur in testing env or when the user has made breaking changes. (let* ((last-interval (if (<= last-interval 0) 1 last-interval)) ;; If last-interval is 0, use 1 instead. @@ -189,7 +199,11 @@ successful reviews." (cadr initial-interval)) ;; If it's still on initial stage, review the ;; same day - ((and (< successful-reviews 2) (not success)) 0) + ((and (or (< successful-reviews (length initial-interval)) + ;; reset threshold + (and threshold (>= c-fails threshold))) + (not success)) + 0) (t (let* ((success-interval (* ef last-interval)) (failure-interval (* last-interval failure-factor))) (if success success-interval -- cgit v1.2.3 From 9f0ead7515786ef259e610e49bfc384ad5c02c94 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:14:03 +0300 Subject: [Refactor] algorithm: Add proto values. * Remove old concept of intervals and add proto values. --- gnosis-algorithm.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 787d7ec..b81cc05 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -50,11 +50,11 @@ (require 'cl-lib) (require 'calendar) -(defcustom gnosis-algorithm-interval '(1 3) - "Gnosis initial interval for initial successful reviews. +(defcustom gnosis-algorithm-proto '(0 1 2) + "Gnosis proto interval for the first successful reviews. -First item: First interval, -Second item: Second interval." +Values for the first proto successful intervals. There is no +restriction for length." :group 'gnosis :type '(list integer)) -- cgit v1.2.3 From b8ac16c9c4d208c990a1bf1e8ce76199811253cc Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:15:26 +0300 Subject: [Refactor] algorithm: Add gnosis score value. * Reconceptualize the concept of ef as gnosis score. --- gnosis-algorithm.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index b81cc05..4ad8df7 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -58,12 +58,12 @@ restriction for length." :group 'gnosis :type '(list integer)) -(defcustom gnosis-algorithm-ef '(0.35 0.30 1.3) - "Gnosis easiness factor. +(defcustom gnosis-algorithm-gnosis-value '(0.35 0.30 1.3) + "Starting gnosis score. -First item : Increase value -Second item: Decrease value -Third item : Total ef" +First item : Increase value (gnosis-plus) +Second item: Decrease value (gnosis-minus) +Third item : Total gnosis (gnosis-synolon/totalis) -> Total gnosis score" :group 'gnosis :type '(list float)) -- cgit v1.2.3 From 286dd68980f85f996d40c44503a2d24b530ec121 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:15:58 +0300 Subject: [Refactor] algorithm: Add amnesia value. * Replace old concept of ff with amnesia value. --- gnosis-algorithm.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 4ad8df7..2fdbc00 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -67,12 +67,12 @@ Third item : Total gnosis (gnosis-synolon/totalis) -> Total gnosis score" :group 'gnosis :type '(list float)) -(defcustom gnosis-algorithm-ff 0.5 +(defcustom gnosis-algorithm-amnesia-value 0.5 "Gnosis forgetting factor. Used to calcuate new interval for failed questions. -NOTE: This value should be less than 1.0." +This value should be less than 1.0." :group 'gnosis :type 'float) -- cgit v1.2.3 From 71c27d175281e22f052a822199d3e15288b6322e Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:18:01 +0300 Subject: [Refactor] algorithm: Add epignosis. * Replace old concept of ef-increase with epignosis. --- gnosis-algorithm.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 2fdbc00..4424201 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -76,11 +76,10 @@ This value should be less than 1.0." :group 'gnosis :type 'float) -(defcustom gnosis-algorithm-ef-increase 0.1 - "Value to increase ef increase value with. +(defcustom gnosis-algorithm-epignosis-value 0.1 + "Value to increase gnosis-plus upon anagnosis. -Increase ef-increase value by this amount for every -`gnosis-algorithm-ef-threshold' number of successful reviews." +Epignosis means knowledge accuracy.." :group 'gnosis :type 'float) -- cgit v1.2.3 From 4a7001b771ac1b69e6faffed2cb949b6c2f64f47 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:18:46 +0300 Subject: [Refactor] algorithm: Add agnoia. * Replace old concept of ef-decrease with agnoia. --- gnosis-algorithm.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 4424201..a7b72ba 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -83,11 +83,10 @@ Epignosis means knowledge accuracy.." :group 'gnosis :type 'float) -(defcustom gnosis-algorithm-ef-decrease 0.2 - "Value to decrease ef decrease value with. +(defcustom gnosis-algorithm-agnoia-value 0.2 + "Value to increase gnosis-minus upon anagnosis. -Decrease ef decrease value by this amount for every -`gnosis-algorithm-ef-threshold' number of failed reviews." +Agnoia refers to the lack of knowledge." :group 'gnosis :type 'float) -- cgit v1.2.3 From d128715a53411c03e896444d78e801af53295c7e Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:19:34 +0300 Subject: [Refactor] algorithm: Add anagnosis. * Replace old concept of ef-threshold with anagnosis, an event that triggers a change of gnosis score depending on the success or failure of the recall. --- gnosis-algorithm.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index a7b72ba..bbf1467 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -90,10 +90,15 @@ Agnoia refers to the lack of knowledge." :group 'gnosis :type 'float) -(defcustom gnosis-algorithm-ef-threshold 3 - "Threshold for updating ef increase/decrease values. +(defcustom gnosis-algorithm-anagnosis-value 3 + "Threshold value for anagnosis event. -Refers to the number of consecutive successful or failed reviews." +Anagosis is the process recognition & understanding of a context/gnosis. + +Anagnosis events update gnosis-plus & gnosis-minus values, depending +on the success or failure of recall." + :group 'gnosis + :type 'integer) :group 'gnosis :type 'integer) -- cgit v1.2.3 From 20fb72110ab4fc2f300f67a7419141e0b0713cf0 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:20:48 +0300 Subject: [Refactor] algorithm: Add lethe. * Lethe value triggers a lethe event, which resets the next interval to 0. --- gnosis-algorithm.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index bbf1467..a032760 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -99,6 +99,13 @@ Anagnosis events update gnosis-plus & gnosis-minus values, depending on the success or failure of recall." :group 'gnosis :type 'integer) + +(defcustom gnosis-algorithm-lethe-value 2 + "Threshold value for hitting a lethe event. + +Lethe is the process of being unable to recall a memory/gnosis. + +On lethe events the next interval is set to 0." :group 'gnosis :type 'integer) -- cgit v1.2.3 From 7ef8763f7601affee39442da842b7bdfcce4736b Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:21:38 +0300 Subject: algorithm-date: Add assertions for offset. --- gnosis-algorithm.el | 1 + 1 file changed, 1 insertion(+) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index a032760..f3ea4aa 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -123,6 +123,7 @@ On lethe events the next interval is set to 0." (defun gnosis-algorithm-date (&optional offset) "Return the current date in a list (year month day). Optional integer OFFSET is a number of days from the current date." + (cl-assert (or (numberp offset) (null offset)) nil "Date offset must be an integer or nil") (let* ((now (decode-time)) (now (list (decoded-time-month now) (decoded-time-day now) -- cgit v1.2.3 From 73b34063bd1b57635fa4ad2ccf24c0615e7bf078 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 08:23:30 +0300 Subject: [Refactor] Add algorithm-next-gnosis. * Replace old algorithm-next-ef with algorithm-next-gnosis. --- gnosis-algorithm.el | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 28 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index f3ea4aa..dc0537a 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -147,41 +147,46 @@ DATE format must be given as (year month day)." (time-to-days given-date)))) (if (>= diff 0) diff (error "`DATE2' must be higher than `DATE'")))) -(cl-defun gnosis-algorithm-next-ef (&key ef success increase decrease threshold - c-successes c-failures) - "Return the new EF, (increase-value decrease-value total-value) +(cl-defun gnosis-algorithm-next-gnosis (&key gnosis success epignosis agnoia anagnosis + c-successes c-failures) + "Return the neo GNOSIS value. (gnosis-plus gnosis-minus gnsois-synolon) -Calculate the new e-factor given existing EF and SUCCESS, either t or nil. +Calculate the new e-factor given existing GNOSIS and SUCCESS, either t or nil. -Next EF is calculated as follows: +Next GNOSIS is calculated as follows: -Upon a successful review, increase total ef value (nth 2) by -ef-increase value (nth 0). +Upon a successful review, increase gnosis-synolon value (nth 2 gnosis) by +gnosis-plus value (nth 0 gnosis). -Upon a failed review, decrease total ef by ef-decrease value (nth 1). +Upon a failed review, decrease gnosis-synolon by gnosis-minus value + (nth 1 gnosis). -For every THRESHOLD of C-SUCCESSES (consecutive successful reviews) -reviews, increase ef-increase by INCREASE. +ANAGNOSIS is an event threshold, updating either the gnosis-plus or +gnosis-minus values. -For every THRESHOLD of C-FAILURES reviews, decrease ef-decrease value -by DECREASE." - (cl-assert (listp ef) nil "Assertion failed: ef must be a list") +When C-SUCCESSES (consecutive successes) reach ANAGNOSIS, +increase gnosis-plus by EPIGNOSIS. + +When C-FAILURES reach ANAGOSNIS, increase gnosis-minus by AGNOIA." + (cl-assert (listp gnosis) nil "Assertion failed: gnosis must be a list") (cl-assert (booleanp success) nil "Assertion failed: success must be a boolean value") - (cl-assert (numberp increase) nil "Assertion failed: increase must be a number") - (cl-assert (numberp decrease) nil "Assertion failed: decrease must be a number") - (cl-assert (numberp threshold) nil "Assertion failed: threshold must be a number") - (let ((threshold-p (= (% (max 1 (if success c-successes c-failures)) threshold) 0)) - (new-ef (if success (gnosis-algorithm-replace-at-index 2 (+ (nth 2 ef) (nth 0 ef)) ef) - (gnosis-algorithm-replace-at-index 2 (max 1.3 (- (nth 2 ef) (nth 1 ef))) ef)))) - (cond ((and success threshold-p) - (setf new-ef (gnosis-algorithm-replace-at-index 0 (+ (nth 0 ef) increase) new-ef))) - ((and (not success) threshold-p - (setf new-ef (gnosis-algorithm-replace-at-index 1 (+ (nth 1 ef) decrease) new-ef))))) - (gnosis-algorithm-round-items new-ef))) - -(cl-defun gnosis-algorithm-next-interval (&key last-interval ef success successful-reviews - failure-factor initial-interval c-fails - threshold) + (cl-assert (numberp epignosis) nil "Assertion failed: epignosis must be a number") + (cl-assert (numberp agnoia) nil "Assertion failed: agnoia must be a number") + (cl-assert (numberp anagnosis) nil "Assertion failed: anagosis must be a number") + (let ((anagnosis-p (= (% (max 1 (if success c-successes c-failures)) anagnosis) 0)) + (neo-gnosis (if success + (gnosis-algorithm-replace-at-index 2 (+ (nth 2 gnosis) (nth 0 gnosis)) gnosis) + (gnosis-algorithm-replace-at-index 2 (max 1.3 (- (nth 2 gnosis) (nth 1 gnosis))) gnosis)))) + ;; TODO: Change amnesia & epignosis value upon reaching a lethe or anagnosis event. + (cond ((and success anagnosis-p) + (setf neo-gnosis (gnosis-algorithm-replace-at-index 0 (+ (nth 0 gnosis) epignosis) neo-gnosis))) + ((and (not success) anagnosis-p + (setf neo-gnosis + (gnosis-algorithm-replace-at-index 1 (+ (nth 1 gnosis) agnoia) neo-gnosis))))) + (gnosis-algorithm-round-items neo-gnosis))) + +(cl-defun gnosis-algorithm-next-interval (&key last-interval gnosis-synolon success successful-reviews + amnesia proto c-fails lethe) "Calculate next interval. LAST-INTERVAL: Number of days since last review -- cgit v1.2.3 From 2f0db47813bb70e265e6039ad99b8cc4142a1be1 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 11:31:35 +0300 Subject: algorithm: Update docstrings for amnesia & gnosis score. --- gnosis-algorithm.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index dc0537a..a36619c 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -54,7 +54,7 @@ "Gnosis proto interval for the first successful reviews. Values for the first proto successful intervals. There is no -restriction for length." +restriction for list length." :group 'gnosis :type '(list integer)) @@ -72,7 +72,8 @@ Third item : Total gnosis (gnosis-synolon/totalis) -> Total gnosis score" Used to calcuate new interval for failed questions. -This value should be less than 1.0." +The closer this value is to 0, the closer it is to total amnesia for +each a recall. This value should be less than 1.0." :group 'gnosis :type 'float) -- cgit v1.2.3 From 3ad0c10df188b18517570edc5665669caddbdcb9 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 11:32:20 +0300 Subject: algorithm-next-gnosis: Update assertions & style. * Assert epignosis & agnoia as floats. * fix indentation. --- gnosis-algorithm.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index a36619c..76b1360 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -169,15 +169,16 @@ When C-SUCCESSES (consecutive successes) reach ANAGNOSIS, increase gnosis-plus by EPIGNOSIS. When C-FAILURES reach ANAGOSNIS, increase gnosis-minus by AGNOIA." - (cl-assert (listp gnosis) nil "Assertion failed: gnosis must be a list") + (cl-assert (listp gnosis) nil "Assertion failed: gnosis must be a list of floats.") (cl-assert (booleanp success) nil "Assertion failed: success must be a boolean value") - (cl-assert (numberp epignosis) nil "Assertion failed: epignosis must be a number") - (cl-assert (numberp agnoia) nil "Assertion failed: agnoia must be a number") - (cl-assert (numberp anagnosis) nil "Assertion failed: anagosis must be a number") + (cl-assert (and (floatp epignosis) (< epignosis 1)) nil "Assertion failed: epignosis must be a float < 1") + (cl-assert (and (floatp agnoia) (< agnoia 1)) nil "Assertion failed: agnoia must be a float < 1") + (cl-assert (integerp anagnosis) nil "Assertion failed: anagosis must be an integer.") (let ((anagnosis-p (= (% (max 1 (if success c-successes c-failures)) anagnosis) 0)) - (neo-gnosis (if success - (gnosis-algorithm-replace-at-index 2 (+ (nth 2 gnosis) (nth 0 gnosis)) gnosis) - (gnosis-algorithm-replace-at-index 2 (max 1.3 (- (nth 2 gnosis) (nth 1 gnosis))) gnosis)))) + (neo-gnosis + (if success + (gnosis-algorithm-replace-at-index 2 (+ (nth 2 gnosis) (nth 0 gnosis)) gnosis) + (gnosis-algorithm-replace-at-index 2 (max 1.3 (- (nth 2 gnosis) (nth 1 gnosis))) gnosis)))) ;; TODO: Change amnesia & epignosis value upon reaching a lethe or anagnosis event. (cond ((and success anagnosis-p) (setf neo-gnosis (gnosis-algorithm-replace-at-index 0 (+ (nth 0 gnosis) epignosis) neo-gnosis))) -- cgit v1.2.3 From 0f07c050193413f8e947a6977d044811d8e40d36 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 11:33:28 +0300 Subject: [Refactor] algorithm-next-interval: New values & proto intervals * Adjust proto intervals, not hardcoding the length of the list to just 2 items. * Use new values. --- gnosis-algorithm.el | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 76b1360..ea48750 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -195,39 +195,40 @@ LAST-INTERVAL: Number of days since last review C-FAILS: Total consecutive failed reviews. -EF: Easiness factor +GNOSIS-SYNOLON: Current gnosis-synolon (gnosis totalis). SUCCESS: non-nil when review was successful. SUCCESSFUL-REVIEWS: Number of successful reviews. -FAILURE-FACTOR: Factor to multiply last interval by if review was unsuccessful. +AMNESIA: 'Forget value', used to calculate next interval upon failed +review. -INITIAL-INTERVAL: List of initial intervals for initial successful -reviews. Will be used to determine the next interval for the first 2 -successful reviews. Until successfully completing INITIAL-INTERVAL reviews, for every failed attempt next interval will be set to 0. +PROTO: List of proto intervals, for successful reviews. +Until successfully completing proto reviews, for every failed attempt +the next interval will be set to 0. -THRESHOLD: Upon having C-FAILS >= threshold, set next interval to 0." - (cl-assert (< gnosis-algorithm-ff 1) "Value of `gnosis-algorithm-ff' must be lower than 1") +LETHE: Upon having C-FAILS >= lethe, set next interval to 0." + (cl-assert (booleanp success) nil "Success value must be a boolean") + (cl-assert (integerp successful-reviews) nil "Successful-reviews must be an integer") + (cl-assert (and (floatp amnesia) (<= amnesia 1)) nil "Amnesia must be a float <=1") + (cl-assert (< amnesia 1) nil "Value of amnesia must be lower than 1") + (cl-assert (and (integerp lethe) (>= lethe 1)) nil "Value of lethe must be an integer >= 1") ;; This should only occur in testing env or when the user has made breaking changes. (let* ((last-interval (if (<= last-interval 0) 1 last-interval)) ;; If last-interval is 0, use 1 instead. - (interval (cond ((and (= successful-reviews 0) success) - (car initial-interval)) - ((and (= successful-reviews 1) success) - (cadr initial-interval)) - ;; If it's still on initial stage, review the - ;; same day - ((and (or (< successful-reviews (length initial-interval)) - ;; reset threshold - (and threshold (>= c-fails threshold))) + (interval (cond ((and (< successful-reviews (length proto)) + success) + (nth successful-reviews proto)) + ;; Lethe event, reset interval. + ((and (>= c-fails lethe) (not success)) 0) - (t (let* ((success-interval (* ef last-interval)) - (failure-interval (* last-interval failure-factor))) + (t (let* ((success-interval (* gnosis-synolon last-interval)) + (failure-interval (* amnesia last-interval))) (if success success-interval ;; Make sure failure interval is never - ;; higher than success - (min success-interval failure-interval))))))) + ;; higher than success and at least 0 + (max (min success-interval failure-interval) 0))))))) (gnosis-algorithm-date (round interval)))) -- cgit v1.2.3 From 0c8d6b9c6503505503252cd0cfa1ebb3aacb4d21 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 12:25:39 +0300 Subject: algorithm: Invert amnesia value. * Invert amnesia, so the higher it is, the higher the "amnesia". --- gnosis-algorithm.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index ea48750..559bb4d 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -212,10 +212,11 @@ LETHE: Upon having C-FAILS >= lethe, set next interval to 0." (cl-assert (booleanp success) nil "Success value must be a boolean") (cl-assert (integerp successful-reviews) nil "Successful-reviews must be an integer") (cl-assert (and (floatp amnesia) (<= amnesia 1)) nil "Amnesia must be a float <=1") - (cl-assert (< amnesia 1) nil "Value of amnesia must be lower than 1") + (cl-assert (and (<= amnesia 1) (> amnesia 0)) nil "Value of amnesia must be a float <= 1") (cl-assert (and (integerp lethe) (>= lethe 1)) nil "Value of lethe must be an integer >= 1") ;; This should only occur in testing env or when the user has made breaking changes. (let* ((last-interval (if (<= last-interval 0) 1 last-interval)) ;; If last-interval is 0, use 1 instead. + (amnesia (- 1 amnesia)) ;; inverse amnesia (interval (cond ((and (< successful-reviews (length proto)) success) (nth successful-reviews proto)) -- cgit v1.2.3 From 109c47f1dc0fbc47cbd0d37989e5fc0009a5e837 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 14:46:10 +0300 Subject: packaging: Update version & commentary. --- gnosis-algorithm.el | 31 ++++++------------------------- gnosis.el | 25 ++++++++++++++----------- 2 files changed, 20 insertions(+), 36 deletions(-) (limited to 'gnosis-algorithm.el') diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index 559bb4d..a8930a3 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -24,26 +24,8 @@ ;;; Commentary: -;; Handles date calculation as well as ef & interval calculations. - -;; Gnosis implements a highly customizable algorithm, inspired by SM-2. -;; Gnosis algorithm does not use user's subjective rating of a note to -;; determine the next review interval, but instead uses the user's -;; success or failure in recalling the answer of a note. - -;; Each gnosis note has an ef (easiness factor), which is a list of 3 -;; values. The last value is the total ef for a note, which will be -;; used to determine the next interval upon a successful answer recall, -;; the second value is the ef-decrease value, this value will be -;; subtracted from the the total ef upon failure to recall the answer of -;; a note, the first value is the ef increase, will be added to the -;; total ef upon a successful recall. - -;; Each gnosis deck has a gnosis-algorithm-ef-threshold, it's an -;; integer value that refers to the consecutive success or failures to -;; recall an answer. Upon reaching the threshold, gnosis-algorithm-ef-decrease -;; or gnosis-algorithm-ef-increase will be applied to the ef-increase or -;; ef-decrease of note. +;; Module that handles date and interval calculation as well as +;; gnosis-score for notes. ;;; Code: @@ -68,19 +50,18 @@ Third item : Total gnosis (gnosis-synolon/totalis) -> Total gnosis score" :type '(list float)) (defcustom gnosis-algorithm-amnesia-value 0.5 - "Gnosis forgetting factor. + "Gnosis amnesia value. -Used to calcuate new interval for failed questions. +Used to calcuate new interval upon a failed recall i.e the memmory loss. -The closer this value is to 0, the closer it is to total amnesia for -each a recall. This value should be less than 1.0." +The closer this value is to 1, the more the memory loss." :group 'gnosis :type 'float) (defcustom gnosis-algorithm-epignosis-value 0.1 "Value to increase gnosis-plus upon anagnosis. -Epignosis means knowledge accuracy.." +Epignosis means knowledge accuracy." :group 'gnosis :type 'float) diff --git a/gnosis.el b/gnosis.el index e9d8604..6b396e3 100644 --- a/gnosis.el +++ b/gnosis.el @@ -5,7 +5,7 @@ ;; Author: Thanos Apollo ;; Keywords: extensions ;; URL: https://thanosapollo.org/projects/gnosis -;; Version: 0.3.2 +;; Version: 0.4.0 ;; Package-Requires: ((emacs "27.2") (emacsql "20240124") (compat "29.1.4.2") (transient "0.7.2")) @@ -24,16 +24,19 @@ ;;; Commentary: -;; Gnosis is a spaced repetition system for note taking and -;; self-testing. Notes are organized in a Question/Answer/Explanation -;; format and reviewed at spaced intervals. Interval durations are -;; based on the success or failure of recalling the answer to each -;; question. - -;; Gnosis uses a highly customizable algorithm. Unlike traditional -;; methods, it doesn't depend on subjective user ratings to determine -;; the next review interval. Instead, it evaluates the user's success -;; or failure in recalling an answer by typing it. +;; Gnosis (γνῶσις) is a spaced repetition system that enhances memory +;; retention through active recall. It employs a Q&A format, where each +;; note consists of a question, answer, and explanation. Notes are +;; reviewed at optimally spaced intervals based on the user's success or +;; failure to recall the answer. Key benefits arise from writing out +;; answers when reviewing notes, fostering deeper understanding +;; and improved memory retention. + +;; Gnosis algorithm is highly adjustable, allowing users to set specific +;; values not just for note decks but for tags as well. Gnosis' +;; adjustability allows users to fine-tune settings not only for entire +;; note collections but also for specific tagged topics, thereby creating +;; a personalized learning environment for each topic. ;;; Code: -- cgit v1.2.3