60d08b706a1198ad8cf1ac2a009399a1fbd458f8,PyPi/environments/finite_mdp.py,FiniteMDP,reset,#FiniteMDP#Any#,29

Before Change


        else:
            self._state = state

        return self.get_state()

    def step(self, action):
        p = self.p[self._state, action, :]
        next_state = np.random.choice(p.size, p=p)

After Change


    def reset(self, state=None):
        if state is None:
            if self.mu is not None:
                self._state = np.random.choice(self.mu.size, p=self.mu)
            else:
                self._state = np.random.choice(self.p.shape[0])
        else:
            self._state = state

        return self._state

    def step(self, action):
        p = self.p[self._state, action, :]
        next_state = np.random.choice(p.size, p=p)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/finite_mdp.py
Class Name: FiniteMDP
Method Name: reset


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/finite_mdp.py
Class Name: FiniteMDP
Method Name: reset


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/car_on_hill.py
Class Name: CarOnHill
Method Name: reset


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/grid_world.py
Class Name: GridWorld
Method Name: reset


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/grid_world.py
Class Name: GridWorldVanHasselt
Method Name: reset


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 60d08b706a1198ad8cf1ac2a009399a1fbd458f8
Time: 2017-07-26
Author: carlo.deramo@gmail.com
File Name: PyPi/environments/grid_world.py
Class Name: GridWorldGenerator
Method Name: reset