def update_value_production_map(self):
self.value_production_map = (self.border_map - self.combat_zone_map * (self.enemy_strength_map[1] == 0)) * self.recover_wtd_map
#self.value_production_map = (self.border_map - self.combat_zone_map) * self.recover_wtd_map
self.value_production_map[self.value_production_map == 0] = 9999
turns_left = self.max_turns - self.frame
recover_threshold = turns_left * 0.6
self.value_production_map[self.value_production_map > recover_threshold] == 9999
bx, by = np.unravel_index(self.value_production_map.argmin(), (self.width, self.height))
best_cell_value = self.value_production_map[bx, by]
avg_recov_threshold = 2
avg_map_recovery = np.sum(self.strength_map * self.border_map) / np.sum(self.production_map * self.border_map)
self.value_production_map[self.value_production_map > (avg_recov_threshold * avg_map_recovery)] = 9999
if self.frame > 5 and self.my_production_sum / self.next_highest_production_sum > 1.1 and np.sum(self.combat_zone_map) > 2:
self.value_production_map = np.ones((self.width, self.height)) * 9999
评论列表
文章目录