uber-research / deep-neuroevolution

Deep Neuroevolution
Other
1.63k stars 298 forks source link

Added ob_stat variable to loop to avoid NameError on IDEs (ga.py and rs.py) #3

Closed guilherme-pombo closed 6 years ago

guilherme-pombo commented 6 years ago

I was having a bug with NameError: name 'ob_stat' is not defined when using either ga.py or rs.py. I'm aware that both ga and rs, due to their policies

@property
def needs_ob_stat(self):
     return False

never need ob_stat. However, if you are running the code from an IDE like Pycharm, it will throw the error regardless. Removed unused imports and added some PEP8 compliance on both files as well to make them easier to read. Thank you very much for open sourcing this code!