basketball_code / agent /__init__.py
youqiwong's picture
Upload folder using huggingface_hub
0c51b93 verified
import abc
class Agent(object):
def reset(self):
"""For state-full agents this function performs reseting at the beginning of each episode."""
pass
@abc.abstractmethod
def train(self, training=True):
"""Sets the agent in either training or evaluation mode."""
@abc.abstractmethod
def update(self, replay_buffer, logger, step):
"""Main function of the agent that performs learning."""
@abc.abstractmethod
def act(self, obs, sample=False):
"""Issues an action given an observation."""