MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / __init__

Method __init__

tf2.0/mlp_trader.py:248–256  ·  view source on GitHub ↗
(self, state_size, action_size)

Source from the content-addressed store, hash-verified

246
247class DQNAgent(object):
248 def __init__(self, state_size, action_size):
249 self.state_size = state_size
250 self.action_size = action_size
251 self.memory = ReplayBuffer(state_size, action_size, size=500)
252 self.gamma = 0.95 # discount rate
253 self.epsilon = 1.0 # exploration rate
254 self.epsilon_min = 0.01
255 self.epsilon_decay = 0.995
256 self.model = mlp(state_size, action_size)
257
258
259 def update_replay_memory(self, state, action, reward, next_state, done):

Callers

nothing calls this directly

Calls 2

ReplayBufferClass · 0.70
mlpFunction · 0.70

Tested by

no test coverage detected