Dr Piotr Wozniak, Dec. 17, 1996
SM8OPT.DLL is a library designed for software developers intending to implement the SuperMemo method in their software. Licensing conditions for using SM8OPT.DLL will differ depending on the target application (contact SuperMemo World for more details). In particular, no license fee is required for projects whose sole purpose is research on repetition spacing or on the Algorithm-SM8 used by SM8OPT.DLL. Nevertheless, written permission from SuperMemo World must be obtained beforehand in all cases.
SM8OPT.DLL can be called from any application as any standard Windows DLL library. The job of the developer is to:
Here is the detailed algorithm for using SM8OPT.DLL:
Here is the definition of ItemOptimizationData record:
TItemOptimizationData=record
Today:word; {relative to the first day of the learning process. On the first day, Today=1}
Grade:byte; {grade from 0 to 5, where 5 is the best grade}
FirstGrade:byte; {first grade ever obtained by the item during its first repetition}
LastRepetition,NextRepetition:integer; {relative to the first day of the process}
OldInterval,UsedInterval,OptimumInterval,NewInterval:integer;
Repetitions,NewRepetitions:byte;
Lapses,NewLapses:byte;
RequestedFI:byte;
Ordinal:real;
AFactor,NewAFactor:real;
UFactor,NewUFactor:real;
OldRF,NewRF,OldOF,NewOF:real;
Cases:word;
EstimatedFI,ExpectedFI:real;
NormalizedGrade,NGMin,NGMax:real;
RepetitionsCategory:real;
end;
The only fields that are indeed needed by the developer are: Today, Grade and NextRepetition. Other fields can be used for diagnostic or information purposes. Today and NextRepetition are counted relative to the first day of the process. It is on the first day of learning, Today=1, and the repetition takes place on the date on which NextRepetition=Today. Note that LastRepetition and NextRepetition values may be negative in cases where items have been transferred from another system that was created before the initialization of the system in use.
As some of the fields of ItemOptimizationData are computed anew, only a subset of TItemOptimizationData has to be stored in a file. Developers that would want to save disk space may note that only the following fields have to be stored: FirstGrade, LastRepetition, OldInterval, Repetitions, Lapses, RequestedFI, Ordinal, AFactor, and UFactor. Most notably, NextRepetition does not have to be stored as it can be derived from NextRepetition=LastRepetition+OldInterval. After a repetition, new values of those fields have to read from: NewInterval, NewRepetitions, NewLapses, NewAFactor and NewUFactor. The new value of LastRepetition equals Today. The definition of TOptimizationRecord is not presented here as it is quite meaningless without understanding the details of the repetition spacing algorithm denoted Algorithm-SM8.
The use of GetOptimizationRecordSize and GetItemOptimizationDataSize is obligatory as in future releases of SM8OPT.DLL, the size of the optimization data may change. Obviously, there will be no change to the present structure apart from adding new fields taking part in enhanced optimization. For example, the RepetitionCategory has been introduced in December 1996 in a new release of Algorithm SM8 in which interval categories instead of repetition numbers are used to index the matrix of optimal factors. This prevents fooling the algorithm in cases the actual repetition takes place long after the scheduled optimum date.
In addition, SM8OPT.DLL exports
the following function that may be of use for developers
interested in implementing repetition rescheduling mechanisms:
function ComputeMercyOrdinal(IOD:PItemOptimizationData;ScheduleLength:word):longint;
This function produces and ordinal number from
ItemOptimizationData and the proposed length of the rescheduling
period. Such ordinals can be used in sorting items for
rescheduling. The ordinals range from 0 to 10000 and items with
low ordinals should be scheduled first. SM8OPT.DLL is also
available as a Delphi DCU unit file for incorporation in Delphi
executables.
Here is the list of all procedures published in SM8OPT.DLL:
You can download encrypted SM8OPT.DLL from this site. To do this: