MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / act

Method act

tf2.0/rl_trader.py:275–279  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

273
274
275 def act(self, state):
276 if np.random.rand() <= self.epsilon:
277 return np.random.choice(self.action_size)
278 act_values = self.model.predict(state, verbose=0)
279 return np.argmax(act_values[0]) # returns action
280
281 @tf.function
282 def replay(self, batch_size=32):

Callers 1

play_one_episodeFunction · 0.45

Calls 1

predictMethod · 0.45

Tested by

no test coverage detected