gym-examples 2.0.32__py3-none-any.whl → 2.0.35__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 CHANGED
@@ -6,4 +6,4 @@ register(
6
6
  max_episode_steps=50,
7
7
  )
8
8
 
9
- __version__ = "2.0.32"
9
+ __version__ = "2.0.35"
@@ -115,10 +115,11 @@ 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.sum(rewards[i])
118
+ final_reward = np.mean(rewards[i])
119
119
  rewards[i] = final_reward
120
- rewards *= self.network_reward_consumption_energy() * self.network_reward_dispersion_remaining_energy()
121
-
120
+
121
+ rewards = [r * self.network_reward_consumption_energy() * self.network_reward_dispersion_remaining_energy() for r in rewards]
122
+
122
123
  for i in range(self.n_sensors):
123
124
  if (self.remaining_energy[i] <= 0) or (self.number_of_packets[i] <= 0):
124
125
  dones[i] = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 2.0.32
3
+ Version: 2.0.35
4
4
  Summary: A custom environment for multi-agent reinforcement learning focused on WSN routing.
5
5
  Home-page: https://github.com/gedji/CODES.git
6
6
  Author: Georges Djimefo
@@ -0,0 +1,7 @@
1
+ gym_examples/__init__.py,sha256=BYgQWFkHnu47S1y8CUzzJ8xokZg_aFHC6ePu16RGaMM,193
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=IDKtyh3S9VDWh9bF7YJkdZCeY2kOfbREjEWFnApetOI,14727
4
+ gym_examples-2.0.35.dist-info/METADATA,sha256=d3xxqqNRhdR140zqbbKxKkiK8qcZPOSvg1x9Vv7D_Ms,411
5
+ gym_examples-2.0.35.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-2.0.35.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-2.0.35.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=EYrWJ3V1oe3cV6qzc6PCLGBpaidU210LmmACYpG1bt4,193
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=gZkGOQuMxtNO40vk-D1k90ed_iIdJdUQ3LFbpWkjxmU,14710
4
- gym_examples-2.0.32.dist-info/METADATA,sha256=IokXfCpcv9CpKNwR5aId5HN4I1UVNd5Of6E2nRy1adc,411
5
- gym_examples-2.0.32.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-2.0.32.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-2.0.32.dist-info/RECORD,,