gym-examples 3.0.304__py3-none-any.whl → 3.0.305__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 +1 -1
- gym_examples/envs/wsn_env.py +3 -1
- {gym_examples-3.0.304.dist-info → gym_examples-3.0.305.dist-info}/METADATA +1 -1
- gym_examples-3.0.305.dist-info/RECORD +7 -0
- gym_examples-3.0.304.dist-info/RECORD +0 -7
- {gym_examples-3.0.304.dist-info → gym_examples-3.0.305.dist-info}/WHEEL +0 -0
- {gym_examples-3.0.304.dist-info → gym_examples-3.0.305.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -26,7 +26,7 @@ initial_number_of_packets = 1 # initial number of packets to transmit
|
|
26
26
|
latency_per_hop = 1 # latency per hop in seconds
|
27
27
|
|
28
28
|
base_back_up_dir = "results/data/"
|
29
|
-
max_reward =
|
29
|
+
max_reward = 1 # maximum reward value when the sensors sent data to the base station. The opposite value is when the sensors perform an unauthorized action
|
30
30
|
|
31
31
|
# Define the final reward function using an attention mechanism
|
32
32
|
class Attention(nn.Module):
|
@@ -49,6 +49,8 @@ net = net.double() # Convert the weights to Double
|
|
49
49
|
|
50
50
|
class WSNRoutingEnv(gym.Env):
|
51
51
|
|
52
|
+
ALGO_NAME = "" # Global flag to control the algorithm name
|
53
|
+
|
52
54
|
def __init__(self, n_sensors = 20, coverage_radius=(upper_bound - lower_bound)/4, num_timesteps = None, version = None):
|
53
55
|
|
54
56
|
super(WSNRoutingEnv, self).__init__()
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=8BYpo2AdI6jbqYMBn5Pw0Lw0pcXx83rd7eKNOGI5AJg,166
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=feL2Zgc6NUbhanR4XetM2iun7XBiEzVLVHVKtC0WtEQ,23354
|
4
|
+
gym_examples-3.0.305.dist-info/METADATA,sha256=Pb7ilvVKwYopxvpTCfids9lj0SIDj8TXTelqVqrmcig,412
|
5
|
+
gym_examples-3.0.305.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-3.0.305.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-3.0.305.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=f8Tx59VI1Dng41tKspAnyv9NY7tPpUltYaVWi3ZrEIw,166
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=NBRRKwVmJGGcHtQAi-XD3MCThH6Doyat690YETISc0g,23288
|
4
|
-
gym_examples-3.0.304.dist-info/METADATA,sha256=NfI320nLaTnKxwGZLqFNXyC5GnAfKQSDG6c9aIhGlJU,412
|
5
|
-
gym_examples-3.0.304.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-3.0.304.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-3.0.304.dist-info/RECORD,,
|
File without changes
|
File without changes
|