]> git.cworth.org Git - mnemon/log
mnemon
13 years agoAdd a simple text-to-speech challenge type.
Carl Worth [Wed, 9 Jun 2010 14:42:26 +0000 (07:42 -0700)]
Add a simple text-to-speech challenge type.

This is implemented by doing the following:

     echo $challenge | festival --tts

But we actually make that invocation in a little script named mnemon-tts
because I'm too lazy to code up a custom invocation for this challenge
type.

15 years agoTweak the implementation of to_master
Carl Worth [Wed, 8 Apr 2009 00:03:35 +0000 (17:03 -0700)]
Tweak the implementation of to_master

I think the to_master counter got off from some point from its original
purpose, (and probably because I never documented it that well).

Here are my current thoughts and what should be implemented now:

A mnemon session consists of three phases, some of which may be entirely
empty, as follows:

1. The introduction phase

   This phase is controlled by the to_introduce counter which is initially
   set to 10. It is decremented every time an item is introduced from the
   bin with score 0, or (if there is no bin with score 0), every time an
   item is introduced from the bin with the lowest non-negative score of
   any bin.

2. The mastering phase

   This phase is controlled by the to_master counter which is initially
   set to 10. It begins at the beginning of the session so can run
   concurrently with the introduction phase. The to_master counter is
   decremented every time an item with a positive (non-zero) score is
   answered correctly. It is also incremented every time an item with
   a positive (non-zero) score is answered incorrectly during the
   introduction phase. If perfect mastery is demonstrated, the mastering
   phase is likely to be complete simultaneous with the introduction
   stage. If the user is really struggling with mastery, the mastering
   phase will extend long after the introduction phase is over. But
   since we never incremeent to_master after the introduction phase is
   over, the user cannot build an infinite snowball of to_master items
   and have to give up in despair.

3. The solidifying phase

   This final phase continues after the mastering phase for as long as
   any items with a negative score remain. The idea here is that we
   want to quickly give the reinforcement from a missed item in the
   current session. Also, there's a bit of a challenge to the user to
   demonstrate good mastery of any non-negative items presented so that
   the phase actually terminates. It's possible for this phase to extend
   for an arbitrary amount of time, but not very likely, (since the
   negative items are chosen preferentially and the user will continue
   to see the correct answers to them over and over).

15 years agoAdd a new repeat option
Carl Worth [Sat, 4 Apr 2009 15:14:59 +0000 (08:14 -0700)]
Add a new repeat option

This is instead of unconditionally repeating audo and midi challenges.

15 years agoAdd a new midi challenge type
Carl Worth [Thu, 2 Apr 2009 15:13:05 +0000 (08:13 -0700)]
Add a new midi challenge type

Doing this instead of the audio type means we can save file size,
(these midi files are much smaller than resulting .wav files), and
also skip once processing step in preparing the files.

Using the -Os option to timidity means that if we have two overlapping
invocations of timidity the second one won't fail due to contention
for /dev/dsp.

15 years agoAdd a command for repeating (/r)
Carl Worth [Mon, 30 Mar 2009 01:17:59 +0000 (18:17 -0700)]
Add a command for repeating (/r)

This is particularly useful for audio challenges which aren't
readily available for observation if missed the first time.

15 years agoReplay audio challenges after the correct answer is shown
Carl Worth [Mon, 30 Mar 2009 01:13:37 +0000 (18:13 -0700)]
Replay audio challenges after the correct answer is shown

This is necessary reinforcement, since unlike the other challenge types,
the original channel is no longer observable when the correct answer
is displayed.

15 years agoAdd support for audio challenges as well.
Carl Worth [Sun, 29 Mar 2009 23:23:15 +0000 (16:23 -0700)]
Add support for audio challenges as well.

This will work with anything supported by the play command. It's still
cheesy in that it uses system like the image support, but at least the
audio support doesn't use killall.

15 years agoMerge branch 'master' into image
Carl Worth [Sat, 28 Mar 2009 18:00:43 +0000 (11:00 -0700)]
Merge branch 'master' into image

