Imported from https://github.com/ken011528/UpsideDown-reinforcement-learning-implement-by-tensorflow