]> git.sesse.net Git - stockfish/commit
Pick best moves one per cycle instead of sorting
authorMarco Costalba <mcostalba@gmail.com>
Tue, 20 Oct 2009 10:38:20 +0000 (11:38 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 22 Oct 2009 06:18:41 +0000 (07:18 +0100)
commitcf4df0327a3f30be345b0e9685b095be79e47cae
treec94bea7a381ae1584fcd75e740ec9ce6fb0bda46
parent51c3af9dd01951cf23f17c5f7c6cb9f7c32dccdc
Pick best moves one per cycle instead of sorting

When the move list is very small, like captures normally
are, it is faster to pick the best move with a linear
scan, one per cycle.

This has the added advantage that the picked capture move is
very possibly a cut-off move, so that other searches are
avoided. For non-captures it is still faster to sort in
advance.

Because scan-and-pick alghortim is not stable, node count
has changed.

After 885 games at 1+0
Mod vs Orig +196 =510 -179 50.96%  451.0/885

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/move.h
src/movepick.cpp