Skip to content

Commit 8dd7712

Browse files
authored
Merge pull request openai#7 from rzilleruelo/fixes_to_run_interactive_scenarios
Fixes to run interactive scenarios
2 parents d14ec17 + fd40c4e commit 8dd7712

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__pycache__/
2+
*.egg-info/
3+

multiagent/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _get_obs(self, agent):
129129
def _get_reward(self, agent):
130130
if self.reward_callback is None:
131131
return 0.0
132-
self.reward_callback(agent, self.world)
132+
return self.reward_callback(agent, self.world)
133133

134134
# set env action for a particular agent
135135
def _set_action(self, action, agent, action_space, time=None):

multiagent/scenarios/simple_crypto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def reset_world(self, world):
5252
agent.color = np.array([0.75, 0.25, 0.25])
5353
agent.key = None
5454
# random properties for landmarks
55-
color_list = [np.zeros(world.dim_c) for i in world.landmarks]
55+
color_list = [np.zeros(3) for i in world.landmarks]
5656
for i, color in enumerate(color_list):
5757
color[i] += 1
5858
for color, landmark in zip(color_list, world.landmarks):

0 commit comments

Comments
 (0)