gym-examples 3.0.146__py3-none-any.whl → 3.0.147__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.146"
9
+ __version__ = "3.0.147"
@@ -63,21 +63,8 @@ class WSNRoutingEnv(gym.Env):
63
63
  tuple([self._get_observation_space() for _ in range(self.n_sensors)])
64
64
  )
65
65
 
66
- # ma_spaces = []
67
- # for sa_obs in self.observation_space:
68
- # flatdim = flatdim(sa_obs)
69
- # ma_spaces += [
70
- # Box(
71
- # low=-float("inf"),
72
- # high=float("inf"),
73
- # shape=(flatdim,),
74
- # dtype=np.float32,
75
- # )
76
- # ]
77
-
78
- # self.observation_space = Tuple(tuple(ma_spaces))
79
-
80
- self.action_space = Tuple(tuple([Discrete(self.n_sensors + 1)] * self.n_agents))
66
+ # self.action_space = Tuple(tuple([Discrete(self.n_sensors + 1)] * self.n_agents))
67
+ self.action_space = MultiDiscrete([self.n_sensors + 1] * self.n_agents)
81
68
 
82
69
  self.reset()
83
70
 
@@ -105,6 +92,7 @@ class WSNRoutingEnv(gym.Env):
105
92
  return self._get_obs()
106
93
 
107
94
  def step(self, actions):
95
+ actions = [actions[i] for i in range(self.n_agents)] # We want to go back from the MultiDiscrete action space to a tuple of tuple of Discrete action spaces
108
96
  self.steps += 1
109
97
  rewards = [0] * self.n_sensors
110
98
  dones = [False] * self.n_sensors
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.146
3
+ Version: 3.0.147
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=wuSlzzyuwbM32yFC82f7Ks8tbmg9-qNM97FxsDf0ces,194
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=AQ-FerU-hEA1v_nicGCXswgOUNbkHopk61pQr8XISVo,21774
4
+ gym_examples-3.0.147.dist-info/METADATA,sha256=S-G6qWTXkaBjCh4EnKqW_ElbX_-typkYPGFGTrhlmSc,412
5
+ gym_examples-3.0.147.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.147.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.147.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=anDsRskLOycse3wMRWyNzOSpxskQvDZZCiMR1gfuuMQ,194
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=Ua2WRjOlSuhzv4dT9tas9W5GRtsDt1xute41vlly6ng,21964
4
- gym_examples-3.0.146.dist-info/METADATA,sha256=-xf18Mf1GMaJqi9v8SA12fi3tYfrWX1phQDWc-Zjcw8,412
5
- gym_examples-3.0.146.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.146.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.146.dist-info/RECORD,,