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

Function get_action

rl3/ddpg.py:185–188  ·  view source on GitHub ↗
(s, noise_scale)

Source from the content-addressed store, hash-verified

183 sess.run(target_init)
184
185 def get_action(s, noise_scale):
186 a = sess.run(mu, feed_dict={X: s.reshape(1,-1)})[0]
187 a += noise_scale * np.random.randn(num_actions)
188 return np.clip(a, -action_max, action_max)
189
190 test_returns = []
191 def test_agent(num_episodes=5):

Callers 2

test_agentFunction · 0.70
ddpgFunction · 0.70

Calls 1

runMethod · 0.45

Tested by 1

test_agentFunction · 0.56