Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Feb 14, 2023
1 parent dc1048a commit ed81656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions luxai_s2/luxai_runner/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def main():
parser.add_argument(
"-v",
"--verbose",
help="Verbose Level (0 = silent, 1 = errors + debug logs from agents, 2 = warnings, 3 = info)",
help="Verbose Level (0 = silent, 1 = (game-ending errors, debug logs from agents), 2 = warnings (non-game ending invalid actions), 3 = info (system info, unit collisions) )",
type=int,
default=1,
default=2,
)
parser.add_argument(
"-s",
Expand Down
7 changes: 3 additions & 4 deletions luxai_s2/luxai_s2/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,9 @@ def _handle_nobidding_early_game(self, actions):
faction=FactionTypes[a["faction"]],
)
if len(a["spawns"]) > self.state.board.factories_per_team:
if self.env_cfg.verbose > 0:
self.log_warning(
f"{k} tried to spawn more factories than allocated in board.factories_per_team. Spawning only the first {self.state.board.factories_per_team} locations"
)
self.log_warning(
f"{k} tried to spawn more factories than allocated in board.factories_per_team. Spawning only the first {self.state.board.factories_per_team} locations"
)
for spawn_loc in a["spawns"][: self.state.board.factories_per_team]:
self.add_factory(self.state.teams[k], spawn_loc)
else:
Expand Down

0 comments on commit ed81656

Please sign in to comment.