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))
After Change
print(value_weight)
score = eval_tic_tac_toe(value_weight)
scores[value_weight] = score
with open("tictactoe_value_search.json", "w") as fout:
fout.write(json.dumps(scores))
value_weight += 0.05
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
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: deepchem/deepchem
Commit Name: 306694396489426b1eaa069ffc858da4fedb509c
Time: 2019-08-20
Author: vsomnath@student.ethz.ch
File Name: deepchem/models/tests/test_pretrained.py
Class Name: TestPretrained
Method Name: test_load_from_pretrained_eager_mode
Project Name: IndicoDataSolutions/finetune
Commit Name: 3ce15cf0b1b83503d0a35a0077cb93322c2cc710
Time: 2018-11-13
Author: madison@indico.io
File Name: tests/test_classifier.py
Class Name: TestClassifier
Method Name: test_cached_predict
Project Name: DistrictDataLabs/yellowbrick
Commit Name: 0a2d2b4d81cc4e9209a92baba4406af60bbea24a
Time: 2018-04-23
Author: benjamin@bengfort.com
File Name: tests/test_classifier/test_rocauc.py
Class Name: ROCAUCTests
Method Name: test_rocauc_no_curves