diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-09-08 08:47:24 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-09-08 08:47:24 +0200 |
commit | 188c3c1ef073187cfb957dd5afe1aa0e7c2b6a33 (patch) | |
tree | 8ff2515b468832cee7cddabbf50b024d58a991a2 /src/bin/perf-test.rs | |
parent | 90a7c7d34def7e5f92f2cd521fdc014e0cbd9906 (diff) |
Put selection of full monte carlo tree behind a feature flag
Diffstat (limited to 'src/bin/perf-test.rs')
-rw-r--r-- | src/bin/perf-test.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bin/perf-test.rs b/src/bin/perf-test.rs index da7a0a5..ee0c2be 100644 --- a/src/bin/perf-test.rs +++ b/src/bin/perf-test.rs @@ -10,10 +10,6 @@ const STATE_PATH: &str = "tests/state0.json"; use std::process; fn main() { - bitwise(); -} - -fn bitwise() { println!("Running bitwise engine"); let start_time = PreciseTime::now(); let state = match input::json::read_bitwise_state_from_file(STATE_PATH) { @@ -24,5 +20,7 @@ fn bitwise() { } }; let max_time = Duration::milliseconds(MAX_TIME_MILLIS); - strategy::monte_carlo::choose_move(&state, start_time, max_time); + + #[cfg(feature = "full-monte-carlo-tree")] strategy::monte_carlo_tree::choose_move(&state, start_time, max_time); + #[cfg(not(feature = "full-monte-carlo-tree"))] strategy::monte_carlo::choose_move(&state, start_time, max_time); } |