diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/perf-test.rs | 8 | ||||
-rw-r--r-- | src/main.rs | 3 |
2 files changed, 5 insertions, 6 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); } diff --git a/src/main.rs b/src/main.rs index 26d6eac..05b9546 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,8 @@ fn main() { }; // TODO: Opening playbook? - let command = strategy::monte_carlo::choose_move(&state, start_time, max_time); + #[cfg(feature = "full-monte-carlo-tree")] let command = strategy::monte_carlo_tree::choose_move(&state, start_time, max_time); + #[cfg(not(feature = "full-monte-carlo-tree"))] let command = strategy::monte_carlo::choose_move(&state, start_time, max_time); match write_command(COMMAND_PATH, command) { Ok(()) => {} |