Specification of SuperMemo 2 I'm confused about the exact specification of the SuperMemo2 algorithm for spaced repetition learning, as explained here. After each repetition, the E-Factor has to be updated like so:
\begin{equation}
  \text{EF}_\text{new} := \max \{1.3, \text{EF}_\text{old}+(0.1-(5-q)(0.08+(5-q)0.02))\},
\end{equation}
where $q$ is the quality of response on a 0 to 5 scale. The interval $I_\text{new}$ until the next repetition is supposed to be
\begin{equation}
  I_\text{new} = I_\text{old} \cdot \text{EF},
\end{equation}
but the specification does not explain whether to use the old or the new value of $\text{EF}$. Which one is it?

The implementations I found readable seem to be wrong in other places, so I'm not very confident that they are a reliable source on this issue.
$EF$ is the "easiness factor". This means that the greater easiness you have, the longer will be the interval to next review ($I_\text{new}$).

So if you will use the old $EF$, the new interval value will not take into account your last review quality, which makes less sense IMO.

For the other hand, as I can see in the original implementation of algorithm, they calculate the interval first and then they calculate the easiness:

procedure Repetition(ElementNo,Grade:longint;var NextInterval:longint;commit:WordBool);
  var DataRecord:TDataRecord;
  begin
    DataRecord:=GetDataRecord(ElementNo);

    with DataRecord do
    begin
      if Grade&gt;=3 then
      begin
        if Repetition=0 then
        begin
          Interval:=1;
          Repetition:=1;
        end
        else if Repetition=1 then
        begin
          Interval:=6;
          Repetition:=2;
        end
        else begin
          Interval:=round(Interval*EF);
          Repetition:=Repetition+1;
        end;
      end
      else begin
        Repetition:=0;
        Interval:=1;
      end;

      EF:=EF+(0.1-(5-Grade)*(0.08+(5-Grade)*0.02));

      if EF&lt;1.3 then
        EF:=1.3;
        NextInterval:=Interval;
      end;

      if commit then
        SetDataRecord(ElementNo,DataRecord);
      end;


The same is in the specification: they calculate next interval at step 3 and $EF$ is calculated at step 5.

I'd like to understand what all these magic coefficients mean and how they were found, but unfortunately didn't find this information.