Generate pseudo-legal moves in generate_evasions()

This allow a big semplification in move generation
that will be committed with the next patch. And makes
handling of evasions similar to the other type of moves.

This patch plus the next seem to improve also on
the performance side because after 640 games to
verify there are no hidden regressions we are at +9 ELO

Verified with perft no functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-11-02 18:27:26 +01:00
parent 53c2bf0697
commit deecb3757c
3 changed files with 62 additions and 62 deletions

View File

@@ -318,11 +318,16 @@ Move MovePicker::get_next_move() {
return move;
break;
case PH_EVASIONS:
case PH_BAD_CAPTURES:
move = pick_best(curMove++, lastMove).move;
return move;
case PH_EVASIONS:
move = pick_best(curMove++, lastMove).move;
if (pos.pl_move_is_legal(move, pinned))
return move;
break;
case PH_QCAPTURES:
move = pick_best(curMove++, lastMove).move;
if ( move != ttMoves[0].move