54a40a9aa9482f5ac35a91335c1b24a4dd5f40d5,ptan/common/wrappers.py,FrameBuffer,__init__,#FrameBuffer#Any#Any#,44

Before Change


        A gym wrapper that returns last n_frames observations as a single observation.
        Useful for games like Atari and Doom with screen as input.
        super(FrameBuffer, self).__init__(env)
        shape = (n_frames,) + env.observation_space.shape[1:]
        self.observation_space = Box(0.0, 1.0, shape)
        self.framebuffer = [np.zeros(shape=env.observation_space.shape)]*n_frames

    def _reset(self):
        self.framebuffer = [np.zeros_like(self.framebuffer[0])] * len(self.framebuffer)

After Change


        self.k = k
        self.frames = deque([], maxlen=k)
        shp = env.observation_space.shape
        self.observation_space = spaces.Box(low=0, high=255, shape=(shp[0], shp[1], shp[2] * k))

    def _reset(self):
        ob = self.env.reset()
        for _ in range(self.k):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Shmuma/ptan
Commit Name: 54a40a9aa9482f5ac35a91335c1b24a4dd5f40d5
Time: 2017-10-22
Author: max.lapan@gmail.com
File Name: ptan/common/wrappers.py
Class Name: FrameBuffer
Method Name: __init__


Project Name: flow-project/flow
Commit Name: 6675ef7ddc08ab25eb6545943c7f4cc0234b62ee
Time: 2017-08-03
Author: akreidieh@gmail.com
File Name: cistar-dev/cistar/envs/braess_paradox.py
Class Name: BraessParadoxEnvironment
Method Name: action_space


Project Name: flow-project/flow
Commit Name: 55b80e3cd6529fdcb345f195693fbf584c6f606c
Time: 2017-02-24
Author: kanaadp@gmail.com
File Name: cistar-dev/cistar/envs/loop_velocity.py
Class Name: SimpleVelocityEnvironment
Method Name: action_space