gym-examples 2.0.17__py3-none-any.whl → 2.0.19__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 -3
- {gym_examples-2.0.17.dist-info → gym_examples-2.0.19.dist-info}/METADATA +1 -1
- gym_examples-2.0.19.dist-info/RECORD +7 -0
- gym_examples-2.0.17.dist-info/RECORD +0 -7
- {gym_examples-2.0.17.dist-info → gym_examples-2.0.19.dist-info}/WHEEL +0 -0
- {gym_examples-2.0.17.dist-info → gym_examples-2.0.19.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -116,9 +116,9 @@ class WSNRoutingEnv(gym.Env):
|
|
116
116
|
rewards[i] = self.compute_individual_rewards(i, action, neighbors_i, remaining_energy_before)
|
117
117
|
self.number_of_packets[i] = 0 # Reset the number of packets of the sensor i
|
118
118
|
# Calculate final reward
|
119
|
-
rewards_individual = torch.tensor(rewards[i], dtype=torch.double)
|
120
|
-
final_reward = net(rewards_individual)
|
121
|
-
|
119
|
+
# rewards_individual = torch.tensor(rewards[i], dtype=torch.double)
|
120
|
+
# final_reward = net(rewards_individual)
|
121
|
+
final_reward = sum(rewards[i])
|
122
122
|
rewards[i] = final_reward
|
123
123
|
|
124
124
|
for i in range(self.n_sensors):
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=l3lixluT0Nj41DTI8kQUycvvNaFVjjS_ga6HpsrTuDM,193
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=NZBpWz34UruMNwuCReQcx_MQlIWRH34dEI53EcpsHSk,15137
|
4
|
+
gym_examples-2.0.19.dist-info/METADATA,sha256=e3Lms7qQ4-eJPLUY-TgTscJ4ADT6fRGhUhtV5A9Y9aA,411
|
5
|
+
gym_examples-2.0.19.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-2.0.19.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-2.0.19.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=OlyOdaeKpdM2lOJwAgGL9ZTuMXd0QO6ez1bgC_54glY,193
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=RuLxE06OdmbSmc0m5fnCqQUY1KCbJi7w8JeDJ3Hr-Zc,15135
|
4
|
-
gym_examples-2.0.17.dist-info/METADATA,sha256=K0eKN379bKV31WdoLEOJURzP1AdKvHwuT3UYlg7Y720,411
|
5
|
-
gym_examples-2.0.17.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-2.0.17.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-2.0.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|