gym-examples 3.0.66__py3-none-any.whl → 3.0.68__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__ = "3.0.66"
9
+ __version__ = "3.0.68"
@@ -149,8 +149,8 @@ class WSNRoutingEnv(gym.Env):
149
149
  self.number_of_packets[action] += self.number_of_packets[i]
150
150
  self.number_of_packets[i] = 0 # Reset the number of packets of the sensor i
151
151
  # Calculate final reward
152
- rewards[i] = self.compute_attention_rewards(rewards[i])
153
- # rewards[i] = self.compute_sum_rewards(rewards[i])
152
+ # rewards[i] = self.compute_attention_rewards(rewards[i])
153
+ rewards[i] = self.compute_sum_rewards(rewards[i])
154
154
  for i in range(self.n_sensors):
155
155
  if (self.remaining_energy[i] <= 0) or (self.number_of_packets[i] <= 0):
156
156
  dones[i] = True
@@ -165,7 +165,8 @@ class WSNRoutingEnv(gym.Env):
165
165
 
166
166
  self.get_metrics()
167
167
 
168
- rewards = rewards / len(rewards)
168
+ rewards = [r / len(rewards) for r in rewards]
169
+
169
170
  return self._get_obs(), rewards, dones, {}
170
171
 
171
172
  def _get_obs(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.66
3
+ Version: 3.0.68
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=_w0yxpWirEUGT9OLHm3YiHSVc-m3gJfCtkqfuuAaDYo,193
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=XInVr4rWkGGlI-055GfErH1dd7JEFEHo-aQFyifpnqc,20005
4
+ gym_examples-3.0.68.dist-info/METADATA,sha256=8BGFva3ebjRJop3JL0feT7ang_6BrK0O3YBerYKULLA,411
5
+ gym_examples-3.0.68.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.68.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.68.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=Pgf-o3ocmyPSUzedY5J9qiLtp6UG7-hFYj_KpV1K_Bg,193
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=_lB0ZugZJFq51bXqSQIjChYybPKFsZutnNEW_cNHLzA,19990
4
- gym_examples-3.0.66.dist-info/METADATA,sha256=6geBucVEXPpAakJqBw1mL3YiWsNUt_FFvZjpzwfJ4Vc,411
5
- gym_examples-3.0.66.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.66.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.66.dist-info/RECORD,,