Skip to content

Commit c1ab291

Browse files
authored
Correct value for capture of promoted piece in SEE (#892)
STC Elo | 0.16 +- 1.23 (95%) SPRT | 8.0+0.08s Threads=1 Hash=16MB LLR | 2.94 (-2.25, 2.89) [-2.75, 0.25] Games | N: 75746 W: 19117 L: 19083 D: 37546 Penta | [175, 8595, 20309, 8609, 185] https://recklesschess.space/test/13471/ LTC Elo | 0.26 +- 1.25 (95%) SPRT | 40.0+0.40s Threads=1 Hash=64MB LLR | 2.96 (-2.25, 2.89) [-2.75, 0.25] Games | N: 66422 W: 16391 L: 16342 D: 33689 Penta | [20, 7364, 18402, 7397, 28] https://recklesschess.space/test/13484/ Bench: 3135368
1 parent 56ce430 commit c1ab291

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/board/see.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ impl super::Board {
2121
}
2222

2323
// In the worst case, we lose a piece, but still end up with a non-negative balance
24-
balance -= self.piece_on(mv.from()).value();
25-
26-
if mv.is_promotion() {
27-
balance -= mv.promo_piece_type().value();
28-
}
24+
balance -= if mv.is_promotion() { mv.promo_piece_type().value() } else { self.piece_on(mv.from()).value() };
2925

3026
if balance >= 0 {
3127
return true;

0 commit comments

Comments
 (0)