I am reading the following file, that explain the Nelder-Mead optimization Algorithm.(Algorithm Below) Where $B$ is the best point, $G$ second best point, $W$ is the worst point, $R$ reflection point. Why in Case(i) $W$ is replaced by $R$ ?
Assuming that $f(R)<f(G)$ than we go in $Case(i)$. If $f(B) < f(R)$ is true, than $f(B)<f(R)<f(G)$, in other words $R$ is better choice than $G$, but worst than $B$. According to the algorithm, $R$ should replace $W$, which doesn't make sense. Either the paper has an error, or I don't understand something.