Skip to content

Instantly share code, notes, and snippets.

@nealmcb
Last active June 16, 2016 05:38
Show Gist options
  • Save nealmcb/c24860621ebec44b58ef5a9510c96f09 to your computer and use it in GitHub Desktop.
Save nealmcb/c24860621ebec44b58ef5a9510c96f09 to your computer and use it in GitHub Desktop.
OpenAI cartpole evaluation ala iaroslav-ai

This gist documents my OpenAI evaluations at

I attempted to reproduce the quickest documented CartPole-v0 solution to-date, reporting 29 episodes to solve,by iaroslav-ai, documented at https://gym.openai.com/evaluations/eval_yCJkgBGRl2Nfn3TKbvkkg

I don't know why I had a different result the first time, or indeed why it was faster the second time.

I also saw it fail with a traceback:

/srv/s/openai/gym/gym/envs/classic_control/rendering.py in render(self, return_rgb_array)
---> 95             arr = arr.reshape(self.height, self.width, 4)
ValueError: total size of new array must be unchanged

Note: no GPU/CUDA used

@JKCooper2
Copy link

Variance in solve time comes from randomness in both the environment and the agent. If you set the random seeds in both then the result should be the same every time.

This is partly why the 'Algorithms' section has been created so the performance over multiple evaluations can be measured (an algorithm's true ability should be independent of randomness)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment