- * A session of challenges 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
- * by default 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).
- *
- * This function returns after all three phases are complete.
- *
- * The user's progress (the movement of items to various new bins) is
- * kept only in memory. In order to save this progress to disk, the
- * caller must call mnemon_save.