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

Method update

rl2/cartpole/q_learning.py:83–85  ·  view source on GitHub ↗
(self, s, a, G)

Source from the content-addressed store, hash-verified

81 return result
82
83 def update(self, s, a, G):
84 X = self.feature_transformer.transform(np.atleast_2d(s))
85 self.models[a].partial_fit(X, [G])
86
87 def sample_action(self, s, eps):
88 if np.random.random() < eps:

Callers 1

play_oneFunction · 0.45

Calls 2

transformMethod · 0.45
partial_fitMethod · 0.45

Tested by

no test coverage detected