您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
25 行
554 B
25 行
554 B
from abc import ABC, abstractmethod
|
|
from typing import Dict, Optional
|
|
|
|
from mlagents.envs.brain import AllBrainInfo, BrainParameters
|
|
|
|
|
|
class BaseUnityEnvironment(ABC):
|
|
@abstractmethod
|
|
def step(
|
|
self, vector_action: Optional[Dict] = None, value: Optional[Dict] = None
|
|
) -> AllBrainInfo:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def reset(self) -> AllBrainInfo:
|
|
pass
|
|
|
|
@property
|
|
@abstractmethod
|
|
def external_brains(self) -> Dict[str, BrainParameters]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def close(self):
|
|
pass
|