1c7c76e3ac8d1c0b10a5f91efcf56d804d8bca26,tensorforce/agents/random_agent.py,RandomAgent,act,#RandomAgent#Any#Any#,40

Before Change


        self.current_action = dict()
        for name, action in self.actions_config.items():
            if action.continuous:
                action = random()
                if "min_value" in action:
                    action = action.min_value + random() * (action.max_value - action.min_value)
                else:
                    action = gauss(mu=0.0, sigma=1.0)

After Change


                if action.min_value is None:
                    action = np.random.randn(*action.shape)
                else:
                    action = action.min_value + np.random.rand(*action.shape) * (action.max_value - action.min_value)
            else:
                action = np.random.randint(action.num_actions, size=action.shape)
            self.current_action[name] = action
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: 1c7c76e3ac8d1c0b10a5f91efcf56d804d8bca26
Time: 2017-07-25
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/agents/random_agent.py
Class Name: RandomAgent
Method Name: act


Project Name: deepdrive/deepdrive
Commit Name: 96b16f6982c8adda1720646f1477df8564e82a96
Time: 2018-09-05
Author: cquiter@gmail.com
File Name: util/sampler.py
Class Name: Sampler
Method Name: _add


Project Name: automl/SMAC3
Commit Name: c160af6b7504c35c54a6ae39621815d7fdedd9cc
Time: 2017-07-06
Author: marius.rks@googlemail.com
File Name: smac/optimizer/epils.py
Class Name: EPILS_Solver
Method Name: run


Project Name: chainer/chainerrl
Commit Name: 41304b258afa59f0cc47b96dbe1af9e75b2c90e3
Time: 2016-05-04
Author: muupan@gmail.com
File Name: tests/test_q_function.py
Class Name: TestQFunction
Method Name: test_sample