git404hub

what is gym fr?

openai/gym — explained in plain English

Analysis updated 2026-06-20

37,181PythonAudience · researcherComplexity · 3/5LicenseSetup · moderate

tl;dr

A standard toolkit of simulated game and physics environments for teaching AI agents through trial and reward. Now superseded by Gymnasium, use this repo only for legacy projects.

vibe map

mindmap
  root((OpenAI Gym))
    What it does
      Simulated environments
      Standard RL interface
      Algorithm testing
    Tech stack
      Python 3.7 to 3.10
      MuJoCo physics
    Environment types
      Atari games
      Pole balancing
      Robotics sims
      Grid worlds
    Status
      No longer maintained
      Succeeded by Gymnasium
    Audience
      AI researchers
      ML developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Test a reinforcement learning algorithm across many different environments without rewriting code

VIBE 2

Run or reproduce older AI research experiments that depend on the Gym API

VIBE 3

Learn the basics of how AI agents are trained through simulated trial and reward

VIBE 4

Benchmark and compare different learning strategies using standard environments like Atari games

what's the stack?

PythonMuJoCo

how it stacks up fr

openai/gym0voice/interview_internal_referencesqlmapproject/sqlmap
Stars37,18137,22537,268
LanguagePythonPythonPython
Setup difficultymoderateeasyeasy
Complexity3/51/53/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Requires Python 3.7, 3.10. Some environments need MuJoCo. For new projects, install Gymnasium instead: pip install gymnasium.

Open-source, free to use and modify for research and development.

in plain english

OpenAI Gym is a Python toolkit that provides a standard set of simulated environments for developing and testing reinforcement learning algorithms. Reinforcement learning is a branch of AI where an agent learns by taking actions in an environment and receiving rewards or penalties, the goal is to learn a strategy that maximizes cumulative rewards over time. The problem Gym solves is that building such environments from scratch for every experiment is time-consuming, and without a common interface, it is hard to compare different algorithms fairly. Gym defines a simple, consistent API: every environment has a step function (take an action, get back the new state and a reward), a reset function (start fresh), and an observation space and action space describing what the agent can see and do. Researchers or developers implement their learning algorithm once against this interface, then swap in different environments without changing their code. The library shipped with a wide variety of built-in environments, classic control tasks like balancing a pole on a cart, Atari video game simulators, physics-based robotics simulations using the MuJoCo physics engine, and simple grid worlds. Note from the README: Gym itself is no longer actively maintained. The team that maintained it since 2021 has moved all future development to a successor project called Gymnasium (by the Farama Foundation), which is a drop-in replacement. If you are starting a new project, the README explicitly recommends switching to Gymnasium instead. You would use the original Gym repository to run older code that depends on it, or to understand the history of the reinforcement learning API standard. The tech stack is Python, compatible with versions 3.7 through 3.10 on Linux and macOS.

prompts (copy fr)

prompt 1
Show me how to set up a basic reinforcement learning loop using OpenAI Gym's CartPole environment in Python.
prompt 2
How do I write a simple Q-learning agent that trains on an OpenAI Gym environment?
prompt 3
I have old code that uses openai/gym, what's the minimum change needed to migrate it to Gymnasium?
prompt 4
How do I create a custom Gym-compatible environment with its own observation space and reward function?

Frequently asked questions

what is gym fr?

A standard toolkit of simulated game and physics environments for teaching AI agents through trial and reward. Now superseded by Gymnasium, use this repo only for legacy projects.

What language is gym written in?

Mainly Python. The stack also includes Python, MuJoCo.

What license does gym use?

Open-source, free to use and modify for research and development.

How hard is gym to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is gym for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.