diff --git a/ChangeLog.md b/ChangeLog.md index f0406e63..6f934541 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -35,6 +35,7 @@ Python Kits: - Added utility function to determine if it is your team's turn to place a factory or not Bug Fixes: +- Lichen water cost costed 1 extra - Fix bug where added rubble doesn't remove all lichen underneath - Fix bug where move center costs power - Fix extra line in stderr logging diff --git a/luxai2022/factory.py b/luxai2022/factory.py index d6820518..41dc6f13 100644 --- a/luxai2022/factory.py +++ b/luxai2022/factory.py @@ -117,7 +117,7 @@ def cache_water_info(self, board: Board, env_cfg: EnvConfig): init_arr = np.stack(deltas) + self.pos.pos self.grow_lichen_positions = compute_water_info(init_arr, env_cfg.MIN_LICHEN_TO_SPREAD, board.lichen, board.lichen_strains, self.num_id, forbidden) def water_cost(self, config: EnvConfig): - return int(np.ceil(len(self.grow_lichen_positions) / config.LICHEN_WATERING_COST_FACTOR) + 1) + return int(np.ceil(len(self.grow_lichen_positions) / config.LICHEN_WATERING_COST_FACTOR)) ### Add and sub resource functions copied over from unit.py code, can we consolidate them somewhere? def add_resource(self, resource_id, transfer_amount):