mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Simplification to use only one counter move.
STC http://tests.stockfishchess.org/tests/view/5518dca30ebc5902160ec5d0 LLR: 2.95 (-2.94,2.94) [-3.50,0.50] Total: 18868 W: 3638 L: 3530 D: 11700 LTC http://tests.stockfishchess.org/tests/view/5518f7ed0ebc5902160ec5d4 LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 69767 W: 11019 L: 10973 D: 47775 Extracted from http://tests.stockfishchess.org/tests/view/5511028a0ebc5902160ec40b Original patch by hxim. All credit goes to him. Bench: 7664249 Resolves #320
This commit is contained in:
@@ -68,12 +68,12 @@ namespace {
|
||||
/// ordering is at the current node.
|
||||
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const HistoryStats& h, const CounterMovesHistoryStats& cmh,
|
||||
Move* cm, Search::Stack* s) : pos(p), history(h), counterMovesHistory(cmh), depth(d) {
|
||||
Move cm, Search::Stack* s) : pos(p), history(h), counterMovesHistory(cmh), depth(d) {
|
||||
|
||||
assert(d > DEPTH_ZERO);
|
||||
|
||||
endBadCaptures = moves + MAX_MOVES - 1;
|
||||
countermoves = cm;
|
||||
countermove = cm;
|
||||
ss = s;
|
||||
|
||||
if (pos.checkers())
|
||||
@@ -209,16 +209,12 @@ void MovePicker::generate_next_stage() {
|
||||
|
||||
killers[0] = ss->killers[0];
|
||||
killers[1] = ss->killers[1];
|
||||
killers[2].move = killers[3].move = MOVE_NONE;
|
||||
killers[2].move = MOVE_NONE;
|
||||
|
||||
// In SMP case countermoves[] could have duplicated entries
|
||||
// in rare cases (less than 1 out of a million). This is harmless.
|
||||
|
||||
// Be sure countermoves and followupmoves are different from killers
|
||||
for (int i = 0; i < 2; ++i)
|
||||
if ( countermoves[i] != killers[0]
|
||||
&& countermoves[i] != killers[1])
|
||||
*endMoves++ = countermoves[i];
|
||||
// Be sure countermoves are different from killers
|
||||
if ( countermove != killers[0]
|
||||
&& countermove != killers[1])
|
||||
*endMoves++ = countermove;
|
||||
break;
|
||||
|
||||
case QUIETS_1_S1:
|
||||
@@ -311,8 +307,7 @@ Move MovePicker::next_move<false>() {
|
||||
if ( move != ttMove
|
||||
&& move != killers[0]
|
||||
&& move != killers[1]
|
||||
&& move != killers[2]
|
||||
&& move != killers[3])
|
||||
&& move != killers[2])
|
||||
return move;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user