File size: 548 Bytes
079c32c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import copy

import numpy as np

from ding.envs.common import EnvElementRunner
from ding.envs.env.base_env import BaseEnv
from .gfootball_action import GfootballRawAction


class GfootballRawActionRunner(EnvElementRunner):

    def _init(self, cfg, *args, **kwargs) -> None:
        # set self._core and other state variable
        self._core = GfootballRawAction(cfg)

    def get(self, engine: BaseEnv) -> np.array:
        agent_action = copy.deepcopy(engine.agent_action)
        return agent_action

    def reset(self) -> None:
        pass