gym-examples 3.0.265__py3-none-any.whl → 3.0.266__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 +4 -3
- {gym_examples-3.0.265.dist-info → gym_examples-3.0.266.dist-info}/METADATA +1 -1
- gym_examples-3.0.266.dist-info/RECORD +7 -0
- gym_examples-3.0.265.dist-info/RECORD +0 -7
- {gym_examples-3.0.265.dist-info → gym_examples-3.0.266.dist-info}/WHEEL +0 -0
- {gym_examples-3.0.265.dist-info → gym_examples-3.0.266.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -133,7 +133,8 @@ class WSNRoutingEnv(gym.Env):
|
|
133
133
|
def step(self, actions):
|
134
134
|
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
|
135
135
|
self.steps += 1
|
136
|
-
rewards = [-max_reward] * self.n_sensors
|
136
|
+
# rewards = [-max_reward] * self.n_sensors
|
137
|
+
rewards = [0] * self.n_sensors
|
137
138
|
dones = [False] * self.n_sensors
|
138
139
|
for i, action in enumerate(actions):
|
139
140
|
if action not in range(self.n_sensors + 1):
|
@@ -168,8 +169,8 @@ class WSNRoutingEnv(gym.Env):
|
|
168
169
|
self.packet_latency[i] = 0
|
169
170
|
|
170
171
|
# rewards[i] = self.compute_individual_rewards(i, action)
|
171
|
-
rewards[i] = np.ones(input_dim) * max_reward # Reward for transmitting data to the base station
|
172
|
-
|
172
|
+
# rewards[i] = np.ones(input_dim) * max_reward # Reward for transmitting data to the base station
|
173
|
+
rewards[i] = np.ones(input_dim) # Reward for transmitting data to the base station
|
173
174
|
dones[i] = True
|
174
175
|
else:
|
175
176
|
distance = np.linalg.norm(self.sensor_positions[i] - self.sensor_positions[action])
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=KqEqczXOEfVmbkVd7dsDXk4gyzc5VC_HrycnPdSH_8M,166
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=4CXrSu-8epidbKW7JgPIzbXPS-WPtCC82FIsdPPAlMQ,24863
|
4
|
+
gym_examples-3.0.266.dist-info/METADATA,sha256=KdqFD13218m6mSDcVJ5fpru17gAS0IuYts1m4uMPUTE,412
|
5
|
+
gym_examples-3.0.266.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-3.0.266.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-3.0.266.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=F0u_yF7l2eD3fOQTUzN2XUFt7etMgtlhgDv5tFMubpE,166
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=2GvyLeNjLM-q9oLCobVzpTUrUqzjTyRn_H3BAQZZvbY,24821
|
4
|
-
gym_examples-3.0.265.dist-info/METADATA,sha256=D0__HbG6kJd9Kb1SX_Lh_MysXCxkK_ToMFudnMPWqgU,412
|
5
|
-
gym_examples-3.0.265.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-3.0.265.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-3.0.265.dist-info/RECORD,,
|
File without changes
|
File without changes
|