ed592270c7bb5c10e02474d4134ac2b05e7c8b67,chainerrl/envs/abc.py,ABC,step,#ABC#Any#,65

Before Change


            action = np.clip(action, self.action_space.low, self.action_space.high)
            action = np.around(action)
            if action.size > 1:
                action = action[0]
        if action == self._state:
            // Correct
            self._state += 1
            reward = 1.0 if self._state == self.size else 0.0

After Change


            if self.deterministic:
                action = np.argmax(action)
            else:
                pvals = np.exp(action) / np.exp(action).sum()
                action = np.random.multinomial(1, pvals)[0]
        if action == self._state:
            // Correct
            self._state += 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: chainer/chainerrl
Commit Name: ed592270c7bb5c10e02474d4134ac2b05e7c8b67
Time: 2017-01-24
Author: muupan@gmail.com
File Name: chainerrl/envs/abc.py
Class Name: ABC
Method Name: step


Project Name: BindsNET/bindsnet
Commit Name: 996804c052aca22d54a5206aab5c6f33552b16f7
Time: 2019-10-05
Author: hi@sharath.pro
File Name: bindsnet/pipeline/action.py
Class Name:
Method Name: select_softmax


Project Name: arnomoonens/yarll
Commit Name: 3ff2a365cc9ddd5faf8c9f3d1efafe5216cd10a7
Time: 2017-03-12
Author: x-006@hotmail.com
File Name: knowledge_transfer.py
Class Name: KnowledgeTransferLearner
Method Name: build_networks


Project Name: keras-team/keras
Commit Name: 98d49754edd5b5757fb7c37c8a3cdc9a65d6f238
Time: 2015-07-20
Author: michael.d.oliver@gmail.com
File Name: examples/lstm_text_generation.py
Class Name:
Method Name: sample