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

Method update

rl2/cartpole/q_learning_bins.py:68–70  ·  view source on GitHub ↗
(self, s, a, G)

Source from the content-addressed store, hash-verified

66 return self.Q[x]
67
68 def update(self, s, a, G):
69 x = self.feature_transformer.transform(s)
70 self.Q[x,a] += 1e-2*(G - self.Q[x,a])
71
72 def sample_action(self, s, eps):
73 if np.random.random() < eps:

Callers 1

play_oneFunction · 0.45

Calls 1

transformMethod · 0.45

Tested by

no test coverage detected