From 97880f6a368085e9a409f1fb0030791a4a65005c Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 12 May 2018 17:39:06 +0200 Subject: Initial stab at monte carlo implementation Doesn't seem to be working quite right... just sits there accumulating energy. --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 7b3a62c..e5dc3aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use std::io::prelude::*; use std::process; fn choose_move(settings: &engine::settings::GameSettings, state: &engine::GameState) -> Command { - strategy::sample::choose_move(settings, state) + strategy::monte_carlo::choose_move(settings, state) } @@ -25,10 +25,11 @@ fn write_command(filename: &str, command: Command) -> Result<(), Box > { fn main() { + println!("Reading in state.json file"); let (settings, state) = match json::read_state_from_file(STATE_PATH) { Ok(ok) => ok, Err(error) => { - eprintln!("Error while parsing JSON file: {}", error); + println!("Error while parsing JSON file: {}", error); process::exit(1); } }; @@ -37,7 +38,7 @@ fn main() { match write_command(COMMAND_PATH, command) { Ok(()) => {} Err(error) => { - eprintln!("Error while writing command file: {}", error); + println!("Error while writing command file: {}", error); process::exit(1); } } -- cgit v1.2.3