gym-examples 3.0.419__py3-none-any.whl → 3.0.421__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.419"
8
+ __version__ = "3.0.421"
@@ -93,7 +93,7 @@ class WSNRoutingEnv(gym.Env):
93
93
  # Create filenames to save statistics for evaluation
94
94
  self.statistics_filename = "results/data/Statistics_filename_" + os.getenv('ALGO_NAME') + ".txt"
95
95
  with open(self.statistics_filename, 'w') as file:
96
- file.write("Episode return, Total of energy consumption, Std of remaining energy, Mean of remaining energy, Network lifetime, network_throughput, energy_efficiency, packet_delivery_ratio, network_lifetime, average_latency\n")
96
+ file.write("returns, total_consumption_energy, std_remaining_energy, network_throughput, energy_efficiency, packet_delivery_ratio, network_lifetime, average_latency\n")
97
97
  # Initialize list of episode metrics
98
98
  self.num_timesteps = num_timesteps # This argument is for the PPO algorithm
99
99
  self.version = version # This argument is for the PPO algorithm
@@ -142,14 +142,7 @@ class WSNRoutingEnv(gym.Env):
142
142
 
143
143
  # Append the statistics to the .txt file
144
144
  with open(self.statistics_filename, 'a') as file:
145
- file.write(f"{self.episode_return}, {total_consumption_energy}, {std_remaining_energy}, {mean_remaining_energy}, {self.network_lifetime}, {network_throughput}, {energy_efficiency}, {packet_delivery_ratio}, {network_lifetime}, {average_latency}\n")
146
-
147
- # print("Episode count: ", self.episode_count)
148
- # print("Episode return: ", self.episode_return)
149
- # print("Total consumption energy: ", total_consumption_energy)
150
- # print("Std remaining energy: ", std_remaining_energy)
151
- # print("Mean remaining energy: ", mean_remaining_energy)
152
- # print("Network lifetime: ", self.network_lifetime)
145
+ file.write(f"{self.episode_return}, {total_consumption_energy}, {std_remaining_energy}, {network_throughput}, {energy_efficiency}, {packet_delivery_ratio}, {network_lifetime}, {average_latency}\n")
153
146
 
154
147
  self.episode_return = 0
155
148
  self.sensor_positions = np.random.rand(self.n_sensors, 2) * (upper_bound - lower_bound) + lower_bound
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.419
3
+ Version: 3.0.421
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=QU2F1E-kFAUrcbxYRKQDe2YR3AOvh_O6PAKh-_mc4PI,166
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=CFTaC2-YCH8MFiM_8e7nDZubT1lwB-z_SAtypmNy34E,27077
4
+ gym_examples-3.0.421.dist-info/METADATA,sha256=SMGoXZphra3Xo67wO4mm2e6Fn-DmiYV9JE1KOXTndg8,412
5
+ gym_examples-3.0.421.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.421.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.421.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=Vt2zZ3-tjtKuqkT3JPyABWpCJLCXaO8P0u59BC12tyg,166
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=psQI0Aitq6Xpqdbe2Fep2Up1s6ufcLE9vrEQimHQ5Pk,27591
4
- gym_examples-3.0.419.dist-info/METADATA,sha256=c_hc5ftxQU7hL6U38bGafsaQtTJuWy7f5Xrv1Eff_NU,412
5
- gym_examples-3.0.419.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.419.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.419.dist-info/RECORD,,