gym-examples 2.0.8__py3-none-any.whl → 2.0.9__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.8"
9
+ __version__ = "2.0.9"
@@ -47,7 +47,7 @@ net = net.double() # Convert the weights to Double
47
47
 
48
48
 
49
49
  class WSNRoutingEnv(gym.Env):
50
- def __init__(self, n_sensors = 10, coverage_radius=50):
50
+ def __init__(self, n_sensors = 30, coverage_radius=50):
51
51
 
52
52
  super(WSNRoutingEnv, self).__init__()
53
53
 
@@ -76,14 +76,11 @@ class WSNRoutingEnv(gym.Env):
76
76
  self.consumption_energy = np.zeros(self.n_sensors)
77
77
  self.number_of_packets = np.ones(self.n_sensors, dtype=int) # Number of packets to transmit
78
78
  self.episode_count += 1
79
- self.step_count = 0
80
79
  return self._get_obs()
81
80
 
82
81
  def step(self, actions):
83
- print(f"Actions: {actions}")
84
82
  rewards = [0] * self.n_sensors
85
83
  dones = [False] * self.n_sensors
86
- self.step_count += 1
87
84
  for i, action in enumerate(actions):
88
85
 
89
86
  if action not in range(self.n_sensors + 1):
@@ -129,7 +126,7 @@ class WSNRoutingEnv(gym.Env):
129
126
  dones[i] = True
130
127
 
131
128
  # Integrate the mobility of the sensors
132
- # self.integrate_mobility()
129
+ self.integrate_mobility()
133
130
 
134
131
  return self._get_obs(), rewards, dones, {}
135
132
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 2.0.8
3
+ Version: 2.0.9
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=gqSyx1EEuQeAWNhqLrgfA_OQ8AWGNJ0ZHREx2Wvr6kk,192
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=Iq3O6LUZnOwIry3rZRcSkfe0jLfKJnyv5ZL18aDwAvQ,15137
4
+ gym_examples-2.0.9.dist-info/METADATA,sha256=xjdl49NkTN3aMG215C5vqaflQgwwesIAQdUw_xBjRiE,410
5
+ gym_examples-2.0.9.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-2.0.9.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-2.0.9.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=fIbIs37EHyLkQTZ5Ms2Qa1NGVpG3opspoUbt_BgWriY,192
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=cpqNN2fOEBE-_w-E4stAPH1VLsxPlIGtoZVV3dHmvhU,15236
4
- gym_examples-2.0.8.dist-info/METADATA,sha256=XlQxAfb-C0awmiUAIbEmsli6nSJPMWGZiqJYl1y_UUk,410
5
- gym_examples-2.0.8.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-2.0.8.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-2.0.8.dist-info/RECORD,,