watakandai / hiro_pytorch

Implementation of HIRO (Data-Efficient Hierarchical Reinforcement Learning)
90 stars 20 forks source link

Rendering in EnvWithGoal #6

Open Markus28 opened 3 years ago

Markus28 commented 3 years ago

Hey, it's me again :)

This is not really a serious bug or anything that really needs to be fixed, but I think it would be convenient: At the moment, the rendering in EnvWithGoal looks like this:

def render(self):
    self.base_env.render()

I think it might be convenient to accept args and kwargs (e.g. for rendering mode), i.e.

def render(self, *args, **kwargs):
    self.base_env.render(*args, **kwargs)

As I said, nothing serious, just a heads-up :)

Best, Markus

Markus28 commented 3 years ago

Actually, it should be

def render(self, *args, **kwargs):
    return self.base_env.render(*args, **kwargs)

otherwise, the rendered image in the case of mode="rgb_array" is not returned.