30 lines
502 B
Python
30 lines
502 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class BasePolicy(ABC):
|
|
"""docstring for BasePolicy"""
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
@abstractmethod
|
|
def act(self, batch, hidden_state=None):
|
|
# return Batch(policy, action, hidden)
|
|
pass
|
|
|
|
def train(self):
|
|
pass
|
|
|
|
def eval(self):
|
|
pass
|
|
|
|
def reset(self):
|
|
pass
|
|
|
|
@staticmethod
|
|
def process_fn(batch, buffer, indice):
|
|
return batch
|
|
|
|
def exploration(self):
|
|
pass
|