- Tensorflow (GPU)
- Numpy
- gym (Atari)
- multiprocessing
- matplotlib and ffmpeg or Pillow if you want to create gifs of the game
- Python 3.7
- Tensorflow-gpu 1.13
- Clone this repository:
git clone https://github.com/CSautier/PongBot
- Launch the game:
python PongBot.py
Launch the game with the load option: python PongBot.py --load True
I've got a GTX 1060, and can run 5 processes at once. If your GPU has more memory than mine (3Gb) you can increase the number of processes: python PongBot.py --processes 10
(for instance).
You will get the feeling of some progress in about an hour, but it takes approximately 2 hours until you actually win some games 4 to win all of them. It is difficult to evaluate the progress after that.
This means your GPU is not powerful enough to run as many processes. Try launching the training with fewer processes: python PongBot.py --processes 2
.
If you still have this problem you should try the non-multiprocessing version, or you could force Keras to run the processes with a CPU (not recommanded and not tested).
This means you are trying to load a pretrained weight without actually having one.
Feel free to use as much of this code as you want but mention my github if you found this useful.
For more information, you can contact me on my github.