]> git.cworth.org Git - mnemon/blobdiff - mnemon.c
Tweak the implementation of to_master
[mnemon] / mnemon.c
index c334f22d7ef0915289fd9ed20f229fe9b700bd42..69ac5b10cb9c639e18fcc1b6be337d6bba8648a0 100644 (file)
--- a/mnemon.c
+++ b/mnemon.c
@@ -1116,13 +1116,11 @@ mnemon_handle_response (mnemon_t        *mnemon,
        (time_limit == 0.0 || response_time < time_limit))
     {
        item->score++;
-       mnemon->to_master--;
        /* We reserve an item score of 0 for an item that has
         * never been asked. */
        if (item->score == 0) {
            item->score = 1;
            mnemon->unlearned--;
-           mnemon->to_master--;
            printf ("You got it!");
        } else if (item->score < 0) {
            printf ("Yes---just give me %d more.",
@@ -1131,6 +1129,8 @@ mnemon_handle_response (mnemon_t  *mnemon,
            printf ("On your first try, no less!");
        } else {
            printf ("Masterful (%dx).", item->score);
+           if (mnemon->to_master)
+               mnemon->to_master--;
        }
     } else {
        if (! correct)
@@ -1146,12 +1146,13 @@ mnemon_handle_response (mnemon_t        *mnemon,
                printf (" Oops, you knew that, right? (%dx)\n ",
                        item->score);
            mnemon->unlearned++;
-           /* We add three here, (rather than just 2 to track the
-            * change in the item's score below), as an extra
-            * penalty. If the user is forgetting stuff learned
-            * previously, then more time should be spent on mastering
-            * than learning new items. */
-           mnemon->to_master += item->score + 3;
+           /* We increase to_master here as an extra penalty. If the
+            * user is forgetting stuff learned previously, then more
+            * time should be spent on mastering than learning new
+            * items. Note that we only do this during the initial
+            * phase while new items are still being introduced. */
+           if (mnemon->to_introduce)
+               mnemon->to_master++;
            /* We go to -2 to force a little extra reinforcement
             * when re-learning an item, (otherwise, it will often
             * get asked again immediately where it is easy to get
@@ -1159,7 +1160,6 @@ mnemon_handle_response (mnemon_t  *mnemon,
            item->score = -2;
        } else {
            item->score--;
-           mnemon->to_master++;
        }
     }