]> git.cworth.org Git - mnemon/log
mnemon
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.)

16 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.

16 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.

17 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

17 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

17 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

17 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

17 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.)

17 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).

17 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

17 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

17 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.