openai-gym

Reinforcement Learning Using Multiple Stock Ticker’s Datasets?

老子叫甜甜 提交于 2021-02-19 07:49:05
问题 Here’s a general question that maybe someone could point me in the right direction. I’m getting into Reinforcement Learning with Python 3.6/Tensorflow and I have found/tweaked my own model to train on historical data from a particular stock. My question is, is it possible to train this model on more than just one stock’s dataset? Every single machine learning article I’ve read on time series prediction and RL uses one dataset for training and testing, but my goal is to train a model on a

Why am I getting “invalid syntax” error while importing universe module from openAI

人盡茶涼 提交于 2021-02-09 09:51:36
问题 When I import universe module from openAI. I get the following error. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/__init__.py", line 22, in <module> from universe import error, envs File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/envs/__init__.py", line 1, in <module> import universe.envs.vnc_env File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site

Why am I getting “invalid syntax” error while importing universe module from openAI

半城伤御伤魂 提交于 2021-02-09 09:51:34
问题 When I import universe module from openAI. I get the following error. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/__init__.py", line 22, in <module> from universe import error, envs File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/envs/__init__.py", line 1, in <module> import universe.envs.vnc_env File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site

OpenAI gym's breakout-v0 “pauses”

倖福魔咒の 提交于 2021-02-08 21:48:24
问题 While training in the OpenAI gym environment I have the idea that the environment sometimes "stops". For many frames in a row no ball is visible/stops spawning. Is this an error in the gym environment? Is this something that is part of the game Breakout-v0? I was also wondering what the possible actions are in Breakout-v0. What I kind of figured out: 0 - do nothing/stand still? 1 - do nothing/stand still? 2 - apply "force" to the right? 3 - apply "force" to the left? Edit: For people

How to install OpenAI Universe without getting error code 1 on Windows?

痴心易碎 提交于 2021-02-04 13:26:23
问题 When I try to install OpenAi Universe on my Windows machine via python pip I get following stacktrace: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Me\AppData\Local\Temp\pip-build-yjf_mrwx\fastzbarlight\setup.py", line 49, in <module> proc = subprocess.Popen(['ld', '-liconv'], stderr=subprocess.PIPE) File "E:\Python3.5.2\lib\subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "E:\Python3.5.2\lib\subprocess.py", line 1224, in

How to install OpenAI Universe without getting error code 1 on Windows?

假如想象 提交于 2021-02-04 13:26:07
问题 When I try to install OpenAi Universe on my Windows machine via python pip I get following stacktrace: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Me\AppData\Local\Temp\pip-build-yjf_mrwx\fastzbarlight\setup.py", line 49, in <module> proc = subprocess.Popen(['ld', '-liconv'], stderr=subprocess.PIPE) File "E:\Python3.5.2\lib\subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "E:\Python3.5.2\lib\subprocess.py", line 1224, in

Trouble installing OpenAI's gym

安稳与你 提交于 2021-01-28 09:01:09
问题 I would like to install the entire Open AI gym package. After (I am on a mac) brew install cmake , sudo pip install gym[all] gives me the following error I am using anaconda 4.3.22. I am not in a conda virtual environment. which python outputs /anaconda/bin/python . The interpreter that anaconda uses is python 3.6.1. Just running sudo pip gym (which must be the minimal version) ran fine. Thanks for the help. 回答1: I have successfully installed gym on my mac laptop, and brew install swig will

Tensorflow 2 ValueError: Shapes (20, 1) and (20, 2) are incompatible in gym environment

心不动则不痛 提交于 2021-01-28 05:34:43
问题 Just for learning I wanted to test this code. But there is a problem in it. I do not understand the problem. It says: ValueError: Shapes (20, 1) and (20, 2) are incompatible from the line loss = network.train_on_batch(states, discounted_rewards) Maybe there is something new in Tensorflow that was not there, the it was implemented. The code from the website: https://adventuresinmachinelearning.com/policy-gradient-tensorflow-2/ import gym import tensorflow as tf from tensorflow import keras

Getting “ AttributeError: 'ImageData' object has no attribute 'data' ” in headless gym jupyter Python 2.7

心已入冬 提交于 2021-01-27 18:54:15
问题 I am trying to run gym in headless server and render the same in jupyter. Python version 2.7. I have started the jupyter using xvfb-run -a -s "-screen 0 1400x900x24" jupyter notebook Below is the Jupyte cell that I run. import matplotlib.pyplot as plt import gym from IPython import display %matplotlib inline env = gym.make('CartPole-v0') env.reset() plt.imshow(env.render(mode='rgb_array')) display.display(plt.gcf()) display.clear_output(wait=True) env.step(env.action_space.sample()) # take a

Low GPU utilisation when running Tensorflow

寵の児 提交于 2021-01-27 07:10:20
问题 I've been doing Deep Reinforcement Learning using Tensorflow and OpenAI gym. My problem is low GPU utilisation. Googling this issue, I understood that it's wrong to expect much GPU utilisation when training small networks ( eg. for training mnist). But my Neural Network is not so small, I think. The architecture is similar to the given in the original deepmind paper (more or less). The architecture of my network is summarized below Convolution layer 1 (filters=32, kernel_size=8x8, strides=4)