Code Monkey home page Code Monkey logo

Comments (5)

jkterry1 avatar jkterry1 commented on May 30, 2024

By the way-

I linked to this repo in the PettingZoo and Gym third party env lists:
https://www.pettingzoo.ml/third_party_envs
https://github.com/openai/gym/blob/master/docs/third_party_environments.md (this will be a website in the coming months)

from sumo-rl.

LucasAlegre avatar LucasAlegre commented on May 30, 2024

(new thread to simply the discussion of the hanging issues in #45)

"When using LIBSUMO, it is not possible to instantiate more than 1 simulation at the same time. This means that eval_callback can't work. If you use TRACI, I can easily implement multi-client support and this would be possible. But remember that TRACI is way slower than LIBSUMO, so I'm not sure whether this is advantageous." -Could you please elaborate a bit more on all this? Using eval callback is essential to what I'm planning to do with this, and running multiple environments at once is generally desirable when learning with PPO

I have just added support for multiple simulations in parallel with TRACI :)
TRACI and LIBSUMO are different libraries (with basically the same API) that you can use to control SUMO through python. TRACI is way slower, but lets you open multiple parallels connections (and thus instantiate training and eval envs at the same time). LIBSUMO is way faster, but for now it only supports a single connection.
In short, if you need to run multiple envs in parallel, you need to use TRACI. Then, unset the LIBSUMO_AS_TRACI system variable.

Regarding how rendering doesn't work in my sb3 code snippet, is there code somewhere that generates videos of the simulation rendering that I could adapt into that snippet?

Give a check at https://sumo.dlr.de/docs/FAQ.html#building_videos_from_sumo-gui . I have never done this, but it should be possible.

Thanks again for all your help, I really appreciate it :)

I'm glad to help! :)

from sumo-rl.

LucasAlegre avatar LucasAlegre commented on May 30, 2024

By the way-

I linked to this repo in the PettingZoo and Gym third party env lists: https://www.pettingzoo.ml/third_party_envs https://github.com/openai/gym/blob/master/docs/third_party_environments.md (this will be a website in the coming months)

Thanks! :D

from sumo-rl.

jkterry1 avatar jkterry1 commented on May 30, 2024

Do you happen to have any benchmarks of how much slower TRACI is vs LIBSUMO?

from sumo-rl.

LucasAlegre avatar LucasAlegre commented on May 30, 2024

Do you happen to have any benchmarks of how much slower TRACI is vs LIBSUMO?

I have tested on experiments/ql_4x4grid.py once, and LIBSUMO was around 8x faster. However, the bottleneck is the number of vehicles, as we need to retrieve information for all vehicles in the simulation. So in smaller scenarios this difference may be not that big.

You can try to ask in https://github.com/eclipse/sumo if they have more results on this.

from sumo-rl.

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.