]> git.sesse.net Git - stockfish/commitdiff
Reimplement support for "searchmoves" option
authorJoona Kiiski <joona.kiiski@gmail.com>
Sun, 31 Jul 2011 12:18:52 +0000 (15:18 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 2 Aug 2011 05:47:22 +0000 (06:47 +0100)
No functional change

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

index c4613ccd07e2ca23d639f8297e7602b336db7a88..bac1691bf6edd9f9d768160f7b4adb3567089649 100644 (file)
@@ -953,6 +953,10 @@ split_point_start: // At split points actual search starts from here
       if (move == excludedMove)
           continue;
 
       if (move == excludedMove)
           continue;
 
+      // At root obey the "searchmoves" option and skip moves not listed in Root Move List
+      if (RootNode && !Rml.find(move))
+          continue;
+
       // At PV and SpNode nodes we want all moves to be legal since the beginning
       if ((PvNode || SpNode) && !pos.pl_move_is_legal(move, ci.pinned))
           continue;
       // At PV and SpNode nodes we want all moves to be legal since the beginning
       if ((PvNode || SpNode) && !pos.pl_move_is_legal(move, ci.pinned))
           continue;