gym-examples 3.0.274__py3-none-any.whl → 3.0.275__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
@@ -5,4 +5,4 @@ register(
5
5
  entry_point="gym_examples.envs:WSNRoutingEnv",
6
6
  )
7
7
 
8
- __version__ = "3.0.274"
8
+ __version__ = "3.0.275"
@@ -9,6 +9,7 @@ import torch
9
9
  import torch.nn as nn
10
10
  import torch.nn.functional as F
11
11
  import os
12
+ from collections import OrderedDict
12
13
 
13
14
  # Define the network parameters for the final reward function
14
15
  input_dim = 4 # length of the individual rewards vector
@@ -111,7 +112,7 @@ class WSNRoutingEnv(gym.Env):
111
112
  self.episode_count += 1
112
113
 
113
114
  self.get_metrics()
114
-
115
+
115
116
  return self._get_obs()
116
117
 
117
118
 
@@ -231,13 +232,13 @@ class WSNRoutingEnv(gym.Env):
231
232
 
232
233
 
233
234
  def _get_observation_space(self):
234
- return Dict({
235
- 'remaining_energy': Box(low=0, high=initial_energy, shape=(1,), dtype=np.float64),
236
- 'consumption_energy': Box(low=0, high=initial_energy, shape=(1,), dtype=np.float64),
237
- 'sensor_positions': Box(low=lower_bound, high=upper_bound, shape=(2,), dtype=np.float64),
238
- 'number_of_packets': Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(1,), dtype=int),
239
- 'current_sensor': Box(low=0, high=self.n_sensors - 1, shape=(1,), dtype=int)
240
- })
235
+ return Dict(OrderedDict([
236
+ ('remaining_energy', Box(low=0, high=initial_energy, shape=(1,), dtype=np.float64)),
237
+ ('consumption_energy', Box(low=0, high=initial_energy, shape=(1,), dtype=np.float64)),
238
+ ('sensor_positions', Box(low=lower_bound, high=upper_bound, shape=(2,), dtype=np.float64)),
239
+ ('number_of_packets', Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(1,), dtype=int)),
240
+ ('current_sensor', Box(low=0, high=self.n_sensors - 1, shape=(1,), dtype=int))
241
+ ]))
241
242
 
242
243
 
243
244
  def get_state(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.274
3
+ Version: 3.0.275
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=sVM9Gk1qNwP3R3Ej62PfhYz-vNXDf0UQLvgclMAqU-4,166
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=SYx28yL3WfHnb1I-AXUQpE9-6esP_BWdvLKoLXuATrw,24190
4
+ gym_examples-3.0.275.dist-info/METADATA,sha256=javWPmu6oFLAF9Zv0nOQHAd6VBO2brI6nmksHQdVNUg,412
5
+ gym_examples-3.0.275.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.275.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.275.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=lghJ3o_jHKKCoVsyBYdJfXiok6adkourXQgsWQmAVQ0,166
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=YDIqycbx4vYRP4e9aueEQZJxBOjb3X5V4OpSSFVXBg0,24162
4
- gym_examples-3.0.274.dist-info/METADATA,sha256=5snFdPtqiSbvivj5Uem_0QX_t-2_dZPBWOZAhBwiO7s,412
5
- gym_examples-3.0.274.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.274.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.274.dist-info/RECORD,,