sgoodfriend's picture
VPG playing PongNoFrameskip-v4 from https://github.com/sgoodfriend/rl-algo-impls/tree/e8bc541d8b5e67bb4d3f2075282463fb61f5f2c6
10ca8cb
raw
history blame
No virus
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