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

Method update

rl2/mountaincar/td_lambda.py:63–68  ·  view source on GitHub ↗
(self, s, a, G, gamma, lambda_)

Source from the content-addressed store, hash-verified

61 return result
62
63 def update(self, s, a, G, gamma, lambda_):
64 X = self.feature_transformer.transform([s])
65 assert(len(X.shape) == 2)
66 self.eligibilities *= gamma*lambda_
67 self.eligibilities[a] += X[0]
68 self.models[a].partial_fit(X[0], G, self.eligibilities[a])
69
70 def sample_action(self, s, eps):
71 if np.random.random() < eps:

Callers 2

play_oneFunction · 0.45
play_oneFunction · 0.45

Calls 2

transformMethod · 0.45
partial_fitMethod · 0.45

Tested by

no test coverage detected