diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-06-30 13:33:36 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-06-30 13:33:36 +0200 |
commit | 826ab69037e9d680a60b4267201f6d7a33ae39f2 (patch) | |
tree | 0d9efa63913580dde25f1ff9dc967e8e892bc55f /src | |
parent | 1c8d9ddad9884f0de117b7d91d3e1c4e256d5586 (diff) |
Removed deconstruction from the list of commands considered
I don't think deconstruction is a necessary part of a viable strategy
for now.
Diffstat (limited to 'src')
-rw-r--r-- | src/strategy/monte_carlo.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/strategy/monte_carlo.rs b/src/strategy/monte_carlo.rs index dbeac2f..ba4310d 100644 --- a/src/strategy/monte_carlo.rs +++ b/src/strategy/monte_carlo.rs @@ -159,10 +159,9 @@ impl CommandScore { let all_buildings = state.player.sensible_buildings(state.count_player_teslas() < 2, settings); let building_command_count = state.unoccupied_player_cells.len()*all_buildings.len(); - let deconstruct_count = (settings.size.x as usize *settings.size.y as usize / 2) - state.unoccupied_player_cells.len(); let nothing_count = 1; - let mut commands = Vec::with_capacity(building_command_count + deconstruct_count + nothing_count); + let mut commands = Vec::with_capacity(building_command_count + nothing_count); commands.push(CommandScore::new(Command::Nothing)); for &position in &state.unoccupied_player_cells { @@ -171,10 +170,6 @@ impl CommandScore { } } - for &position in &state.occupied_player_cells() { - commands.push(CommandScore::new(Command::Deconstruct(position))); - } - commands } } |