|Repetition scheduling plug-in
specification for the future releases of SuperMemo for
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
- 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
- DLL will be installed into a directory
determined by SuperMemo 8 (standardly ALG, e.g.
- 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.
- 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\
- 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
- 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
- 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.
- 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'.
- Upon repetition the procedure Repetition
is be called:
- ElementNumber - number of the
element that has just been rehearsed
- integer - 32-bit unsigned
- Grade - integer denoting the
grade the repeated element scored in the current
- NewInterval - new interval in
days to be used by the element (next repetition
date is the current date plus NewInterval). Note
that SuperMemo sets this value on input like it
would otherwise be set by Algorithm
SM-8! You can use
this property for comparing your algorithm with
the original SuperMemo algorithm.
- commit - indication if the
repetition data should be committed or if the Cancel
Grade option could yet be invoked
- boolean - 16-bit boolean
variable (0 - false, 1 - true)
- The procedure Repetition is
obligatory and is called twice in the course of a single
- first with commit set to false
after executing the repetition and generating a
grade (e.g. with pressing Bright, Pass,
- second with commit set to true
at the moment of committing the repetition (e.g.
with Next Repetition, Stop,
quitting the program, etc.)
- 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
- 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!
- Upon closing the current knowledge
system, the procedure Finalize is be called
- 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
More about the repetition scheduling
- For an exemplary source code see: SuperMemo 2
Plug-In Source Code
(including an exemplary DLL).
- To learn more about neural network
plug-in see Neural