The SuperMemo ideas don’t seem to be leaving my head, and I’ve finally gotten my todo backlog under control, so I think I’ll take a shot at implementing them. Some notes:

What algorithm should I use to schedule the reminders? I’ll work under the theory that each item that I want to remember is best reviewed at exponentially increasing intervals; see, for example, Wozniak’s Algorithm SM-4. (Though I should note that Algorithm SM-11, his most recent version, seems to drop this assumption.) And, of course, different items are best reviewed at different rates, depending on how easily my brain seems to remember them; let’s call the multiplication factor that we use in the exponential curve for an item its “difficulty factor”. (Where smaller DF = more frequent repetitions = more difficult.)

In SM-4, he suggests that a natural goal is to try to remember items correctly 90% of the time, and that a difficulty factor of 2.5 makes sense as a first guess. In earlier versions of the algorithm, he has what seem to me somewhat complicated ways of tweaking the difficulty factor, but, in later versions, it gets simpler: if you get it wrong, start over reviewing the item from scratch, and increase the difficulty.

Given that, assume you’ve gotten an item wrong W times, and have S winning streaks of 10 correct answers. (So a 20-win streak would count two towards S.) (Though, with the power of exponential growth, a 20-win streak would take decades at all but the hardest difficulty factors.) Then I’ll set the difficulty factor DF for that item equal to 2.5 – .1(W – S). The point here is that ten correct answers balances one mistake, which fits with getting it right 90% (or 91%, I suppose) of the time. And I pulled the .1 more or less out of my hat: I don’t want the difficulty factor to get too close to 1 most of the time, and subtracting .1 each time I get it wrong should fit in well with that goal, based on my experience over the last year with Japanese vocabulary.

With the above definitions, assume that your current winning streak for an item has length n. Then I’ll say that you review the item immediately if n=0, and review it in DF^(n-1) days if n > 0. Actually, I think I’ll change that last to (DF^(n-1)) – .5 days, since I only plan to do the review once a day, and I want to avoid weirdness that might occur if I do it at 8pm one day and at 6pm the next day, or even 11am.

This looks pretty simple: for any given item, I just have to store the next review time, W, S, and n to have enough information to schedule future reviews. (And the fact that one of the items to store is the next review time is very convenient, because that means I can figure out what to review by just doing a simple database query on that column.) I could even store W – S instead of storing both W and S, but I think I’ll keep them separate. One reason for this is that one of the ideas in the original is that different items can be considered more important to learn or less important to learn; if I have something that’s really important to learn, e.g. kana characters, then I could have each mistake count as -.2 instead of -.1, while each 10-time winning streak would still only count as +.1.

That’s the algorithm; what do I use to program the application? One of my motivations is to make it easy to continue my studies when I’m on vacation, or for that matter during my lunch break at work, so I’d like to make this a web app. It looks like a good fit for Rails, and I’d been meaning to get practice with Rails anyways, so that’s what I’ll use. Hmm, what are the best ways to learn about Rails? It’s alleged to be simple enough that I should probably just jump right in and program instead of spending hours reading about it.

The program will have to present questions and answers; each one will be a simple Unicode text field. (And I’ll want to do automatic line wrapping but to preserve manual line breaks.) It won’t affect the programming, but I’ll have to learn a bit more about multilingual input in the various operating systems I use; I’ve done kanji input on the Mac, hopefully it won’t be too hard in Linux, either, and hopefully it will be easy to switch between keyboard layouts on the fly. I can start off with buttons for “show me the answer” and “correct/incorrect”, but eventually I’ll want keystroke inputs for those, to minimize typing. And that’s all there is for the “test yourself” part of the interface; I’ll also need an interface for adding questions and for editing them. (Where the latter will require search functionality.)

If this works well for me, I may well want to let Miranda use it to help with her German; so I’ll have to think about account management, authorization, security. (And if any of my readers are curious, I’d be more than happy to open it up to y’all, too.) OpenID is the trendy up-and-coming authorization mechanism these days; maybe I’ll give that a shot? I would assume that there’s probably some Rails plugin that makes OpenID easy to use.

That should be enough to get me going; in particular, I have a clear next step, to get my hands dirty with Rails, and I have a clear first goal, to get the basics of adding and reviewing items working locally. And then followup goals of searching/editing and of doing this remotely in a not-hopelessly-insecure fashion; I’m going on vacation for a week in August, so I’ll try to get to that stage by then. The multiuser stuff can wait until after that.

Should be a pleasant way to spend some of my free time over the next few months. Andd it will directly address some of the issues I’m having with my current Japanese review: I’m currently managing to review vocabulary items both too frequently and not frequently enough! So I’d really like an algorithm that asked me questions at just the right time.

Post Revisions:

There are no revisions for this post.