Home News Shopping FAQ Library Download Help Support
Contents : Technical articles
Repetition scheduling plug-in specification for the future releases of SuperMemo for Windows Dr P.A.Wozniak
Mar 27, 1998
Last updated: July 6, 1998

SuperMemo 8 uses Algorithm SM-8 for scheduling repetitions in the course of learning.
Work is underway on an experimental research project that is to verify the applicability of neural networks in repetition spacing.
Similarly, there is a potential for investigating other algorithmic approaches by interesting parties in the research community. Responding to an ages-old postulate coming from various research quarters, SuperMemo World decided to release the following specification of repetition scheduling component plug-in that is to be implemented in future versions of SuperMemo yet in 1998.
Using this specification, it shall be possible to write 32-bit DLL libraries that would implement all conceivable algorithms for scheduling repetitions in learning, and use it with SuperMemo 8 as a standard application shell.
SuperMemo 8 is a culmination of 10 year software development of a CASI tool based on repetition spacing (CASI: computer aided self-instruction). By releasing the present specification we open a way for other researchers to tap to this 10-year-old experience without the need to rely on our repetition spacing solution.

This is how to write to the presented specification:

  1. Implement the algorithm in a single 32-bit Windows DLL with Pascal calling conventions (i.e. reading arguments from left to right, passing parameters via stack, with automatic stack cleaning upon return and uppercase identifiers).
  2. DLL will be installed into a directory determined by SuperMemo 8 (standardly ALG, e.g. c:\sm8\alg\<name>.dll)
  3. DLL should store its global data files in a single directory with the same name as the library itself and created by the DLL in the same directory in which the DLL had been installed (e.g. c:\sm8\alg\<name>\<data files>.*)
  4. DLL should store its local data files (i.e. files pertaining to a given knowledge system) in the ALG\<name> subdirectory of the knowledge system. For example if the plug-in DLL is named sm2.dll and the knowledge system is called mysys then global files might be located in c:\sm8\alg\sm2\ directory while local files in c:\sm8\systems\mysys\alg\sm2\
  5. SuperMemo 8 installs the DLL with the command Tools : Options : SuperMemo : Plug-In Algorithm : Install and effectively supplants the default Algorithm SM-8 (uninstallation with Tools : Options : SuperMemo : Plug-In Algorithm : Restore default)
  6. Upon installing, the DLL's procedure Install(path:PChar) is be called (if defined). The path argument here indicates the directory in which the DLL is being installed (e.g. 'c:\sm8\alg' in the example mentioned above)
  7. Optionally, the DLL can define procedure Description(var text:PChar) that makes it possible to shortly describe the plug-in. The description is used in Tools : Options : SuperMemo : Plug-In Algorithm to identify the currently installed plug-in.
  8. Upon opening a new knowledge system a procedure Initialize is called with PChar parameter pointing to the path to the knowledge system files: Initialize(path:PChar). For example, if the system is c:\sm8\systems\mysys.kno then the value of PChar is 'c:\sm8\systems\mysys'.
  9. Upon repetition the procedure Repetition is be called:
    Repetition(ElementNumber:integer;Grade:0..5;var NewInterval:integer;commit:boolean)
  10. The procedure Repetition is obligatory and is called twice in the course of a single repetition:
  11. The program feeds the DLL with the number of the repetition and the grade upon calling Repetition and in return obtains the new interval that indicates the date of the next repetition of the current element
  12. Upon resetting the knowledge system, the procedure ResetAlgorithm is be called to delete the data related to the learning process. Note that this procedure is also called at the moment of installing the plug-in!
  13. Upon closing the current knowledge system, the procedure Finalize is be called
  14. Optionally the DLL can provide the procedure Statistics for presenting algorithm-specific statistics and parameters available with Tools : Statistics : Plug-in. The traditional statistics dialog box available from Tools : Statistics : Algorithm still provides access to all parameters that would otherwise be set by Algorithm SM-8 assuming the newly generated intervals were taken from the plug-in process!

Important! Algorithm SM-8 continues running in the background upon installing the plug-in. This way, the user is always able to return to standard repetitions with Tools : Options : SuperMemo : Plug-In Algorithm : Restore default with little detriment to the learning process!

More about the repetition scheduling plug-in:

  1. For an exemplary source code see: SuperMemo 2 Plug-In Source Code (including an exemplary DLL).
  2. To learn more about neural network plug-in see Neural Network SuperMemo.