mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Space inflate extension() code
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
13d1776a98
commit
0936a96a0e
1 changed files with 27 additions and 18 deletions
|
@ -1997,26 +1997,35 @@ namespace {
|
||||||
|
|
||||||
Depth extension(const Position &pos, Move m, bool pvNode,
|
Depth extension(const Position &pos, Move m, bool pvNode,
|
||||||
bool check, bool singleReply, bool mateThreat) {
|
bool check, bool singleReply, bool mateThreat) {
|
||||||
|
|
||||||
Depth result = Depth(0);
|
Depth result = Depth(0);
|
||||||
|
|
||||||
if(check)
|
if (check)
|
||||||
result += CheckExtension[pvNode];
|
result += CheckExtension[pvNode];
|
||||||
if(singleReply)
|
|
||||||
result += SingleReplyExtension[pvNode];
|
if (singleReply)
|
||||||
if(pos.move_is_pawn_push_to_7th(m))
|
result += SingleReplyExtension[pvNode];
|
||||||
result += PawnPushTo7thExtension[pvNode];
|
|
||||||
if(pos.move_is_passed_pawn_push(m))
|
if (pos.move_is_pawn_push_to_7th(m))
|
||||||
result += PassedPawnExtension[pvNode];
|
result += PawnPushTo7thExtension[pvNode];
|
||||||
if(mateThreat)
|
|
||||||
result += MateThreatExtension[pvNode];
|
if (pos.move_is_passed_pawn_push(m))
|
||||||
if(pos.midgame_value_of_piece_on(move_to(m)) >= RookValueMidgame
|
result += PassedPawnExtension[pvNode];
|
||||||
&& (pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
|
|
||||||
- pos.midgame_value_of_piece_on(move_to(m)) == Value(0))
|
if (mateThreat)
|
||||||
&& !move_promotion(m))
|
result += MateThreatExtension[pvNode];
|
||||||
result += PawnEndgameExtension[pvNode];
|
|
||||||
if(pvNode && pos.move_is_capture(m)
|
if ( pos.midgame_value_of_piece_on(move_to(m)) >= RookValueMidgame
|
||||||
&& pos.type_of_piece_on(move_to(m)) != PAWN && pos.see(m) >= 0)
|
&& ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
|
||||||
result += OnePly/2;
|
- pos.midgame_value_of_piece_on(move_to(m)) == Value(0))
|
||||||
|
&& !move_promotion(m))
|
||||||
|
result += PawnEndgameExtension[pvNode];
|
||||||
|
|
||||||
|
if ( pvNode
|
||||||
|
&& pos.move_is_capture(m)
|
||||||
|
&& pos.type_of_piece_on(move_to(m)) != PAWN
|
||||||
|
&& pos.see(m) >= 0)
|
||||||
|
result += OnePly/2;
|
||||||
|
|
||||||
return Min(result, OnePly);
|
return Min(result, OnePly);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue