some try for policy_gradient
This commit is contained in:
@@ -19,12 +19,14 @@ alphago_rl_agent = PolicyAgent(sl_agent.model.to(device), encoder)
|
||||
opponent = PolicyAgent(sl_opponent.model.to(device), encoder)
|
||||
|
||||
# Run simulation
|
||||
num_games = 1000
|
||||
# num_games = 1000
|
||||
num_games = 10
|
||||
batch_size = 1024
|
||||
|
||||
with tqdm(total=num_games) as pbar:
|
||||
experience = experience_simulation(num_games, alphago_rl_agent, opponent, progress_callback=lambda: pbar.update(1))
|
||||
|
||||
alphago_rl_agent.train(experience)
|
||||
alphago_rl_agent.train(experience, batch_size=batch_size)
|
||||
|
||||
# # Serialize RL agent
|
||||
# alphago_rl_agent.save('checkpoints/alphago_rl_policy.pt')
|
||||
|
||||
Reference in New Issue
Block a user