gym-examples 3.0.208__py3-none-any.whl → 3.0.210__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.208"
9
+ __version__ = "3.0.210"
@@ -210,7 +210,8 @@ class WSNRoutingEnv(gym.Env):
210
210
 
211
211
  rewards = [r.item() if isinstance(r, torch.Tensor) else r for r in rewards] # Convert the rewards to a list of floats
212
212
  # rewards = np.sum(rewards) # Sum the rewards of all agents
213
- rewards = np.mean(rewards) # Average the rewards of all agents
213
+ # rewards = np.mean(rewards) # Average the rewards of all agents
214
+ rewards = np.mean(self.compute_network_rewards()) # Average the rewards of all agents
214
215
  # print(f"Step: {self.steps}, Rewards: {rewards}, Done: {dones}")
215
216
  dones = all(dones) # Done if all agents are done
216
217
 
@@ -396,7 +397,8 @@ class WSNRoutingEnv(gym.Env):
396
397
  reward_packet_delivery_ratio = self.compute_reward_packet_delivery_ratio()
397
398
  rewards_performance = np.array([reward_latency, reward_network_throughput, reward_packet_delivery_ratio])
398
399
 
399
- return np.concatenate((rewards_energy, rewards_performance))
400
+ # return np.concatenate((rewards_energy, rewards_performance))
401
+ return rewards_energy
400
402
 
401
403
  def network_reward_dispersion_remaining_energy(self):
402
404
  '''
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.208
3
+ Version: 3.0.210
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=Nn1UcrZxRInKFf4JCxinIa8PEWS4P7wgPq_OK8roe5o,194
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=wP8oHngOs0pnHplq8Yv8YYJfeA48rQMB3A_EMXVmU2Q,26049
4
+ gym_examples-3.0.210.dist-info/METADATA,sha256=Chn-C1wtSJ58hCwLG6ZAOZbWZEWzXt4WK4AKGKDi2TE,412
5
+ gym_examples-3.0.210.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.210.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.210.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=iYTJSDYNBKf20FLfjsh4fcHpnUrGHEnriJ-LmmwN9ac,194
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=PFcrAnbBjdhC11_qfnSyAcyXe2IlwdW37Ru0nNXwIYI,25918
4
- gym_examples-3.0.208.dist-info/METADATA,sha256=dQNZW3yGHbBI-KcdTc5pYrRwWDGDjAQqlj2xmtkOYGQ,412
5
- gym_examples-3.0.208.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.208.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.208.dist-info/RECORD,,