gym-examples 3.0.34__py3-none-any.whl → 3.0.36__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.34"
9
+ __version__ = "3.0.36"
@@ -169,7 +169,7 @@ class WSNRoutingEnv(gym.Env):
169
169
  reward_latency = self.compute_reward_latency()
170
170
  rewards_metrics = [reward_packet_delivery_ratio, reward_latency]
171
171
  rewards_metrics = self.compute_attention_rewards(rewards_metrics)
172
- rewards = np.array([r.detach().numpy() + rewards_metrics.detach().numpy() for r in rewards])
172
+ rewards = [torch.tensor(r, dtype=torch.float64) + rewards_metrics if isinstance(r, int) else r + rewards_metrics for r in rewards]
173
173
 
174
174
  return self._get_obs(), rewards, dones, {}
175
175
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.34
3
+ Version: 3.0.36
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=VS6xQR_7oWFS7m3DMHmBZBaaXseH1lDWbgiMiYtfY1Q,193
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=TBiED0ZrMLUclCOcsZwYnP_ecl3KQEYGAeqTfkYke8U,18972
4
+ gym_examples-3.0.36.dist-info/METADATA,sha256=iXEHSv-wwCpXBqwTlWAkmNfn8jP2QCWpxFE2AgGxmhI,411
5
+ gym_examples-3.0.36.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.36.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.36.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=PNxi72U9N19OZMspYMqfr4pIXKtctwr3Mst2U8R4AFU,193
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=Jk2mEyD1VkdpRR7udTbkKersko_kvasoiIA1R0B9Etc,18934
4
- gym_examples-3.0.34.dist-info/METADATA,sha256=kInNs9ipS2cIFU3UK2a0pl47YCV5FCNtTWfKw-tzXNo,411
5
- gym_examples-3.0.34.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.34.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.34.dist-info/RECORD,,