mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
github: # Replace with up to 4 GitHubSponsors-enabled usernames e.g., [user1, user2]
|
github: # Replace with up to 4 GitHubSponsors-enabled usernames e.g., [user1, user2]
|
||||||
patreon: evilsocket
|
patreon: pwnagotchi-torch
|
||||||
open_collective: # Replace with a single Open Collective username
|
open_collective: # Replace with a single Open Collective username
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
import gym
|
import gymnasium
|
||||||
from gym import spaces
|
from gymnasium import spaces
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import pwnagotchi.ai.featurizer as featurizer
|
import pwnagotchi.ai.featurizer as featurizer
|
||||||
@ -8,7 +8,7 @@ import pwnagotchi.ai.reward as reward
|
|||||||
from pwnagotchi.ai.parameter import Parameter
|
from pwnagotchi.ai.parameter import Parameter
|
||||||
|
|
||||||
|
|
||||||
class Environment(gym.Env):
|
class Environment(gymnasium.Env):
|
||||||
metadata = {'render.modes': ['human']}
|
metadata = {'render.modes': ['human']}
|
||||||
params = [
|
params = [
|
||||||
Parameter('min_rssi', min_value=-200, max_value=-50),
|
Parameter('min_rssi', min_value=-200, max_value=-50),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from gym import spaces
|
from gymnasium import spaces
|
||||||
|
|
||||||
|
|
||||||
class Parameter(object):
|
class Parameter(object):
|
||||||
@ -10,7 +10,7 @@ class Parameter(object):
|
|||||||
self.min_value = min_value
|
self.min_value = min_value
|
||||||
self.max_value = max_value + 1
|
self.max_value = max_value + 1
|
||||||
|
|
||||||
# gym.space.Discrete is within [0, 1, 2, ..., n-1]
|
# gymnasium.space.Discrete is within [0, 1, 2, ..., n-1]
|
||||||
if self.min_value < 0:
|
if self.min_value < 0:
|
||||||
self.scale_factor = abs(self.min_value)
|
self.scale_factor = abs(self.min_value)
|
||||||
elif self.min_value > 0:
|
elif self.min_value > 0:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
gym
|
gymnasium
|
||||||
shimmy
|
shimmy
|
||||||
pycryptodome
|
pycryptodome
|
||||||
requests
|
requests
|
||||||
|
Reference in New Issue
Block a user