File size: 471 Bytes
ef737d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from __future__ import annotations
from abc import ABC, abstractmethod
from openenv.core.env_server.interfaces import Environment
class BaseTask(Environment, ABC):
task_id: str = "base"
max_steps: int = 5
@abstractmethod
def reset(self, seed: int | None = None): ...
@abstractmethod
def step(self, action): ...
@abstractmethod
def state(self) -> dict: ...
@abstractmethod
def grade_episode(self, history: list) -> float: ...
|