Added reduced time flag
authorJustin Worthe <justin@worthe-it.co.za>
Sat, 9 Jun 2018 09:00:27 +0000 (11:00 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Sat, 9 Jun 2018 09:00:27 +0000 (11:00 +0200)
Cargo.toml
src/main.rs

index 4c11e57..b215a34 100644 (file)
@@ -16,3 +16,4 @@ rayon = "1.0.1"
 benchmarking = []
 single-threaded = []
 energy-cutoff = []
+reduced-time = []
index e84e207..6434c9d 100644 (file)
@@ -16,7 +16,9 @@ use std::io::prelude::*;
 use std::process;
 
 fn choose_move(settings: &engine::settings::GameSettings, state: &engine::GameState, start_time: &PreciseTime) -> Command {
-    let max_time = Duration::milliseconds(1950);
+    #[cfg(not(feature = "reduced-time"))] let max_time = Duration::milliseconds(1950);
+    #[cfg(feature = "reduced-time")] let max_time = Duration::milliseconds(950);
+    
     strategy::monte_carlo::choose_move(settings, state, start_time, max_time)
 }