Comments (7)
Hi,
this seems more like an issue with the interface to gym, we will get on it, thanks for bringing it up!
from tensorforce.
Hey, so after trying to run this, I first realized that there is a dependency to Box2D, which needs to be installed, but after doing so, it still does not work for me because of an exception from within Box2D:
File ".../gym/envs/box2d/__init__.py", line 1, in <module>
from gym.envs.box2d.lunar_lander import LunarLander
File ".../gym/envs/box2d/lunar_lander.py", line 4, in <module>
import Box2D
File ".../Box2D/__init__.py", line 20, in <module>
from .Box2D import *
File ".../Box2D/Box2D.py", line 435, in <module>
_Box2D.RAND_LIMIT_swigconstant(_Box2D)
AttributeError: module '_Box2D' has no attribute 'RAND_LIMIT_swigconstant'
Hence I'm not even getting as far as you do, unfortunately.
from tensorforce.
Nevertheless, you're right, we are not properly translating the Gym action interface in this case (and probably others), so thanks for pointing this out. In fact, our current setup requires that actions are all single-value, i.e. 0-dimensional. I realize now that this might not always be the most convenient way, so we will change this to allow action shapes. We should be able to fix this over the weekend, I'm pretty sure.
from tensorforce.
Great, thanks for looking into this right away. Evaluating TRPO+GAE with multiple continuous actions is particularly interesting.
(openai/gym#100 covers the state of Box2D ; I had to compile pybox2d from sources to get something working.)
from tensorforce.
Update: It turns out that a proper integration of action arrays requires quite some adaptations in various classes. Unfortunately, these changes aren't quite finished yet, but I think will be in the next 2-3 days. It will then be possible to define an action shape, e.g. dict(continuous=False, shape=(2, 3), num_actions=5)
, and the Gym environment should hopefully work.
from tensorforce.
This should work now. I haven't tried it on the BipedalWalker environment (because of the box2d problems), but let me know if it does not work. I will close this issue for now, assuming that it does. Feel free to reopen it, if it still is not working.
from tensorforce.
Can confirm that BipedalWalker-v2's Box(4) actions are now handled just fine; thanks.
from tensorforce.
Related Issues (20)
- Gym envirnoment broken: 'dict' object has no attribute 'env_specs HOT 3
- Issues installing Tensorforce from pip on Python 3.10
- is it still active? HOT 2
- How to change epsilon value when using epsilon-greedy policy? HOT 2
- Can I customize the loss function?
- Saver documentation inconsistent with example
- End-to-end data collection and policy updates on the GPU possible with tensorforce
- how to modify the loss function of the value network in PPO
- AttributeError: 'Adam' object has no attribute '_create_all_weights' HOT 3
- Why different models performs the same HOT 1
- AttributeError: type object 'Module' has no attribute '_MODULE_STACK' HOT 1
- tensorforce.exception.TensorforceError: Invalid value for variable argument spec: TensorSpec HOT 1
- Comparison of "online" and "offline" agent-enviroment interactions
- error creating an agent
- TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' HOT 2
- A minimal example of custom Environment fails on protobuf or dtensor import from tensorflow.compat.v2.experimental HOT 6
- How to specify min_value and max_value in a custom environment when shape of the state is a vector? HOT 1
- Does Runner.run perform training given it never invokes agent.experience(...) ? HOT 1
- logging to logdir for tensorboard? HOT 1
- Some issue about PPOAgent update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorforce.