gym-examples 2.0.49__py3-none-any.whl → 2.0.51__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 +2 -2
- {gym_examples-2.0.49.dist-info → gym_examples-2.0.51.dist-info}/METADATA +1 -1
- gym_examples-2.0.51.dist-info/RECORD +7 -0
- gym_examples-2.0.49.dist-info/RECORD +0 -7
- {gym_examples-2.0.49.dist-info → gym_examples-2.0.51.dist-info}/WHEEL +0 -0
- {gym_examples-2.0.49.dist-info → gym_examples-2.0.51.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -115,10 +115,10 @@ class WSNRoutingEnv(gym.Env):
|
|
115
115
|
# Calculate final reward
|
116
116
|
# rewards_individual = torch.tensor(rewards[i], dtype=torch.double)
|
117
117
|
# final_reward = net(rewards_individual)
|
118
|
-
final_reward = np.
|
118
|
+
final_reward = np.sum(rewards[i])
|
119
119
|
rewards[i] = final_reward
|
120
120
|
|
121
|
-
rewards = [r
|
121
|
+
rewards = [r + self.network_reward_consumption_energy() + self.network_reward_dispersion_remaining_energy() for r in rewards]
|
122
122
|
|
123
123
|
for i in range(self.n_sensors):
|
124
124
|
if (self.remaining_energy[i] <= 0) or (self.number_of_packets[i] <= 0):
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=ciGv5NIJhnQdxPn2_NyGrMKtC8RvJXL5Q7OtfCEtymc,193
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=PEXC262Zrwo-x9Rs4IblmtzXDL_woc_jj9LdvmjG9Lg,14784
|
4
|
+
gym_examples-2.0.51.dist-info/METADATA,sha256=b1_W55GlRO7m7Fww_b9635XRXGDe9tAn8ML4kBuLGIk,411
|
5
|
+
gym_examples-2.0.51.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-2.0.51.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-2.0.51.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=86ppVTEGbPPckoYR1aadKnQ1SFv2bzLRzyOCZzL_AjI,193
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=I9UO0beru5MhLxxb8JRMCCLqm6ZvKZ24blYD0cFuUtg,14785
|
4
|
-
gym_examples-2.0.49.dist-info/METADATA,sha256=PbJ1NMbx6vZHqIoLhVs2T9ESlvcMSEZ6awNrkbXupdo,411
|
5
|
-
gym_examples-2.0.49.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-2.0.49.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-2.0.49.dist-info/RECORD,,
|
File without changes
|
File without changes
|