summaryrefslogtreecommitdiff
path: root/src/strategy
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 /src/strategy
parente95f3370c6d0a4a5ec87bff23ab7981e8f447540 (diff)
Disable logs and release assertions for release
Diffstat (limited to 'src/strategy')
-rw-r--r--src/strategy/mcts.rs6
-rw-r--r--src/strategy/minimax.rs4
2 files changed, 5 insertions, 5 deletions
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)",