diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f071bd2..326ea9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.1.0 hooks: - id: black - repo: https://github.com/codespell-project/codespell diff --git a/cathedral_rl/game/board.py b/cathedral_rl/game/board.py index 5e76014..4586a54 100644 --- a/cathedral_rl/game/board.py +++ b/cathedral_rl/game/board.py @@ -133,7 +133,7 @@ def check_territory(self, agent): placed_pieces.append((self.pieces[agent][14], agent, 14)) # Look through opponent pieces (and the cathedral) and try removing them - for (piece, piece_agent, piece_idx) in placed_pieces: + for piece, piece_agent, piece_idx in placed_pieces: self.squares = squares_real.copy() # Reset self.squares to original state for coord in piece.points: self.squares.reshape(10, 10)[coord[0], coord[1]] = 0 diff --git a/cathedral_rl/game/cathedral.py b/cathedral_rl/game/cathedral.py index 64217c3..4fd2eb5 100644 --- a/cathedral_rl/game/cathedral.py +++ b/cathedral_rl/game/cathedral.py @@ -104,7 +104,6 @@ def __init__( per_move_rewards: Optional[bool] = False, final_reward_score_difference: Optional[bool] = False, ): - super().__init__() self.screen = None self.render_mode = render_mode @@ -316,7 +315,6 @@ def step(self, action): self.truncations[self.agent_selection] or self.terminations[self.agent_selection] ): - return self._was_dead_step(action) # Check that it is a valid move diff --git a/cathedral_rl/game/manual_policy.py b/cathedral_rl/game/manual_policy.py index 0607b26..81d7d98 100644 --- a/cathedral_rl/game/manual_policy.py +++ b/cathedral_rl/game/manual_policy.py @@ -8,7 +8,6 @@ class ManualPolicy: def __init__(self, env, agent_id: int = 0, recorder: GIFRecorder = None): - self.env = env self.agent_id = agent_id self.agent = self.env.agents[self.agent_id]