(self, s, eps)
| 75 | self.models[a].partial_fit(X[0], G, self.eligibilities[a]) |
| 76 | |
| 77 | def sample_action(self, s, eps): |
| 78 | if np.random.random() < eps: |
| 79 | return self.env.action_space.sample() |
| 80 | else: |
| 81 | return np.argmax(self.predict(s)) |
| 82 | |
| 83 | |
| 84 | # returns a list of states_and_rewards, and the total reward |