gym-examples 3.0.146__py3-none-any.whl → 3.0.148__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gym_examples/__init__.py +1 -1
- gym_examples/envs/wsn_env.py +3 -15
- {gym_examples-3.0.146.dist-info → gym_examples-3.0.148.dist-info}/METADATA +1 -1
- gym_examples-3.0.148.dist-info/RECORD +7 -0
- gym_examples-3.0.146.dist-info/RECORD +0 -7
- {gym_examples-3.0.146.dist-info → gym_examples-3.0.148.dist-info}/WHEEL +0 -0
- {gym_examples-3.0.146.dist-info → gym_examples-3.0.148.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -63,21 +63,8 @@ class WSNRoutingEnv(gym.Env):
|
|
63
63
|
tuple([self._get_observation_space() for _ in range(self.n_sensors)])
|
64
64
|
)
|
65
65
|
|
66
|
-
#
|
67
|
-
|
68
|
-
# flatdim = flatdim(sa_obs)
|
69
|
-
# ma_spaces += [
|
70
|
-
# Box(
|
71
|
-
# low=-float("inf"),
|
72
|
-
# high=float("inf"),
|
73
|
-
# shape=(flatdim,),
|
74
|
-
# dtype=np.float32,
|
75
|
-
# )
|
76
|
-
# ]
|
77
|
-
|
78
|
-
# self.observation_space = Tuple(tuple(ma_spaces))
|
79
|
-
|
80
|
-
self.action_space = Tuple(tuple([Discrete(self.n_sensors + 1)] * self.n_agents))
|
66
|
+
# self.action_space = Tuple(tuple([Discrete(self.n_sensors + 1)] * self.n_agents))
|
67
|
+
self.action_space = MultiDiscrete([self.n_sensors + 1] * self.n_agents)
|
81
68
|
|
82
69
|
self.reset()
|
83
70
|
|
@@ -105,6 +92,7 @@ class WSNRoutingEnv(gym.Env):
|
|
105
92
|
return self._get_obs()
|
106
93
|
|
107
94
|
def step(self, actions):
|
95
|
+
actions = [actions[i] for i in range(self.n_agents)] # We want to go back from the MultiDiscrete action space to a tuple of tuple of Discrete action spaces
|
108
96
|
self.steps += 1
|
109
97
|
rewards = [0] * self.n_sensors
|
110
98
|
dones = [False] * self.n_sensors
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=IlnZ_0e4AP1k2ct4O3HPj5K_oaavvqj_VwICAkg2TGw,194
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=AQ-FerU-hEA1v_nicGCXswgOUNbkHopk61pQr8XISVo,21774
|
4
|
+
gym_examples-3.0.148.dist-info/METADATA,sha256=Ehh19XtMuLbMAnnT5ykQTTIPCF_R_Ucwp_kLUjmU1lk,412
|
5
|
+
gym_examples-3.0.148.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-3.0.148.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-3.0.148.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=anDsRskLOycse3wMRWyNzOSpxskQvDZZCiMR1gfuuMQ,194
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=Ua2WRjOlSuhzv4dT9tas9W5GRtsDt1xute41vlly6ng,21964
|
4
|
-
gym_examples-3.0.146.dist-info/METADATA,sha256=-xf18Mf1GMaJqi9v8SA12fi3tYfrWX1phQDWc-Zjcw8,412
|
5
|
-
gym_examples-3.0.146.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-3.0.146.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-3.0.146.dist-info/RECORD,,
|
File without changes
|
File without changes
|