Can someone explain why the sort3 function produced by Alphadev is correct? The instruction that was removed was: `P=min(A,C)`, which means that `P=A` at that point. The next instructions: cmp S Q cmovg Q P with `S=min(A,C)` and `Q=B` can be translated into if S>Q: P=Q or if min(A,C)>B: P=B which means: if B is the smallest, then `P=B`. Otherwise P stays as before, meaning `P=A` for Alphadev and `P=min(A,C)` for the…
Apparently it just shows some algorithm that was modified and resulted in a different one, neither being a sorting algorithm, but the original still being better.
The text praises Alphadev by saying it makes "moves" that look like a mistake, but are actually brilliant. After that passage the code is shown that does not corroborate that statement, and just illustrates that Alphadev can make changes to code.