diff options
Diffstat (limited to 'src/strategy/mcts.rs')
-rw-r--r-- | src/strategy/mcts.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/strategy/mcts.rs b/src/strategy/mcts.rs index b7478b8..dc6a5a3 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(), @@ -188,10 +188,11 @@ fn best_player_move(node: &Node) -> Command { } fn score(state: &GameBoard) -> Score { + // TODO: Try adding new features here, like max worm health, weighted in some way Score { val: match state.outcome { - SimulationOutcome::PlayerWon(0) => 500., - SimulationOutcome::PlayerWon(1) => -500., + SimulationOutcome::PlayerWon(0) => 3000., + SimulationOutcome::PlayerWon(1) => -3000., _ => (state.players[0].score() - state.players[1].score()) as f32, }, } |