yanpanlau / Keras-FlappyBird

Using Keras and Deep Q-Network to Play FlappyBird

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to train the code on an ubuntu server?

small-wong opened this issue · comments

Hey, I want to train it on a ubuntu server, but I first met the problem:
Pygame.display.init() error: “No available video device”
and then I found an answer here:http://stackoverflow.com/questions/10220104/pygame-error-video-system-not-initialized-on-ubuntu-server-with-only-terminal
I try this: os.environ["SDL_VIDEODRIVER"] = "dummy"
but then I got a new problem:
File "game/wrapped_flappy_bird.py", line 135, in frame_step
SCREEN.blit(IMAGES['pipe'][0], (uPipe['x'], uPipe['y']))
pygame.error: Blit combination not supported

I wonder if there is a effective way to train the code on a ubuntu server?
Thank you so much!

It's about pygame. The input image data comes from the pygame.display, but the server has no display devices.
I finally find a new way to collect the input image data, based on here:http://stackoverflow.com/questions/14472781/in-pygame-how-can-i-save-a-screen-image-in-headless-mode