1c7c76e3ac8d1c0b10a5f91efcf56d804d8bca26,tensorforce/environments/openai_gym.py,OpenAIGym,actions,#OpenAIGym#,78

Before Change


    def actions(self):
        if isinstance(self.gym.action_space, Discrete):
            return dict(continuous=False, num_actions=self.gym.action_space.n)
        elif len(self.gym.action_space.shape) == 1:
            return dict(continuous=True)
        elif len(self.gym.action_space.shape) > 1:
            return {"action" + str(n): dict(continuous=True) for n in range(len(self.gym.action_space.shape))}
        else:
            raise TensorForceError()

    def monitor(self, path):
        self.gym = Monitor(self.gym, path)

After Change



    @property
    def actions(self):
        return OpenAIGym.state_from_space(space=self.gym.action_space)

    @staticmethod
    def action_from_space(space):
        if isinstance(space, gym.spaces.Discrete):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: reinforceio/tensorforce
Commit Name: 1c7c76e3ac8d1c0b10a5f91efcf56d804d8bca26
Time: 2017-07-25
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/environments/openai_gym.py
Class Name: OpenAIGym
Method Name: actions


Project Name: reinforceio/tensorforce
Commit Name: c794fa99318462b5b04b77cfff27428d85cfb443
Time: 2017-12-17
Author: svenmika1977@gmail.com
File Name: tensorforce/contrib/unreal_engine.py
Class Name: UE4Environment
Method Name: execute


Project Name: reinforceio/tensorforce
Commit Name: 3f91c1f276c254fcb39df3fd1d03464366930503
Time: 2017-12-17
Author: svenmika1977@gmail.com
File Name: tensorforce/contrib/unreal_engine.py
Class Name: UE4Environment
Method Name: execute