c7c06f56e918cabf565d4e4454daa344137d1f0f,contrib/rl/tictactoe.py,,main,#,151
Before Change
def main():
env = TicTacToeEnvironment()
policy = TicTacToePolicy()
a3c = dc.rl.A3C(env, policy, entropy_weight=0, value_weight=0.25)
a3c.optimizer = dc.models.tensorgraph.TFWrapper(
tf.train.AdamOptimizer, learning_rate=0.01)
a3c.fit(100000)
env.reset()
while not env._terminated:
print(env.display())
print(a3c.predict(env._state))
action = a3c.select_action(env._state)
print(action)
print(env.step(action))
print(env.display())
if __name__ == "__main__":
After Change
def main():
scores = {}
value_weight = 0.05
while value_weight <= 1.0:
print(value_weight)
score = eval_tic_tac_toe(value_weight)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: deepchem/deepchem
Commit Name: c7c06f56e918cabf565d4e4454daa344137d1f0f
Time: 2017-05-25
Author: Karl
File Name: contrib/rl/tictactoe.py
Class Name:
Method Name: main
Project Name: facebookresearch/ParlAI
Commit Name: c3640ac78a06b512e7838a042a8829641caa3877
Time: 2017-06-09
Author: willfeng@fb.com
File Name: parlai/mturk/tasks/multi_agent_dialog/run.py
Class Name:
Method Name: main
Project Name: dask/distributed
Commit Name: 6e0c0a6b90b1d3c3f686f0c968e9cf3d0c354413
Time: 2019-05-22
Author: mrocklin@gmail.com
File Name: distributed/deploy/tests/test_adaptive.py
Class Name:
Method Name: test_worker_keys