Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 20, 2019 10:21
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/fc4134b1ab32b9f86d3e7daf9a8bdf80 to your computer and use it in GitHub Desktop.
Save NMZivkovic/fc4134b1ab32b9f86d3e7daf9a8bdf80 to your computer and use it in GitHub Desktop.
def __init__(self, enviroment, optimizer, image_shape):
# Initialize atributes
self._action_size = enviroment.action_space.n
self._optimizer = optimizer
self._image_shape = image_shape
self.enviroment = enviroment
self.expirience_replay = deque(maxlen=100000)
# 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