r""" Non-batching select_action, return the action right away.
(agent_rref, ob_id, state)
| 171 | |
| 172 | @staticmethod |
| 173 | def select_action(agent_rref, ob_id, state): |
| 174 | r""" |
| 175 | Non-batching select_action, return the action right away. |
| 176 | """ |
| 177 | self = agent_rref.local_value() |
| 178 | probs = self.policy(state.cuda()) |
| 179 | m = Categorical(probs) |
| 180 | action = m.sample() |
| 181 | self.saved_log_probs[ob_id].append(m.log_prob(action)) |
| 182 | return action.item() |
| 183 | |
| 184 | def run_episode(self, n_steps=0): |
| 185 | r""" |
nothing calls this directly
no outgoing calls
no test coverage detected