Skip to content

Commit 7893298

Browse files
authored
Add all noisy scoring into evasions and consolidate (#908)
The difference is probably mostly due to including normal scoring in evasions. Note scoring for in_check is an order of magnitude higher (intentionally). STC Elo | 4.47 +- 3.17 (95%) SPRT | 8.0+0.08s Threads=1 Hash=16MB LLR | 2.98 (-2.25, 2.89) [-2.75, 0.25] Games | N: 11960 W: 3099 L: 2945 D: 5916 Penta | [28, 1355, 3071, 1487, 39] https://recklesschess.space/test/13544/ LTC Elo | 4.52 +- 3.06 (95%) SPRT | 40.0+0.40s Threads=1 Hash=64MB LLR | 3.01 (-2.25, 2.89) [-2.75, 0.25] Games | N: 11308 W: 2876 L: 2729 D: 5703 Penta | [4, 1199, 3104, 1340, 7] https://recklesschess.space/test/13548/ Bench: 2900111
1 parent 3f5afc7 commit 7893298

1 file changed

Lines changed: 8 additions & 18 deletions

File tree

src/movepick.rs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,15 @@ impl MovePicker {
155155
fn score_noisy(&mut self, td: &ThreadData) {
156156
let threats = td.board.all_threats();
157157

158-
if td.board.in_check() {
159-
for entry in self.list.iter_mut() {
160-
let mv = entry.mv;
161-
let pt = td.board.piece_on(mv.from()).piece_type();
162-
163-
entry.score = 10000 - 1000 * pt as i32;
164-
}
165-
} else {
166-
for entry in self.list.iter_mut() {
167-
let mv = entry.mv;
168-
let captured = td.board.piece_on(mv.capture_sq()).piece_type();
169-
170-
entry.score =
171-
16 * captured.value() + td.noisy_history.get(threats, td.board.moved_piece(mv), mv.to(), captured);
158+
for entry in self.list.iter_mut() {
159+
let mv = entry.mv;
160+
let captured = td.board.piece_on(mv.capture_sq()).piece_type();
161+
let pt = td.board.piece_on(mv.from()).piece_type();
172162

173-
if mv.is_promotion() && mv.promo_piece_type() == PieceType::Queen {
174-
entry.score += 4000;
175-
}
176-
}
163+
entry.score = 16 * captured.value()
164+
+ td.noisy_history.get(threats, td.board.moved_piece(mv), mv.to(), captured)
165+
+ 4000 * (mv.is_promotion() && mv.promo_piece_type() == PieceType::Queen) as i32
166+
+ (100000 - 10000 * pt as i32) * td.board.in_check() as i32;
177167
}
178168
}
179169

0 commit comments

Comments
 (0)