chncyhn / flappybird-qlearning-bot

Flappy Bird Bot using Reinforcement Learning
MIT License
416 stars 94 forks source link

Faster learning and vizualization #8

Closed ZeeWanderer closed 5 years ago

ZeeWanderer commented 5 years ago
Illustration

![image](https://user-images.githubusercontent.com/8377469/48896762-182a7f00-ee51-11e8-9375-7af899b83d8c.png)

chncyhn commented 5 years ago

Thanks @maximilian578 these look great! I will look into the PRs tonight. 👍

ZeeWanderer commented 5 years ago

@chncyhn, by the way why qvalues are dumped each DUMPING_N Iterations? The qvalues.json is truncated and written anew each time qvalues are dumped. It would make sense to utilize pygame QUIT event and dump qvalues only when game is exited, but then closing interpreter by closing editor or console will result in qvalues not being saved. atexit.register() would probably not work either when closing interpreter.

chncyhn commented 5 years ago

@maximilian578 honestly it's a matter of convenience. I have forked the Flappy Bird clone from sourabhv/FlapPyBird, and am not aware of pygame's internals. Dumping q-values at every N iteration is just a very simple solution which works. For this project's purposes, the simpler the better.

chncyhn commented 5 years ago

@maximilian578 really cool stuff! I've just changed a couple of things in naming. Merging! 🎉