@@ -88,6 +88,7 @@ namespace {
8888 Value DrawValue[COLOR_NB];
8989 History Hist;
9090 Gains Gain;
91+ RefutationTable Refutation;
9192
9293 template <NodeType NT>
9394 Value search (Position& pos, Stack* ss, Value alpha, Value beta, Depth depth);
@@ -305,6 +306,7 @@ namespace {
305306 TT.new_search ();
306307 Hist.clear ();
307308 Gain.clear ();
309+ Refutation.clear ();
308310
309311 PVSize = Options[" MultiPV" ];
310312 Skill skill (Options[" Skill Level" ]);
@@ -764,7 +766,12 @@ namespace {
764766
765767split_point_start: // At split points actual search starts from here
766768
767- MovePicker mp (pos, ttMove, depth, Hist, ss, PvNode ? -VALUE_INFINITE : beta);
769+ Move prevMove = (ss-1 )->currentMove ;
770+ Square prevSq = to_sq (prevMove);
771+ Piece prevP = pos.piece_on (prevSq);
772+ Move refutationMove = Refutation.get (prevP, prevSq);
773+
774+ MovePicker mp (pos, ttMove, depth, Hist, ss, refutationMove, PvNode ? -VALUE_INFINITE : beta);
768775 CheckInfo ci (pos);
769776 value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc
770777 singularExtensionNode = !RootNode
@@ -1090,6 +1097,7 @@ namespace {
10901097 // Increase history value of the cut-off move
10911098 Value bonus = Value (int (depth) * int (depth));
10921099 Hist.update (pos.piece_moved (bestMove), to_sq (bestMove), bonus);
1100+ // Refutation.update(prevP, prevSq, bestMove);
10931101
10941102 // Decrease history of all the other played non-capture moves
10951103 for (int i = 0 ; i < playedMoveCount - 1 ; i++)
0 commit comments