File tree 4 files changed +16
-9
lines changed
4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ impl Algorithm {
284
284
}
285
285
incremental_psqt_eval += incremental_psqt_eval_change * multiplier as f32 ;
286
286
}
287
- best_evaluation. white_incremental_psqt_eval = Some ( incremental_psqt_eval) ;
287
+ best_evaluation. incremental_psqt_eval = Some ( incremental_psqt_eval) ;
288
288
}
289
289
290
290
if module_enabled ( self . modules , TRANSPOSITION_TABLE ) && depth >= 3 {
Original file line number Diff line number Diff line change @@ -22,21 +22,21 @@ pub(super) struct Evaluation {
22
22
pub ( super ) debug_data : Option < Vec < String > > ,
23
23
pub ( super ) eval : Option < f32 > ,
24
24
pub ( super ) next_action : Option < Action > ,
25
- pub ( super ) white_incremental_psqt_eval : Option < f32 > ,
25
+ pub ( super ) incremental_psqt_eval : Option < f32 > ,
26
26
}
27
27
28
28
impl Evaluation {
29
29
pub ( super ) fn new (
30
30
eval : Option < f32 > ,
31
31
next_action : Option < Action > ,
32
32
debug_data : Option < Vec < String > > ,
33
- white_incremental_psqt_eval : Option < f32 > ,
33
+ incremental_psqt_eval : Option < f32 > ,
34
34
) -> Evaluation {
35
35
Evaluation {
36
36
eval,
37
37
next_action,
38
38
debug_data,
39
- white_incremental_psqt_eval ,
39
+ incremental_psqt_eval ,
40
40
}
41
41
}
42
42
}
Original file line number Diff line number Diff line change @@ -14,11 +14,15 @@ mod algorithms;
14
14
mod common;
15
15
mod pitter;
16
16
17
+ //If we should print the moves played and results of each game.
18
+ pub ( crate ) const PRINT_GAME : bool = true ;
19
+
17
20
#[ tokio:: main]
18
21
async fn main ( ) {
19
22
//ALPHA_BETA | ANALYZE | SEARCH_EXTENSIONS | SKIP_BAD_MOVES | SQUARE_CONTROL_METRIC | TRANSPOSITION_TABLE | NAIVE_PSQT | PAWN_STRUCTURE | TAPERED_EVERY_PRESTO_PSQT | TAPERED_INCREMENTAL_PESTO_PSQT
20
- let modules1 = ALPHA_BETA | TAPERED_EVERY_PESTO_PSQT ;
21
- let modules2 = ALPHA_BETA | NAIVE_PSQT ;
23
+ //Put 0 for no modules.
24
+ let modules1 = ALPHA_BETA | TAPERED_INCREMENTAL_PESTO_PSQT ;
25
+ let modules2 = 0 ;
22
26
let time_per_move1 = Duration :: from_micros ( 2000 ) ;
23
27
let time_per_move2 = Duration :: from_micros ( 2000 ) ;
24
28
@@ -30,6 +34,6 @@ async fn main() {
30
34
// competition.analyze_algorithm_choices(|(game_info, _), _| {
31
35
// game_info.outcome == GameOutcome::InconclusiveTooLong
32
36
// });
33
- let results = competition. start_competition ( 50 ) . await ;
37
+ let results = competition. start_competition ( 200 ) . await ;
34
38
dbg ! ( results) ;
35
39
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use tokio::sync::Mutex;
8
8
use crate :: algorithms:: the_algorithm:: Algorithm ;
9
9
use crate :: common:: constants:: modules:: ANALYZE ;
10
10
use crate :: common:: utils:: { self , Stats } ;
11
+ use crate :: PRINT_GAME ;
11
12
12
13
pub ( crate ) struct Competition {
13
14
pub ( crate ) algo1 : Algorithm ,
@@ -241,8 +242,10 @@ impl Competition {
241
242
) ;
242
243
243
244
//Whether the game just played should be printed in console.
244
- //println!("Game pair played. Outcome: {:?}", combined_outcome);
245
- //println!("{}", utils::to_pgn(&game_pair_info.0.game.unwrap()));
245
+ if PRINT_GAME == true {
246
+ println ! ( "Game pair played. Outcome: {:?}" , combined_outcome) ;
247
+ println ! ( "{}" , utils:: to_pgn( & game_pair_info. 0 . game. unwrap( ) ) ) ;
248
+ }
246
249
247
250
results. lock ( ) . await . register_game_outcome ( combined_outcome) ;
248
251
You can’t perform that action at this time.
0 commit comments