YuriyGuts / cartpole-q-learning

A cart pole balancing agent powered by Q-Learning.
https://gym.openai.com/evaluations/eval_K41KvF0Re6BJW593cq2Tg
MIT License
13 stars 7 forks source link

Refactor episode history, fix the moving average plot #3

Closed YuriyGuts closed 1 year ago

YuriyGuts commented 1 year ago

The rolling mean line is displayed incorrectly when the plot scrolls to the right (after 200 episodes). This is because the rolling mean is calculated only on the data that is displayed (also it is zero-padded in the beginning). This change refactors the episode history class from the ground up and fixes the plotting issues.