Skip to content

Commit

Permalink
Merge branch 'v1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Dec 2, 2022
2 parents 87ffd75 + 24de990 commit aacc9ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion luxai2022/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit aacc9ef

Please sign in to comment.