PacktPublishing / PyTorch-1.x-Reinforcement-Learning-Cookbook

PyTorch 1.x Reinforcement Learning Cookbook, published by Packt
MIT License
96 stars 44 forks source link

Guys I need some help! #2

Closed CrazyNicolas closed 3 years ago

CrazyNicolas commented 3 years ago

dqn.py in Chapter 7 is not working, I copy the code and run it in my Jupyter notebook, but the total_reward still remains -200 after 800 epochs. It is quite different from what the book said! So I wonder if the code is right? I will try by myself and if I figure it out I will give you a request pull but better it is solved by you. Thanks!

CrazyNicolas commented 3 years ago

I already figure out what happens here! If you use this code to solve CartPole-V0, it is useful. However, MountainCar is more conplex so this algorithm can't.

haydenliu commented 3 years ago

As mentioned in the book, MountainCar is very complicated, hence we only present a sample solution and you are encouraged to fine-tune the hyperparameters.

CrazyNicolas commented 3 years ago

As mentioned in the book, MountainCar is very complicated, hence we only present a sample solution and you are encouraged to fine-tune the hyperparameters.

agree!