Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 7, 2019 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/ab8074bcde91e68ff2bccc543f745573 to your computer and use it in GitHub Desktop.
Save NMZivkovic/ab8074bcde91e68ff2bccc543f745573 to your computer and use it in GitHub Desktop.
def __init__(self, enviroment, optimizer):
# Initialize atributes
self._state_size = enviroment.observation_space.n
self._action_size = enviroment.action_space.n
self._optimizer = optimizer
self.expirience_replay = deque(maxlen=2000)
# Initialize discount and exploration rate
self.gamma = 0.6
self.epsilon = 0.1
# Build networks
self.q_network = self._build_compile_model()
self.target_network = self._build_compile_model()
self.alighn_target_model()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment