openai-gym

rllib use custom registered environments

别来无恙 提交于 2020-07-21 07:03:25
问题 Rllib docs provide some information about how to create and train a custom environment. There is some information about registering that environment, but I guess it needs to work differently than gym registration. I'm testing this out working with the SimpleCorridor environment. If I add the registration code to the file like so: from ray.tune.registry import register_env class SimpleCorridor(gym.Env): ... def env_creator(env_config): return SimpleCorridor(env_config) register_env("corridor",

Is it possible to modify OpenAI environments?

你离开我真会死。 提交于 2020-02-22 08:42:28
问题 There are some things that I would like to modify in the OpenAI environments. If we use the Cartpole example then we can edit things that are in the class init function but with environments that use Box2D it doesn't seem to be as straight forward? For example, consider the BipedalWalker environment. In this case how would I edit things like the SPEED_HIP or SPEED_KNEE variables? Thanks 回答1: Yes, you can modify or create new environments in gym. The simplest (but not recommended) way is to

Is it possible to modify OpenAI environments?

与世无争的帅哥 提交于 2020-02-22 08:36:54
问题 There are some things that I would like to modify in the OpenAI environments. If we use the Cartpole example then we can edit things that are in the class init function but with environments that use Box2D it doesn't seem to be as straight forward? For example, consider the BipedalWalker environment. In this case how would I edit things like the SPEED_HIP or SPEED_KNEE variables? Thanks 回答1: Yes, you can modify or create new environments in gym. The simplest (but not recommended) way is to

Pygame and Open AI implementation

佐手、 提交于 2020-01-24 14:12:47
问题 Me and my classmate have decided to try and implement and AI agent into our own game. My friend have done most of the code, based on previous projects, and I was wondering how PyGame and OpenAI would work together. Have tried to do some research but can't really find any useful information about this specific topic. Some have said that it is hard to implement but some say it works. Either way, I'd like your opinion on this project and how you'd approach this if it was you. The game is very

Pygame and Open AI implementation

谁说我不能喝 提交于 2020-01-24 14:11:10
问题 Me and my classmate have decided to try and implement and AI agent into our own game. My friend have done most of the code, based on previous projects, and I was wondering how PyGame and OpenAI would work together. Have tried to do some research but can't really find any useful information about this specific topic. Some have said that it is hard to implement but some say it works. Either way, I'd like your opinion on this project and how you'd approach this if it was you. The game is very

Getting multiprocessing lock error when running vizdoom and pytorch program on Windows Subsystem for Linux

谁说胖子不能爱 提交于 2020-01-06 14:18:11
问题 whenever I try to run my program on WSL, I get the following error. I'm pretty new to pytorch and vizdoom, so I don't know how to solve this problem. Setup - Windows 10 x64 - Ubuntu 14 (on WSL) - Python 2.7.14 (Anaconda 2) - OpenAI Gym 0.9.5 - Vizdoom 1.1.4 - doom-py 0.0.14 - ppaquette/gym-doom - pytorch 0.0.12 (doomenv) hybridsyntax@Blacklynx:/mnt/f/_TUTORIALS/ai/doom/code$ python ai.py > wsl.log [2018-05-25 18:21:44,354] Making new env: ppaquette/DoomCorridor-v0 [2018-05-25 18:21:44,365]

openAI Gym NameError in Google Colaboratory

青春壹個敷衍的年華 提交于 2019-12-22 05:13:46
问题 I've just installed openAI gym on Google Colab, but when I try to run 'CartPole-v0' environment as explained here. Code: import gym env = gym.make('CartPole-v0') for i_episode in range(20): observation = env.reset() for t in range(100): env.render() print(observation) action = env.action_space.sample() observation, reward, done, info = env.step(action) if done: print("Episode finished after {} timesteps".format(t+1)) break I get this: WARN: gym.spaces.Box autodetected dtype as <class 'numpy

open ai gym Nameerror

巧了我就是萌 提交于 2019-12-20 19:39:30
问题 I am trying to use the famous 'Gym' module from OpenAI on WSL and executing code on python 3.5.2. When I try to run an environment as explained here, using the code: import gym env = gym.make('CartPole-v0') for i_episode in range(20): observation = env.reset() for t in range(100): env.render() print(observation) action = env.action_space.sample() observation, reward, done, info = env.step(action) if done: print("Episode finished after {} timesteps".format(t+1)) break this happens : Traceback