Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 3, 2023
1 parent 9b48ccc commit c0df44d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cathedral_rl/game/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cathedral_rl/game/cathedral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion cathedral_rl/game/manual_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit c0df44d

Please sign in to comment.