15 years agoRecognize '-' as a numeric characeter as well
Carl Worth [Sat, 28 Mar 2009 18:00:23 +0000 (11:00 -0700)]
Recognize '-' as a numeric characeter as well

Without this fix, mnemon would croak when encountering a negative score
in a data file, (which can happen after quitting with some unlearned
items).

15 years agoFix bug when there are no new items to introduce
Carl Worth [Fri, 27 Mar 2009 22:17:18 +0000 (15:17 -0700)]
Fix bug when there are no new items to introduce

Previously, mnemon would keep challenging infinitely (waiting for 10
new items to be introduced). Instead, we now decrement the to_introduce
counter every time an item is selected from the smallest-number bin.

15 years agoAdd support for image-based challenges
Carl Worth [Fri, 27 Mar 2009 22:05:08 +0000 (15:05 -0700)]
Add support for image-based challenges

The support right now is extremely cheesy. It depends on two
external programs (xli and killall), and also uses system()
to execute them with the shell (ick). Oh, and it will also
indiscriminately kill any innocent xli processes that happen
to get in the way. Clearly it's a pretty ugly hack.

15 years agoAdd an fsync (Ted T'so would be pleased)
Carl Worth [Sun, 22 Mar 2009 22:17:08 +0000 (15:17 -0700)]
Add an fsync (Ted T'so would be pleased)

We've been using open;write;close;rename for udpating mnemon files,
but with recent discussion of ext4 failure modes, Ted has taught
that the only reliable way of getting the desired results is to
fsync before the close. That fsync does more than we really want
here, but there's no way to ask for a less heavy version of what
we want.

15 years agoReload file before printing final histogram
Carl Worth [Sat, 14 Mar 2009 23:37:20 +0000 (16:37 -0700)]
Reload file before printing final histogram

This allows bin 0 to be seen in the result.

15 years agoPrint histogram when complete.
Carl Worth [Sat, 14 Mar 2009 19:09:24 +0000 (12:09 -0700)]
Print histogram when complete.

This helps the user track progress, and also waits for the user
to press enter before quitting, (useful for when executing
mnemon as the comman within a terminal session, for example).

15 years agoFix memory leaks after calling readline.
Carl Worth [Sat, 14 Mar 2009 19:05:56 +0000 (12:05 -0700)]
Fix memory leaks after calling readline.

We're responsible for cleaning up afterwards.

15 years agoAdd support for timed-response categories
Carl Worth [Sat, 14 Mar 2009 19:03:19 +0000 (12:03 -0700)]
Add support for timed-response categories

The syntax is, for example 'time = 2.0' in the data file, meaning
that each answer in that category needs to be answered in less than
2.0 seconds or it will be handled as an incorrect answer even if
correct. (Good for practicing multiplication facts, for example.)

15 years agoChange mastery metric so that training continues until overall score has improved...
Carl Worth [Fri, 20 Jun 2008 18:16:51 +0000 (11:16 -0700)]
Change mastery metric so that training continues until overall score has improved by at least 10.

15 years agoPrint previous score value for a word that's missed.
Carl Worth [Fri, 20 Jun 2008 03:28:26 +0000 (20:28 -0700)]
Print previous score value for a word that's missed.

16 years agoAllow "/h <category> <length>" for histograms of words of a particular length
Carl Worth [Sat, 4 Aug 2007 05:44:13 +0000 (22:44 -0700)]
Allow "/h <category> <length>" for histograms of words of a particular length

16 years agoGeneralize histogram printing to accept a predicate function
Carl Worth [Sat, 4 Aug 2007 05:23:33 +0000 (22:23 -0700)]
Generalize histogram printing to accept a predicate function

16 years agoAllow "/h <category>" to display histogram for a single category
Carl Worth [Sat, 4 Aug 2007 04:33:11 +0000 (21:33 -0700)]
Allow "/h <category>" to display histogram for a single category

16 years agoIntroduce 10 new items per session
Carl Worth [Sat, 4 Aug 2007 04:01:19 +0000 (21:01 -0700)]
Introduce 10 new items per session

16 years agoFix state transition to enter mastery stage
Carl Worth [Tue, 15 May 2007 23:34:35 +0000 (16:34 -0700)]
Fix state transition to enter mastery stage

Previously it would only enter the mastery stage when unlearned
became 0, but it would miss entering the stage when unlearned
was already 0 and to_introduce became 0. (That is, if you got
all the newly introduced items right on the first try, you could
then go on to demonstrate mastery of many items without being
credited for them towards the mastery quota.)

16 years agoAdd support for sequential introduction of a category
Carl Worth [Tue, 15 May 2007 23:25:34 +0000 (16:25 -0700)]
Add support for sequential introduction of a category

This allows a particular category to be configured so that new items
will be introduced in the order they exist in the file, rather than
randomly, (though once an item leaves bin 0 it gets the same random
treatment as all other items).

The behavior is controlled by a new option at the beginning of the
file that looks like this:

order = sequential

If there is no option it will be treated as random, (and when written
out the order option will be set to either sequential or random).

16 years agoMacro-ify some repeated code from parsing
Carl Worth [Mon, 14 May 2007 21:03:00 +0000 (14:03 -0700)]
Macro-ify some repeated code from parsing

16 years agoDon't start mastery session until there are no items unlearned *nor* any to introduce
Carl Worth [Mon, 14 May 2007 21:02:24 +0000 (14:02 -0700)]
Don't start mastery session until there are no items unlearned *nor* any to introduce

16 years agoEase mastering requirement to not require consecutive success
Carl Worth [Mon, 14 May 2007 20:49:09 +0000 (13:49 -0700)]
Ease mastering requirement to not require consecutive success

Formerly, a session would only exit after consecutively demonstrating
mastery of some number of items. This had the affect of skewing the
set positive, and potentially doing a large amount of review without
introducing any new material.

The original intent of the mastery requirement was simply to provide
some review of previously learned material after introducing new
material. So we now simply require some number of items to be mastered,
but we don't require them to be achieved consecutively, (that is,
we don't reset the count at any miss).

17 years agoAdd /h command for printing a histogram of the current bins.
Carl Worth [Sun, 22 Apr 2007 21:12:08 +0000 (14:12 -0700)]
Add /h command for printing a histogram of the current bins.

17 years agoFix to not pull from bin with score 0 when there are no items to introduce.
Carl Worth [Sun, 22 Apr 2007 17:48:48 +0000 (10:48 -0700)]
Fix to not pull from bin with score 0 when there are no items to introduce.

17 years agoIntroduce only 3 instead of 10 new items, and add mastery training before exiting.
Carl Worth [Sun, 22 Apr 2007 17:48:11 +0000 (10:48 -0700)]
Introduce only 3 instead of 10 new items, and add mastery training before exiting.

17 years agoPenalize an incorrect item down to a score of -2
Carl Worth [Thu, 19 Apr 2007 05:54:07 +0000 (22:54 -0700)]
Penalize an incorrect item down to a score of -2

17 years agoRename item and bin "count" to "score" which is more accurate
Carl Worth [Thu, 19 Apr 2007 05:38:28 +0000 (22:38 -0700)]
Rename item and bin "count" to "score" which is more accurate

There are several situations where the score is not really
a count of anything, (and more are to come in the future).

17 years agoPrint success count as it increments.
Carl Worth [Thu, 19 Apr 2007 05:36:10 +0000 (22:36 -0700)]
Print success count as it increments.

17 years agoAvoid unnecessary (and potentially dangerous) memmove
Carl Worth [Tue, 17 Apr 2007 22:34:27 +0000 (15:34 -0700)]
Avoid unnecessary (and potentially dangerous) memmove

17 years agoFix giant memory waste in menmon_get_bin
Carl Worth [Tue, 17 Apr 2007 22:04:46 +0000 (15:04 -0700)]
Fix giant memory waste in menmon_get_bin

We were doubling the storage every time we failed to find a bin
present, whether or not we actually needed any more storage (oops!).

17 years agoRemove the bin with count 0 once we're done introducing new items
Carl Worth [Tue, 17 Apr 2007 21:53:01 +0000 (14:53 -0700)]
Remove the bin with count 0 once we're done introducing new items

17 years agoMake the program terminate when no items are left to be learned
Carl Worth [Tue, 17 Apr 2007 21:26:20 +0000 (14:26 -0700)]
Make the program terminate when no items are left to be learned

An item is considered learned once its score goes positive.
The program now runs until no items have a negative score.
If there are fewer than 10 items with a negative score
when it starts, it will introduce some new items from the
pool of items with a score of 0, (otherwise these items
will not be presented).

But items that do have positive scores are always available
to be presented for reinforcement, (and will also go into
the pool of words to be learned before the program terminates
if they are missed).

17 years agoFix typo in error message
Carl Worth [Tue, 17 Apr 2007 20:08:23 +0000 (13:08 -0700)]
Fix typo in error message

17 years agoPrevent any item count from being 0 after being asked.
Carl Worth [Tue, 17 Apr 2007 19:45:51 +0000 (12:45 -0700)]
Prevent any item count from being 0 after being asked.

17 years agoPrint before-and-after bin numbers
Carl Worth [Tue, 17 Apr 2007 19:44:24 +0000 (12:44 -0700)]
Print before-and-after bin numbers

17 years agoEliminate the correct response bonus
Carl Worth [Tue, 17 Apr 2007 18:22:57 +0000 (11:22 -0700)]
Eliminate the correct response bonus

As questions get missed repeatedly, they get asked more frequently, to
the point where it is likely to get asked consecutively. At this point,
there really isn't any learning going on, so it's better to give it a
single increment in the count, (leaving it negative), instead of
moving it all the way to +1.

17 years agoPrint newline on EOF
Carl Worth [Tue, 17 Apr 2007 18:13:32 +0000 (11:13 -0700)]
Print newline on EOF

17 years agoRemove a bin when it becomes empty.
Carl Worth [Tue, 17 Apr 2007 18:12:27 +0000 (11:12 -0700)]
Remove a bin when it becomes empty.

Otherwise, mnemon gets stuck repeatedly asking about stale items
that aren't really in empty bins.

17 years agoAdd interactive querying of items
Carl Worth [Tue, 17 Apr 2007 17:37:40 +0000 (10:37 -0700)]
Add interactive querying of items

We select a bin with an expoentially-distributed pseudo-random number,
(so the items that have been misses the most get the most repetition),
then select an item within that bin with a uniformly distributed
random number. After querying the user, the item's count is adjusted
to the next higher/lower positive/negative number if the user's
response is correct/incorrect. And the item is moved into the new
bin based on its count.

17 years agoWait until category is complete before adding items to bins
Carl Worth [Tue, 17 Apr 2007 17:57:51 +0000 (10:57 -0700)]
Wait until category is complete before adding items to bins

Otherwise the category will keep reallocing the items array which
means the pointers to each item won't be stable so we must not
save them into bins.

17 years ago.gitignore: ignore mnemon binary
Carl Worth [Tue, 17 Apr 2007 15:21:07 +0000 (08:21 -0700)]
.gitignore: ignore mnemon binary

17 years agoFree memory leaks in mnemon_save (thanks valgrind!)
Carl Worth [Tue, 17 Apr 2007 15:20:45 +0000 (08:20 -0700)]
Free memory leaks in mnemon_save (thanks valgrind!)

17 years agoMaintain bins in sorted order
Carl Worth [Tue, 17 Apr 2007 15:19:16 +0000 (08:19 -0700)]
Maintain bins in sorted order

17 years agoAdd categories and bins to store data
Carl Worth [Tue, 17 Apr 2007 06:56:58 +0000 (23:56 -0700)]
Add categories and bins to store data

Test the whole works by reading all data and then writing it out,
(with atomic replacement of original files).

17 years agoInitial commit of mnemon
Carl Worth [Tue, 17 Apr 2007 05:33:06 +0000 (22:33 -0700)]
Initial commit of mnemon

It doesn't really do anything yet---just reads in a file of
challenge/response pairs and prints them out.