diff options
Diffstat (limited to 'src/bin/perf-test.rs')
-rw-r--r-- | src/bin/perf-test.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/perf-test.rs b/src/bin/perf-test.rs index 42b4def..81dc5a5 100644 --- a/src/bin/perf-test.rs +++ b/src/bin/perf-test.rs @@ -9,6 +9,12 @@ const STATE_PATH: &str = "tests/state0.json"; use std::process; fn main() { +// expressive(); + bitwise(); +} + +fn expressive() { + println!("Running expressive engine"); let start_time = PreciseTime::now(); let (settings, state) = match input::json::read_expressive_state_from_file(STATE_PATH) { Ok(ok) => ok, @@ -20,3 +26,17 @@ fn main() { let max_time = Duration::milliseconds(1950); strategy::monte_carlo::choose_move(&settings, &state, &start_time, max_time); } + +fn bitwise() { + println!("Running bitwise engine"); + let start_time = PreciseTime::now(); + let (settings, state) = match input::json::read_bitwise_state_from_file(STATE_PATH) { + Ok(ok) => ok, + Err(error) => { + println!("Error while parsing JSON file: {}", error); + process::exit(1); + } + }; + let max_time = Duration::milliseconds(1950); + strategy::monte_carlo::choose_move(&settings, &state, &start_time, max_time); +} |