Search code examples
pythonopenai-gym

basic.cfg file not found in vizdoom while doom implementation


I am using vizdoom 1.1.7 on google colab.

For creating environment, i am using basic.cfg file.

But colab notebook is giving me an FileDoesNotExistException.

Code: 
from vizdoom import * 

game = DoomGame()
game.load_config("basic.cfg")
game.set_doom_scenario_path("basic.wad")
game.init()

Error: 
---------------------------------------------------------------------------
FileDoesNotExistException                 Traceback (most recent call last)
<ipython-input-19-f8e9f2b2ba6f> in <module>()
      1 
----> 2 game, possible_actions = create_environment()

<ipython-input-18-04cdc8c4b05b> in create_environment()
      6 
      7     # Load the correct configuration
----> 8     game.load_config("basic.cfg")
      9 
     10     # Load the correct scenario (in our case basic scenario)

FileDoesNotExistException: File "basic.cfg" does not exist.

Solution

  • I found that config files like ‘basic.cfg’ are in other directory inside VizDoom installation on Google Colab, e.g ‘/usr/local/lib/python3.6/dist-packages/vizdoom/scenarios’. So if you do game.load_config(‘usr/local/lib/python3.6/dist-packages/vizdoom/scenarios/basic.cfg’), you’ll success importing this environment.