Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

OpenAI Gym

Gym gives reinforcement learning researchers one common interface for benchmark environments

  • Problem Earlier benchmark collections each cover their own slice of tasks, so comparing algorithms across them takes extra effort. That makes fair comparison of reinforcement learning algorithms hard.
  • Method Gym puts every task behind one shared environment interface and versions each environment when it changes. It also wraps environments in a Monitor by default and runs a website for sharing results.
  • Results The paper describes Gym's components and design decisions and reports no experiments of its own. At beta release it covered classic control, algorithmic, Atari, Go, and robot tasks.

Why a shared benchmark package was needed

Progress in reinforcement learning depends on benchmarks on which algorithms can be compared, and the Arcade Learning Environment and the RLLab continuous control benchmark are two examples that came before Gym. Each earlier collection exposes its own slice of tasks, so comparing algorithms across them takes extra effort. Gym aims to merge the strengths of these collections into one package that is easy to use and reach.

Every task in Gym is an environment, and all environments share one interface; the set of environments is planned to keep growing. A website collects scoreboards for the environments, and users are encouraged to link their source code and reproduction instructions.

The agent and environment interaction loop

Gym treats reinforcement learning as an agent acting in an environment, receiving an observation and reward after each action, and seeking to maximize total reward. The environment is modelled as a partially observable Markov decision process. Gym concentrates on episodes: each one begins from a randomly sampled initial state and runs until a terminal state, and the aim is high reward per episode in as few episodes as possible.

The example traces one episode of 100 timesteps. The environment is reset to produce the first observation, the agent chooses an action from it, and each env.step call returns the next observation, a reward, a done flag and an info value. The done flag is the signal that the episode has reached a terminal state, which in the example happens at the final step.

Keeping the agent out of the library

Gym defines an abstraction for the environment only and leaves the agent unspecified, which keeps the library convenient and lets users write agents in different styles. The snippet assumes an agent object exists only for demonstration, since Gym includes no agent class and does not fix an agent interface.

One style is online learning, where the agent receives the observation, reward and done flag at every timestep and updates incrementally. The other is batch updating, where the agent receives only observations, the reward is collected separately by the learning algorithm, and an update is computed later from the stored rewards. Because the interface constrains only the environment, both styles can be built on the same environments.

Final performance versus learning speed

An algorithm's performance on an environment has two axes: final performance, the average reward per episode after learning ends, and sample complexity, the time it takes to learn. Sample complexity can be measured by counting the episodes needed before average performance passes a threshold. The threshold is set for each environment in an ad hoc way, for example at 90% of the maximum performance reached by a heavily trained agent.

Final performance alone is a weak comparison, because unlimited computation can push it higher, so the score may reflect computational resources rather than algorithm quality. Reporting learning speed alongside final performance keeps the two effects separate.

Peer review, versioning and monitoring

Supervised learning measures generalization on a hidden test set, but reinforcement learning has no equivalent, so generalization would require running submitted code on many unseen environments, which is expensive. Gym instead asks users to publish a writeup with their algorithm, parameters and code, so that others can judge whether an algorithm overfit to its tasks.

Each environment change comes with a version increment, because results obtained before and after a change would not be comparable. CartPole starts as Cartpole-v0, and a functional change would give it the name Cartpole-v1.

By default every environment is wrapped in a Monitor that records each time step and each reset, and it can record video at intervals. The data the Monitor collects is enough to produce learning curves, which can be posted to the Gym website.

Environment families at beta release

At beta release Gym included classic control and toy text tasks, algorithmic tasks such as multi-digit addition and sequence reversal, Atari games, board games, and 2D and 3D robot tasks. Most algorithmic tasks need memory, and their difficulty can be raised by lengthening the sequence.

The Atari tasks use the Arcade Learning Environment and accept screen images or RAM contents as input. The Go environments cover 9x9 and 19x19 boards, with the Pachi engine serving as the opponent. The robot tasks run on the MuJoCo physics engine, and a few of them are adapted from RLLab.

Later environments were built on the Box2D physics engine and on the Doom game engine through VizDoom.

Planned extensions

The second is curriculum and transfer learning, where an algorithm is trained on a sequence of tasks of increasing difficulty instead of learning each task from scratch. The third is real-world operation, which would connect the Gym API to robotic hardware.

What the paper leaves untested

The paper describes components and design decisions and reports no experiments or benchmark scores of its own. Whether the versioning and writeup practice produces reliable comparisons in practice was not tested here. Multi-agent tasks, curriculum and transfer tasks, and real-world operation are described only as future work. The episode threshold for sample complexity is chosen ad hoc for each environment.

Paper info

Authors
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, Wojciech Zaremba
Venue
arXiv · Preprint
First published
2016-6-5
Added
2026-11-11
Updated
2016-6-5
Version
v1
arXiv
1606.01540
Category
cs.LG · cs.AI
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, Wojciech Zaremba (2016). OpenAI Gym. arXiv:1606.01540v1. https://arxiv.org/abs/1606.01540v1

BibTeX
@misc{brockman2016openai,
  title = {{OpenAI Gym}},
  author = {Greg Brockman and Vicki Cheung and Ludwig Pettersson and Jonas Schneider and John Schulman and Jie Tang and Wojciech Zaremba},
  year = {2016},
  eprint = {1606.01540},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.01540v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up