gym-examples 2.0.30__py3-none-any.whl → 2.0.31__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.30"
9
+ __version__ = "2.0.31"
@@ -234,8 +234,11 @@ class WSNRoutingEnv(gym.Env):
234
234
  '''
235
235
  Compute the reward based on the number of packets of the receiver
236
236
  '''
237
- max_number_of_packets = self.n_sensors * initial_number_of_packets
238
- normalized_number_of_packets = self.number_of_packets[action] / max_number_of_packets
237
+ max_number_of_packets = self.n_sensors * initial_number_of_packets
238
+ if action == self.n_sensors:
239
+ normalized_number_of_packets = 0
240
+ else:
241
+ normalized_number_of_packets = self.number_of_packets[action] / max_number_of_packets
239
242
 
240
243
  return 1 - normalized_number_of_packets
241
244
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 2.0.30
3
+ Version: 2.0.31
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=-Zi6pjtuGP4mWLhMJ5XoRMBap3wEBnvbILvg_aozuTw,193
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=M2bo_-wLWkXTJajQc7OgkT7vsXlCyGBTkfXA3ipFSc0,13265
4
+ gym_examples-2.0.31.dist-info/METADATA,sha256=XZzdSuDCJ2CXoAF6osyaCT0nKN9xRQoL5GksbJvxnq4,411
5
+ gym_examples-2.0.31.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-2.0.31.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-2.0.31.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=uur4fOKfdZbOprSE_MqhnHFOEEgMbR2OFIQuRIJajoY,193
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=aKPaIgkMkNNynFuIvYD2ygW9R-0n_fRZKJPnj0KNT3M,13162
4
- gym_examples-2.0.30.dist-info/METADATA,sha256=X760BTR7bGZ1W19jrXFMsO4l1FueItkw7pEy7FNHqww,411
5
- gym_examples-2.0.30.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-2.0.30.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-2.0.30.dist-info/RECORD,,