Imported from https://github.com/hjgithub1/reinforcement-learning-notes