simoninithomas / Deep_reinforcement_learning_Course

Implementations from the free course Deep Reinforcement Learning with Tensorflow and PyTorch
http://www.simoninithomas.com/deep-rl-course
3.74k stars 1.23k forks source link

ViZDoomErrorException: Could not initialize SDL video #43

Open Wentong-DST opened 5 years ago

Wentong-DST commented 5 years ago

When I'm trying to run notebook in a Linux server environment, it disables monitor device.

Thus I have encountered this error at game.init():

Failed to connect to the Mir Server

---------------------------------------------------------------------------
ViZDoomErrorException                     Traceback (most recent call last)
<ipython-input-33-070898310509> in <module>()
      9     game.set_doom_scenario_path("deadly_corridor.wad")
     10 
---> 11     game.init()
     12 
     13     game.set_window_visible(False)

ViZDoomErrorException: Could not initialize SDL video:
Failed to connect to the Mir Server

This problem could be solved if we add game.set_window_visible(False) before game.init().

May I suggest adding a try exception block?

Thanks for writing this awesome repo.