Skip to content

Commit 4844606

Browse files
committed
Small calc_tapered_psqt_eval bugfix
1 parent c52bf48 commit 4844606

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/algorithms/the_algorithm.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ impl Algorithm {
239239
}
240240

241241
if utils::module_enabled(self.modules, modules::TAPERED_INCREMENTAL_PESTO_PSQT) {
242-
let material_each_side = utils::material_each_side(board);
243242
fn calc_increment(
244243
piece_type: Piece,
245244
location: usize,
@@ -507,7 +506,7 @@ impl Algorithm {
507506
if utils::module_enabled(self.modules, modules::TAPERED_EVERY_PESTO_PSQT) {
508507
for i in 0..5 {
509508
mg_tapered_pesto += Self::calc_tapered_psqt_eval(board, i, true);
510-
eg_tapered_pesto += Self::calc_tapered_psqt_eval(board, 0, false);
509+
eg_tapered_pesto += Self::calc_tapered_psqt_eval(board, i, false);
511510
}
512511
tapered_pesto = ((material_each_side.0 + material_each_side.1 - 2 * piece_value(Piece::King)) as f32 * mg_tapered_pesto +
513512
(78 - (material_each_side.0 + material_each_side.1 - 2 * piece_value(Piece::King))) as f32 * eg_tapered_pesto)

src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pub(crate) const PRINT_GAME: bool = false;
2121
async fn main() {
2222
//ALPHA_BETA | ANALYZE | SEARCH_EXTENSIONS | SKIP_BAD_MOVES | SQUARE_CONTROL_METRIC | TRANSPOSITION_TABLE | NAIVE_PSQT | PAWN_STRUCTURE | TAPERED_EVERY_PESTO_PSQT | TAPERED_INCREMENTAL_PESTO_PSQT
2323
//Put 0 for no modules.
24-
let modules1 = ALPHA_BETA | TAPERED_INCREMENTAL_PESTO_PSQT;
24+
let modules1 = ALPHA_BETA | TAPERED_EVERY_PESTO_PSQT;
2525
let modules2 = ALPHA_BETA;
26-
let time_per_move1 = Duration::from_micros(2000);
26+
let time_per_move1 = Duration::from_micros(4000);
2727
let time_per_move2 = Duration::from_micros(2000);
2828

2929
let competition = Competition::new(

0 commit comments

Comments
 (0)