Coder Social home page Coder Social logo

Comments (7)

michaelschaarschmidt avatar michaelschaarschmidt commented on June 23, 2024

Hi,

this seems more like an issue with the interface to gym, we will get on it, thanks for bringing it up!

from tensorforce.

AlexKuhnle avatar AlexKuhnle commented on June 23, 2024

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.

AlexKuhnle avatar AlexKuhnle commented on June 23, 2024

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.

sof avatar sof commented on June 23, 2024

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.

AlexKuhnle avatar AlexKuhnle commented on June 23, 2024

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.

AlexKuhnle avatar AlexKuhnle commented on June 23, 2024

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.

sof avatar sof commented on June 23, 2024

Can confirm that BipedalWalker-v2's Box(4) actions are now handled just fine; thanks.

from tensorforce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.