mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Fix trapped rook condition
A rook is trapped if on rank 1 as is the king. Currently the condition aloows for the rook to be also in front of the pawns as long as king is on first rank. Verified with short TC test: LLR: -1.71 (-2.94,2.94) Total: 23234 W: 4317 L: 4317 D: 14600 Here what it counts is that after 23K games result is equal. bench: 4696542
This commit is contained in:
parent
3b92159908
commit
9fc77bc414
1 changed files with 1 additions and 1 deletions
|
@ -651,7 +651,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
|||
bool left = file_of(ksq) < FILE_E;
|
||||
|
||||
if ( ((left && file_of(s) < file_of(ksq)) || (!left && file_of(s) > file_of(ksq)))
|
||||
&& (relative_rank(Us, ksq) == RANK_1 || rank_of(ksq) == rank_of(s))
|
||||
&& (relative_rank(Us, ksq) == RANK_1 && rank_of(ksq) == rank_of(s))
|
||||
&& (!ei.pi->has_open_file_on_side(Us, file_of(ksq), left)))
|
||||
score -= make_score(pos.can_castle(Us) ? (TrappedRookPenalty - mob * 16) / 2
|
||||
: (TrappedRookPenalty - mob * 16), 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue