Skip to content

Commit f57c141

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 36b42f3 commit f57c141

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

rl/wolf_sheep/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def step(self, action_dict):
134134
truncated['__all__'] = np.all(list(truncated.values()))
135135

136136
# All the agents that dies during this step are marked as done and rewarded penalty
137-
sample = next(iter(obs.values()))
137+
sample = next(iter(obs.values()))
138138
for agent_id in action_dict:
139139
if agent_id not in rewards:
140140
=======

rl/wolf_sheep/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def step(self):
8080
<<<<<<< HEAD
8181
if isinstance(agent, (SheepRL, WolfRL)):
8282
neighbors = agent.model.grid.get_neighborhood(agent.pos, moore=True, radius=self.vision)
83-
obs[agent.unique_id] = {'grid': np.array([self.obs_grid[neighbor[0]][neighbor[1]] for neighbor in neighbors]), 'energy': np.array([agent.energy])}
83+
obs[agent.unique_id] = {'grid': np.array([self.obs_grid[neighbor[0]][neighbor[1]] for neighbor in neighbors]), 'energy': np.array([agent.energy])}
8484
action_dict = {}
8585
# Get the action for each agent
8686
for agent in self.schedule.agents:
@@ -143,7 +143,7 @@ def wolf_sheep_portrayal(agent):
143143
portrayal["scale"] = 0.9
144144
portrayal["Layer"] = 1
145145
<<<<<<< HEAD
146-
146+
147147
elif type(agent) is WolfRL:
148148
=======
149149

0 commit comments

Comments
 (0)