1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

human agent will exit when human control not supported by environment; jupyter notebooks fixes

This commit is contained in:
Gal Novik
2018-09-17 15:59:00 +03:00
parent bb76c5c726
commit abaa58b559
4 changed files with 10 additions and 6 deletions

View File

@@ -329,6 +329,8 @@ class GymEnvironment(Environment):
self.key_to_action = {}
if hasattr(self.env.unwrapped, 'get_keys_to_action'):
self.key_to_action = self.env.unwrapped.get_keys_to_action()
else:
screen.error("Error: Environment {} does not support human control.".format(self.env), crash=True)
# initialize the state by getting a new state from the environment
self.reset_internal_state(True)