From 826ab69037e9d680a60b4267201f6d7a33ae39f2 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 30 Jun 2018 13:33:36 +0200 Subject: Removed deconstruction from the list of commands considered I don't think deconstruction is a necessary part of a viable strategy for now. --- src/strategy/monte_carlo.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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 } } -- cgit v1.2.3