Open hawkeoni opened 4 years ago
@hawkeoni Sorry for the delayed response. You are correct, the two are independent of each other, which is an error. I believe you're right, in that the policy loss should be calculate with the predicted values. I'll look into fixing this asap.
@hawkeoni I have been playing around using the following for the policy loss function:
policy_loss = - (values.detach() * log_prob_actions).sum()
I believe this is mathematically correct, however I cannot seem to get a good set of hyperparameters that will make this notebook train. I guess this is why people always use the "A2C" actor critic version. Although technically my notebook isn't A2C at all. I'll have to have a think about how to re-arrange these notebooks for them to make sense.
Hello, Ben! Thank you for a great tutorial series. I have a question regarding your actor-critic notebook. In function
update_policy
in policy loss you calculate the usual policy gradient for agent, in value loss you calculate loss for the critic. They seem to be independent, the critic does not affect the agent at all. Shouldn't returns for policy loss be calculated with values from critic or something like that?