sgoodfriend's picture
A2C playing QbertNoFrameskip-v4 from https://github.com/sgoodfriend/rl-algo-impls/tree/0760ef7d52b17f30219a27c18ba52c8895025ae3
c41aee4
raw
history blame
285 Bytes
from abc import ABC, abstractmethod
class Callback(ABC):
def __init__(self) -> None:
super().__init__()
self.timesteps_elapsed = 0
def on_step(self, timesteps_elapsed: int = 1) -> bool:
self.timesteps_elapsed += timesteps_elapsed
return True