From 188c3c1ef073187cfb957dd5afe1aa0e7c2b6a33 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 8 Sep 2018 08:47:24 +0200 Subject: Put selection of full monte carlo tree behind a feature flag --- src/bin/perf-test.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/bin') 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); } -- cgit v1.2.3