I actually got it working with .reinforce(), but then it’s calculating the gradient and updating the parameters every game right? The algorithm from the book plays the game 10 times, calculating the gradient for each, then calculates the mean of the gradients from those 10 games to update the parameters. Was wondering how I could do that with pytorch.
I guess I could just use .reinforce() but I thought trying to implement the algorithm from the book in pytorch would be good practice.