Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@danijar
Created September 13, 2017 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danijar/300cbffb874cefa8c2dd733957cf8f4d to your computer and use it in GitHub Desktop.
Save danijar/300cbffb874cefa8c2dd733957cf8f4d to your computer and use it in GitHub Desktop.
One-liner to benchmark speed of Gym environments
python -c "import gym,time;d=10000;e=gym.make('Ant-v1');s=time.time();e.reset();[e.reset() if e.step(e.action_space.sample())[2] else 0 for _ in range(d)];print(d/(time.time()-s),'FPS')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment