mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Different searchedMoves system
After 8751 games on russian cluster Mod- Orig: 1426 - 1323 - 6002 ELO +4 (+- 2.9) LOS 86% Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
79b1a7417f
commit
a8f457d425
1 changed files with 12 additions and 10 deletions
|
@ -793,7 +793,7 @@ namespace {
|
||||||
Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific
|
Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific
|
||||||
bool isPvMove, isCheck, singleEvasion, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous;
|
bool isPvMove, isCheck, singleEvasion, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous;
|
||||||
bool mateThreat = false;
|
bool mateThreat = false;
|
||||||
int moveCount = 0;
|
int moveCount = 0, playedMoveCount = 0;
|
||||||
int threadID = pos.thread();
|
int threadID = pos.thread();
|
||||||
SplitPoint* sp = NULL;
|
SplitPoint* sp = NULL;
|
||||||
|
|
||||||
|
@ -1027,7 +1027,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
else if (move == excludedMove)
|
else if (move == excludedMove)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
movesSearched[moveCount++] = move;
|
moveCount++;
|
||||||
|
|
||||||
if (Root)
|
if (Root)
|
||||||
{
|
{
|
||||||
|
@ -1142,6 +1142,9 @@ split_point_start: // At split points actual search starts from here
|
||||||
// Step 13. Make the move
|
// Step 13. Make the move
|
||||||
pos.do_move(move, st, ci, moveIsCheck);
|
pos.do_move(move, st, ci, moveIsCheck);
|
||||||
|
|
||||||
|
if (!SpNode && !captureOrPromotion)
|
||||||
|
movesSearched[playedMoveCount++] = move;
|
||||||
|
|
||||||
// Step extra. pv search (only in PV nodes)
|
// Step extra. pv search (only in PV nodes)
|
||||||
// The first move in list is the expected PV
|
// The first move in list is the expected PV
|
||||||
if (isPvMove)
|
if (isPvMove)
|
||||||
|
@ -1321,7 +1324,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
if ( bestValue >= beta
|
if ( bestValue >= beta
|
||||||
&& !pos.move_is_capture_or_promotion(move))
|
&& !pos.move_is_capture_or_promotion(move))
|
||||||
{
|
{
|
||||||
update_history(pos, move, depth, movesSearched, moveCount);
|
update_history(pos, move, depth, movesSearched, playedMoveCount);
|
||||||
update_killers(move, ss->killers);
|
update_killers(move, ss->killers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1833,8 +1836,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
|
|
||||||
assert(m != move);
|
assert(m != move);
|
||||||
|
|
||||||
if (!pos.move_is_capture_or_promotion(m))
|
H.update(pos.piece_on(move_from(m)), move_to(m), -bonus);
|
||||||
H.update(pos.piece_on(move_from(m)), move_to(m), -bonus);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1844,11 +1846,11 @@ split_point_start: // At split points actual search starts from here
|
||||||
|
|
||||||
void update_killers(Move m, Move killers[]) {
|
void update_killers(Move m, Move killers[]) {
|
||||||
|
|
||||||
if (m == killers[0])
|
if (m != killers[0])
|
||||||
return;
|
{
|
||||||
|
killers[1] = killers[0];
|
||||||
killers[1] = killers[0];
|
killers[0] = m;
|
||||||
killers[0] = m;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue