Questions tagged [gym]

For questions about OpenAI's gym library, which provides a set of APIs to access different types of environments to train reinforcement learning agents.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

Deployment of a DeepRL model trained on a custom OpenAI-GYM environment

I developed a custom OpenAI-GYM environment and trained a CDQN model on it, now I am trying to figure out how can I test it not using my gym environment but in production (using real world ...
0
votes
0answers
18 views

How to scale the action in a custom environment with DDPG?

I am trying to implement DDPG in a custom gym environment. The action is the relative allocation of funds between each asset. The action space is a Box with the ...
1
vote
1answer
51 views

How do I get started with multi-agent reinforcement learning?

Is there any tutorial that walks through a multi-agent reinforcement learning implementation (in Python) using libraries such as OpenAI's Gym (for the environment), TF-agents, and stable-baselines-3? ...
1
vote
0answers
33 views

Why does Q-value become negative during training of DQN, while the agent learns to play?

I have implemented a simple version of the DQN algorithm for CartPole-v0. The algorithm works fine, in the sense that achieves the highest possible scores. The ...
1
vote
0answers
29 views

Difference in average rewards between taking random actions and following random policies

I wrote two programs that simulated 10000 episodes in gym environment CartPole-v0. The first program takes random moves in every steps in each episode. The average reward over 10000 episodes is 22....
1
vote
0answers
56 views

How to deal with KerasRL DDPG algorithm getting stuck in a local optima?

I am using KerasRL DDPG to try to learn a policy on my own custom environment, but the agent is stuck in a local optima although I am adding the OrnsteinUhlenbeck randomization process. I used the ...
0
votes
0answers
26 views

Is there a resource that explains which settings mean 'High' or 'Low' difficulty in the ALE environment?

I have been using AIgym to train my RL agents. I am now trying to take advantage of the different difficulty settings that the ALE offers. However I can't find a resource that explains which ...
1
vote
1answer
104 views

How do I create a custom gym environment based on an image?

I am trying to create my own gym environment for the A3C algorithm (one implementation is here). The custom environment is a simple login form for any site. I want to create an environment from an ...
3
votes
1answer
69 views

What are the state-of-the-art results in OpenAI's gym environments?

What are the state-of-the-art results in OpenAI's gym environments? Is there a link to a paper/article that describes them and how these SOTA results were calculated?
0
votes
0answers
44 views

mujoco environment in openai gym: observation and action explanation and control

I am new to RL and mujoco. I just set up mujoco and am testing the FetchPickAndPlace environment. I called the following methods: env.action_space.sample() returns ...
0
votes
0answers
12 views

How to obtain the penetration term for the Fetch Environments in the OpenAI gym?

In the experiments section of the HER paper, the authors mention that they added the square depth penetration term to the reward so as to penalize such behavior. Where do you get this quantity in the ...
4
votes
2answers
175 views

My Deep Q-Learning Network does not learn for OpenAI gym's cartpole problem

I am implementing OpenAI gym's cartpole problem using Deep Q-Learning (DQN). I followed tutorials (video and otherwise) and learned all about it. I implemented a code for myself and I thought it ...
1
vote
1answer
267 views

DDPG doesn't converge for MountainCarContinuous-v0 gym environment

I am trying to implement Deep Deterministic policy gradient algorithm by referring to the paper Continuous Control using Deep Reinforcement Learning on the MountainCarContinuous-v0 gym environment. I ...
2
votes
0answers
67 views

Most of state-action pairs remain unvisited in the q-table

In building my first Q-learning algorithm for OpenAI gym's CartPole problem, many of my states remain unvisited. I believe it is the reason that my agent does not learn. Can I be told of the reasons I ...
1
vote
0answers
63 views

OpenAI gym's CartPole problem system does not learn

My OpenAI CartPole-v0 problem's implementation using basic Q-learning does not learn at all. I am a beginner and have implemented my first ever Q-learning from scratch after learning from tutorials. ...
0
votes
1answer
220 views

How can I change observation states' values in OpenAI gym's cartpole environment?

I am learning with the OpenAI gym's cart pole environment. I want to make the observation states discrete (with small stepsize) and for that purpose, I need to change two of the observations from [$ -\...
3
votes
2answers
219 views

How does an episode end in OpenAI Gym's “MountainCar-v0” environment? [closed]

I am working on OpenAI's "MountainCar-v0" environment. In this environment, each step that an agent takes returns (among other values) the variable named ...
0
votes
1answer
38 views

Should I build an environment from scratch myself or it is not always needed?

I am inspired by the paper Neural Architecture Search with Reinforcement Learning to use reinforcement learning for optimizing a child network (learner). My meta-learner (controller or parent network) ...
1
vote
1answer
214 views

What is a RAM state in the gym's breakout-ram environment?

I have encountered the gym environment and decided to create AI that plays breakout. Here is the link: https://gym.openai.com/envs/Breakout-ram-v0/. The documentation says that the state is ...
1
vote
1answer
109 views

How can I model and solve the Knight Tour problem with reinforcement learning?

I've read about the Knight Tour problem. And I wanted to try to solve it with a reinforcement learning algorithm with OpenAI's gym. So, I want to make a bot that can move on the chess table like the ...
2
votes
1answer
78 views

What should the action space for the card game Crib be?

I'm working on creating an environment for a card game, which the agent chooses to discard certain cards in the first phase of the game, and uses the remaining cards to play with. (The game is Crib if ...
0
votes
1answer
296 views

OpenAI Gym: Multiple actions in one step

I'm trying to design an OpenAI Gym environment in which multiple users/players perform actions over time. It's round based and each user needs to take an action before the round is evaluated and the ...
2
votes
1answer
51 views

How can I implement policy evaluation when reward is tied to an action outcome?

I'm following Stanford reinforcement learning videos on youtube. One of the assignments asks to write code for policy evaluation for Gym's FrozenLake-v0 environment. In the course (and books I have ...
1
vote
0answers
85 views

How to integrate dict space of OpenAI gym into a reinforcement learning framework?

I am implementing a gym environment and I have several input arrays as my input (different sizes). The most simple method to integrate my environment into the gym is to use the dict space as my ...
1
vote
0answers
19 views

Running a simple graph network example in gym

This a fix example to run in gym open ai ...
2
votes
0answers
126 views

How to formulate normalization/probability conditions on state-action spaces in Gym?

I intend to develop a custom environment for open-ai's gym. My goal is for an agent to learn (among additional objectives) dividing a certain quantity drawn from a continous action space (i.e. spaces....
2
votes
2answers
261 views

Should I always start from the same start state in reinforcement learning?

In an episodic training of an RL agent, should I always start from the same initial state or I can start from several valid initial states? For example, in a gym environment, should my ...
1
vote
0answers
68 views

How to define observation and action space for an array-like input?

I am working on a problem, and I want to implement it as a reinforcement learning problem and integrate it into the OpenAI's gym. My states are in the form of lists of length $n$, where each element ...
1
vote
0answers
118 views

How can I add logic for invalid moves when using stable-baselines in OpenAI's gym?

I want to integrate my environment into the OpenAI's gym and then use the stable baselines library for training it. The learning method in the stable baseline is with one-line learning and you don't ...
1
vote
0answers
30 views

How should I avoid illegal states in OpenAI's gym?

I'm trying to make a gym environment for a simulation problem. In my gym environment, I have a set of illegal states which I don't want my agent to go into them. What is the easiest way to add such ...
2
votes
1answer
82 views

How can I implement the reward function for an 8-DOF robot arm with TRPO?

I need to get an 8-DOF (degrees of freedom) robot arm to move a specified point. I need to implement the TRPO RL code using OpenAI gym. I already have the gazebo environment. But I am unsure of how to ...
2
votes
1answer
204 views

Why isn't my implementation of DQN using TensorFlow on the FrozenWorld environment working?

I am trying to test DQN on FrozenWorld environment in gym using TensorFlow 2.x. The update rule is (off policy) $$Q(s,a) \leftarrow Q(s,a)+\alpha (r+\gamma~ max_{a'}Q(s',a')-Q(s,a))$$ I am using an ...
3
votes
0answers
278 views

How to define an action space when an agent can take multiple sub-actions in a step?

I'm attempting to design an action space in OpenAI's gym and hitting the following roadblock. I've looked at this post which is closely related but subtly different. The environment I'm writing needs ...
2
votes
2answers
235 views

Simulating successful trajectories in Montezuma's Revenge turns out to be unsuccessful

I have written code in OpenAI's gym to simulate a random playing in Montezuma's Revenge where the agent randomly samples actions from the action space and tries to play the game. A success for me is ...
5
votes
1answer
690 views

How powerful is OpenAI's Gym and Universe in board games area?

I'm a big fan of computer board games and would like to make Python chess/go/shogi/mancala programs. Having heard of reinforcement learning, I decided to look at OpenAI Gym. But first of all, I would ...
0
votes
1answer
43 views

Why is this deep Q agent constantly learning just one action?

I'm trying to implement deep q learning in the OpenAI's gym "Taxi-v3" environment. But my agent only learns to do one action in every state. What am I doing wrong? Here is the Github repository with ...
1
vote
1answer
273 views

Are there OpenAI Gym continuing environments (other than inverted pendulum) and baselines?

I would like to use OpenAI Gym to solve a continuing environment, that is, a problem with a single, never-ending episode (please note I don't mean a continuous environment with continuous state and ...
4
votes
0answers
67 views

Unable to train Coach for Banana-v0 Gym environment

I have just started playing with Reinforcement learning and starting from the basics I'm trying to figure out how to solve Banana Gym with coach. Essentially ...
1
vote
0answers
71 views

Getting score values from openai gym rom

I am using the SpaceInvaders-ram-v0 from OpenAI gym. I want to extract the game's current score using the RAM values. How do I get it? I tried doing some research ...
2
votes
3answers
2k views

Has anyone been able to solve OpenAI's hardcore bipedal walker with their implementation of DDPG?

As the question suggests, I'm trying to see if I can solve OpenAI's hardcore version of their gym's bipedal walker using OpenAI's DDPG algorithm. Below is a performance graph from my latest attempt, ...
2
votes
0answers
79 views

Is it possible to use Reward Function of type R(s, a, s') if more than one action is applied?

I am applying a reinforcement learning agent (PPO2, stable baselines implementation) to a custom built environment using OpenAI Gym. One reward function (formualted as loss function, that is, all ...
2
votes
0answers
317 views

Gym dict space as keras DQN agent input

I'm trying to make an AI to play my own card game. I have an OpenAI gym for the game with Dict as an observation space. It is nested dict, so I can't easily replace it with a tuple. I want to pass ...
1
vote
1answer
301 views

OpenAI Gym interface when reward calculation is delayed? (continuous control with considerable reaction time)

I'm about to create an OpenAI Gym environment for a flight simulator. I'm wondering, how to cope with the fact, that the result and reward for some action needs a considerable time to advance through ...
1
vote
0answers
398 views

Difficulty in balancing Pendulum using Deep Reinforcement Learning Algorithm [closed]

I am using OpenAI Gym framework for reinforcement learning where I am trying solve classic control problem of balancing an Inverted Pendulum, which is similar to the "Pendulum-v0" with some changes in ...
2
votes
1answer
280 views

What is the difference between A2C and running an agent in an environment vector?

I've implemented A2C. I'm now wondering why would we have multiple actors walk around the environment and gather rewards, why not just have a single agent run in an environment vector? I personally ...
1
vote
1answer
126 views

Should I ignore the actions RIGHTFIRE and LEFTFIRE in the SpaceInvaders environment? [closed]

I'm trying to replicate the DeepMind DQN paper. I'm using OpenAI's Gym. I'm trying to get a decent score with Space Invaders (using SpaceInvaders-v4 environment). I ...
1
vote
2answers
133 views

Is there a way to run other platforms (other than Atari) in an OpenAI's Gym-like environment?

Is there a way to run C64, Nintendo Gameboy, or other platforms in an OpenAI's Gym-like environment? It seems that we can run only Atari games.
1
vote
1answer
2k views

What is the use of the seed function in the gym Environment 'Pendulum-v0'?

Why do we use the seed function in the 'Pendulum-v0' environment? https://github.com/openai/gym/blob/master/gym/envs/classic_control/pendulum.py#L25
3
votes
1answer
675 views

What is the mapping between actions and numbers in OpenAI's gym? [closed]

In a gym environment, the action space is often a discrete space, where each action is labeled by an integer. I cannot find a way to figure out the correspondence ...
9
votes
3answers
14k views

What do the different actions of the OpenAI gym's environment of 'Pong-v0' represent? [closed]

Printing action_space for Pong-v0 gives Discrete(6) as output, i.e. $0, 1, 2, 3, 4, 5$ are actions defined in the environment as ...