| import abc | |
| class Agent(object): | |
| def reset(self): | |
| """For state-full agents this function performs reseting at the beginning of each episode.""" | |
| pass | |
| def train(self, training=True): | |
| """Sets the agent in either training or evaluation mode.""" | |
| def update(self, replay_buffer, logger, step): | |
| """Main function of the agent that performs learning.""" | |
| def act(self, obs, sample=False): | |
| """Issues an action given an observation.""" | |