gym-examples 3.0.134__py3-none-any.whl → 3.0.136__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.134"
9
+ __version__ = "3.0.136"
@@ -63,12 +63,14 @@ class WSNRoutingEnv(gym.Env):
63
63
  # tuple([self._get_observation_space() for _ in range(self.n_sensors)])
64
64
  # )
65
65
 
66
- self.observation_space = gym.spaces.Dict({
67
- 'remaining_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
68
- 'consumption_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
69
- 'sensor_positions': gym.spaces.Box(low=lower_bound, high=upper_bound, shape=(len(self.sensor_positions), 2), dtype=np.float32),
70
- 'number_of_packets': gym.spaces.Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(len(self.number_of_packets),), dtype=int)
71
- })
66
+ # self.observation_space = gym.spaces.Dict({
67
+ # 'remaining_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(self.n_agents,), dtype=np.float32),
68
+ # 'consumption_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(self.n_agents,), dtype=np.float32),
69
+ # 'sensor_positions': gym.spaces.Box(low=lower_bound, high=upper_bound, shape=(self.n_agents, 2), dtype=np.float32),
70
+ # 'number_of_packets': gym.spaces.Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(self.n_agents,), dtype=int)
71
+ # })
72
+
73
+ self.observation_space = self._get_observation_space()
72
74
 
73
75
  # self.action_space = Tuple(tuple([Discrete(self.n_sensors + 1)] * self.n_agents))
74
76
  self.action_space = gym.spaces.MultiDiscrete([self.n_sensors + 1] * self.n_agents)
@@ -204,13 +206,21 @@ class WSNRoutingEnv(gym.Env):
204
206
  'number_of_packets': np.array(self.number_of_packets)
205
207
  }
206
208
 
209
+ # def _get_observation_space(self):
210
+ # return gym.spaces.Dict({
211
+ # 'remaining_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
212
+ # 'consumption_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
213
+ # 'sensor_positions': gym.spaces.Box(low=lower_bound, high=upper_bound, shape=(len(self.sensor_positions), 2), dtype=np.float32),
214
+ # 'number_of_packets': gym.spaces.Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(len(self.number_of_packets),), dtype=int)
215
+ # })
216
+
207
217
  def _get_observation_space(self):
208
218
  return gym.spaces.Dict({
209
- 'remaining_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
210
- 'consumption_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(len(self.remaining_energy),), dtype=np.float32),
211
- 'sensor_positions': gym.spaces.Box(low=lower_bound, high=upper_bound, shape=(len(self.sensor_positions), 2), dtype=np.float32),
212
- 'number_of_packets': gym.spaces.Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(len(self.number_of_packets),), dtype=int)
213
- })
219
+ 'remaining_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(self.n_agents,), dtype=np.float32),
220
+ 'consumption_energy': gym.spaces.Box(low=0, high=initial_energy, shape=(self.n_agents,), dtype=np.float32),
221
+ 'sensor_positions': gym.spaces.Box(low=lower_bound, high=upper_bound, shape=(self.n_agents, 2), dtype=np.float32),
222
+ 'number_of_packets': gym.spaces.Box(low=0, high=self.n_sensors * initial_number_of_packets + 1, shape=(self.n_agents,), dtype=int)
223
+ })
214
224
 
215
225
 
216
226
  def get_state(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.134
3
+ Version: 3.0.136
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=xvHRv3fRlCpsfAE5OWZyelEhTTW1ttWxeyhdR2wnYzI,194
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=h9SNs1zmilOorshyy9oK80xC4dwib8uC_UVhNoN_6XE,23947
4
+ gym_examples-3.0.136.dist-info/METADATA,sha256=xqB0l3vTR9XjCEnHm4dX_gxBnVaK7nD1ozEz6kNjMpc,412
5
+ gym_examples-3.0.136.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.136.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.136.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=NDW_AoYQPwLsSSYhRWfejgVCkMyXx98eNpLQEYLe4-8,194
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=dwIYGkIGyeuhF2jmq4WoOGcgzN2ytfAqrU-WPIIxoOI,23289
4
- gym_examples-3.0.134.dist-info/METADATA,sha256=ZBMLM_U-MRZze2R6hKGKYG9kcoO5sdoYd2a15ytT-68,412
5
- gym_examples-3.0.134.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.134.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.134.dist-info/RECORD,,