147e5f98e8b56cd6bcb49770405272c25d228593,snake/base/map.py,Map,__init__,#Map#Any#Any#,15

Before Change


        // Add boundary walls
        for i in range(num_rows):
            if i == 0 or i == num_rows - 1:
                for j in range(num_cols):
                    self.__content[i][j].type = PointType.WALL
            else:
                self.__content[i][0].type = PointType.WALL
                self.__content[i][-1].type = PointType.WALL

After Change


        self.__capacity = (num_rows - 2) * (num_cols - 2)
        self.__content = [[Point() for _ in range(num_cols)]
                          for _ in range(num_rows)]
        self.reset()

    def reset(self):
        self.__food = None
        for i in range(self.__num_rows):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chuyangliu/snake
Commit Name: 147e5f98e8b56cd6bcb49770405272c25d228593
Time: 2017-12-07
Author: chuyang.s.liu@gmail.com
File Name: snake/base/map.py
Class Name: Map
Method Name: __init__


Project Name: deepmind/dm_control
Commit Name: 3faa7a095c740b227f16483c4d17721bfb2bb17a
Time: 2019-04-12
Author: alimuldal@google.com
File Name: dm_control/suite/tests/domains_test.py
Class Name: DomainTest
Method Name: test_visualize_reward


Project Name: openai/baselines
Commit Name: 6c44fb28fecdb666182e2951b7b1cbe9cf198ff1
Time: 2018-12-19
Author: peterzhokhoff@gmail.com
File Name: baselines/her/rollout.py
Class Name: RolloutWorker
Method Name: reset_all_rollouts