Skip to content

Commit d50b33c

Browse files
committed
Fix a silly unstoppable eval bug
The logic is broken for black side because we get more bonus for pawn in 7th rank than for pawn in 2nd rank! Spotted by Reuven Peleg bench:3884409
1 parent 77b5ee0 commit d50b33c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evaluate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
906906
if (!b || pos.non_pawn_material(~us))
907907
return SCORE_ZERO;
908908

909-
return Unstoppable * int(relative_rank(WHITE, frontmost_sq(us, b)));
909+
return Unstoppable * int(relative_rank(us, frontmost_sq(us, b)));
910910
}
911911

912912

0 commit comments

Comments
 (0)