mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
TEST: extend when few moves available
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
a56e1c662c
commit
13d1776a98
1 changed files with 2 additions and 1 deletions
|
@ -931,6 +931,7 @@ namespace {
|
||||||
{
|
{
|
||||||
assert(move_is_ok(move));
|
assert(move_is_ok(move));
|
||||||
|
|
||||||
|
bool fewMoves = (depth <= OnePly && mp.number_of_moves() < 4);
|
||||||
bool singleReply = (pos.is_check() && mp.number_of_moves() == 1);
|
bool singleReply = (pos.is_check() && mp.number_of_moves() == 1);
|
||||||
bool moveIsCheck = pos.move_is_check(move, dcCandidates);
|
bool moveIsCheck = pos.move_is_check(move, dcCandidates);
|
||||||
bool moveIsCapture = pos.move_is_capture(move);
|
bool moveIsCapture = pos.move_is_capture(move);
|
||||||
|
@ -942,7 +943,7 @@ namespace {
|
||||||
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
||||||
|
|
||||||
// Decide the new search depth
|
// Decide the new search depth
|
||||||
Depth ext = extension(pos, move, true, moveIsCheck, singleReply, mateThreat);
|
Depth ext = extension(pos, move, true, moveIsCheck, singleReply || fewMoves, mateThreat);
|
||||||
Depth newDepth = depth - OnePly + ext;
|
Depth newDepth = depth - OnePly + ext;
|
||||||
|
|
||||||
// Make and search the move
|
// Make and search the move
|
||||||
|
|
Loading…
Add table
Reference in a new issue