]> git.sesse.net Git - stockfish/commitdiff
Sort PV moves always in two steps
authorMarco Costalba <mcostalba@gmail.com>
Tue, 2 Aug 2011 08:53:56 +0000 (09:53 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 2 Aug 2011 17:00:47 +0000 (18:00 +0100)
This should fix following issue:

Suppose the search with MultiPVIteration == 0 returns an exact score

move = Nxf4, score = 100

Now search with MultiPVIteration == 1 and get two scores

move = Qg8, score = 150
move = Ra1, score = 180

If we now reorder all the moves in one step we end up with

pv[0] = Ra1, pv[1] = Qg8

Instead reordering as the current patch we end up in:

pv[0] = Ra1, pv[1] = Nxf4

preserving the first searched move.

No functional change in single PV.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found