Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ predict_all_actions
Method
predict_all_actions
rl/cartpole.py:61–62 ·
view source on GitHub ↗
(self, s)
Source
from the content-addressed store, hash-verified
59
return
x @ self.w
60
61
def
predict_all_actions(self, s):
62
return
[self.predict(s, a)
for
a in range(self.env.action_space.n)]
63
64
def
grad(self, s, a):
65
sa = np.concatenate((s, [a]))
Callers
2
epsilon_greedy
Function · 0.45
cartpole.py
File · 0.45
Calls
1
predict
Method · 0.95
Tested by
no test coverage detected