A post to the graded-reader mailing list from March 29, 2008.
[this is based on a blog post from August 2005 but with the terminology changed]
Say you have written a program which lists an order in which to learn items along with an indication, every so often, of what new target has been reached. Running on the Greek lexemes of 1John, you might get something starting like this:
learn μαρτυρέω
learn θεός
learn ἐν
learn εἰμί
learn ὁ
learn τρεῖς
learn ὅτι
know 230507
This gives seven items to learn and then a target that has been reached (230507 = 1John 5.7). The problem is that two of those items are unnecessary. You only need to learn μαρτυρέω, εἰμί, ὁ, τρεῖς and ὅτι to be able to read 1John 5.7.
The problem is that the program is ordering items first and only then establishing at each point what goals (if any) have been achieved.
What you really want to do is not display an item until it is needed. So back in 2005, I wrote some code that optimizes the ordering of items by delaying any that are not yet needed.
I’ve now made that code more generic and will check it in shortly.
It can be used as a post-processor on ordering from any source, even a manually crafted list of items. It will optimize the ordering of items for the same ordering of targets.
Because the algorithm for doing such an optimization is nearly identical to what’s necessary to calculate the “area under the curve” that I described in my video (and will write more about soon) my new code also outputs a score.
I’ll be checking it in shortly.
James
It’s available at:
http://code.google.com/p/graded-reader/source/browse/trunk/code/optimize-order.py
James