shummiev36-1-3.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:Halite 作者: shummie 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号