summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2019-07-16 20:36:46 +0200
committerJustin Worthe <justin@worthe-it.co.za>2019-07-16 20:36:46 +0200
commit796fd3406ccd5c12f2aef72c603a4445a08fa27a (patch)
tree4f2f6475442751828c3c6142194a7214e7474374
parente95f3370c6d0a4a5ec87bff23ab7981e8f447540 (diff)
Disable logs and release assertions for release
-rw-r--r--Cargo.toml8
-rw-r--r--src/bin/benchmark.rs2
-rw-r--r--src/main.rs2
-rw-r--r--src/strategy/mcts.rs6
-rw-r--r--src/strategy/minimax.rs4
5 files changed, 11 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml
index ae7d46e..9b8f5c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ num-traits = "0.2.6"
arrayvec = "0.4.10"
fnv = "1.0.6"
-[profile.release]
-debug = true
-debug-assertions = true
-overflow-checks = true \ No newline at end of file
+# [profile.release]
+# debug = true
+# debug-assertions = true
+# overflow-checks = true \ No newline at end of file
diff --git a/src/bin/benchmark.rs b/src/bin/benchmark.rs
index 0cee8d6..52e360f 100644
--- a/src/bin/benchmark.rs
+++ b/src/bin/benchmark.rs
@@ -16,7 +16,7 @@ fn main() {
let _ = choose_move(&new_board, None, start_time, max_time);
}
Err(e) => {
- eprintln!("WARN: State file could not be parsed: {}", e);
+ //eprintln!("WARN: State file could not be parsed: {}", e);
}
};
}
diff --git a/src/main.rs b/src/main.rs
index 280df8a..03d08ff 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -40,7 +40,7 @@ fn main() {
}
},
Err(e) => {
- eprintln!("WARN: State file could not be parsed: {}", e);
+ //eprintln!("WARN: State file could not be parsed: {}", e);
Command::new(Action::DoNothing)
}
};
diff --git a/src/strategy/mcts.rs b/src/strategy/mcts.rs
index 0d1540e..26edf16 100644
--- a/src/strategy/mcts.rs
+++ b/src/strategy/mcts.rs
@@ -26,7 +26,7 @@ pub fn choose_move(
.map(|(_k, n)| n)
.find(|n| n.state == *state)
.unwrap_or_else(|| {
- eprintln!("Previous round did not appear in the cache");
+ //eprintln!("Previous round did not appear in the cache");
Node {
state: state.clone(),
score_sum: ScoreSum::new(),
@@ -41,9 +41,9 @@ pub fn choose_move(
let _ = mcts(&mut root_node);
}
- eprintln!("Number of simulations: {}", root_node.score_sum.visit_count);
+ //eprintln!("Number of simulations: {}", root_node.score_sum.visit_count);
for (command, score_sum) in &root_node.player_score_sums[0] {
- eprintln!(
+ //eprintln!(
"{} = {} ({} visits)",
command,
score_sum.avg().val,
diff --git a/src/strategy/minimax.rs b/src/strategy/minimax.rs
index 80d8246..699a4f6 100644
--- a/src/strategy/minimax.rs
+++ b/src/strategy/minimax.rs
@@ -25,7 +25,7 @@ pub fn choose_move(
.map(|(_k, n)| n)
.find(|_n| false) // TODO: Identify the last opponent move to use this cache
.unwrap_or_else(|| {
- eprintln!("Previous round did not appear in the cache");
+ //eprintln!("Previous round did not appear in the cache");
Node {
score_sum: ScoreSum::new(),
player_score_sums: [HashMap::new(), HashMap::new()],
@@ -39,7 +39,7 @@ pub fn choose_move(
let _ = expand_tree(&mut root_node, &state);
}
- eprintln!("Number of simulations: {}", root_node.score_sum.visit_count);
+ //eprintln!("Number of simulations: {}", root_node.score_sum.visit_count);
for (command, score_sum) in &root_node.player_score_sums[0] {
eprintln!(
"{} = {} ({} visits)",