tesslerc / malmo_rl

MIT License
2 stars 2 forks source link

Running with interactive agent causes null reference from missing parameter #2

Closed Phantomb closed 6 years ago

Phantomb commented 6 years ago

Helpers.py throws an exception at line 52 when used with the interactive agent because that agent is missing the learn_start parameter:

PS C:\Github_Repos\tessler_Malmo> python main.py interactive single_room
INFO: To view results, run 'python -m visdom.server'
INFO: then head over to http://localhost:8097
INFO: Starting Malmo:
INFO: Malmo loaded!
Traceback (most recent call last):
  File "main.py", line 55, in <module>
    viz)
  File "C:\Github_Repos\tessler_Malmo\utilities\helpers.py", line 52, in play_full_episode
    if step > params.learn_start and is_train:
AttributeError: 'Namespace' object has no attribute 'learn_start'
PS C:\Github_Repos\tessler_Malmo>

A simple check if that parameter exists might suffice, but I'm not sure if you would maybe rather want to check for / catch that error in some other way.

tesslerc commented 6 years ago

Fixed in a6ce0b13965e71e750649df75a30d410ae46c4e3. This is a dirty fix, but since the interactive agent is only here for manual testing of the environment I think it's better this way, over adding additional logic to the main code.