Skip to content

Commit 725abda

Browse files
committed
removed tensorflow dependency
1 parent 1e0e21c commit 725abda

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Used in the paper [Multi-Agent Actor-Critic for Mixed Cooperative-Competitive En
1010
- To interactively view moving to landmark scenario (see others in ./scenarios/):
1111
`bin/interactive.py --scenario simple.py`
1212

13-
- Known dependencies: OpenAI gym, numpy, tensorflow
13+
- Known dependencies: OpenAI gym, numpy
1414

1515
- To use the environments, look at the code for importing them in `make_env.py`.
1616

multiagent/environment.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from gym import spaces
33
from gym.envs.registration import EnvSpec
44
import numpy as np
5-
import tensorflow as tf
65

76
# environment for all agents in the multiagent world
87
# currently code assumes that no agents will be created/destroyed at runtime!
@@ -281,15 +280,6 @@ def _make_receptor_locations(self, agent):
281280
dx.append(np.array([x,y]))
282281
return dx
283282

284-
# construct receptive field activations for 'other' relative to root
285-
def _get_receptor_activations(self, entity_root, state_root, other_x_pos):
286-
activations = []
287-
for dx in self.receptor_locations:
288-
dx_pos = state_root.x_pos + dx - other_x_pos
289-
activations.append(tf.reduce_sum(tf.square(dx_pos), 1, keep_dims=True))
290-
activations = tf.concat(1, activations)
291-
#return tf.nn.softmax(-1e+1 * activations)
292-
return tf.exp(-activations / 1.0**2)
293283

294284
# vectorized wrapper for a batch of multi-agent environments
295285
# assumes all environments have the same observation and action space

0 commit comments

Comments
 (0)