OpenAI-gym like toolkit for developing and comparing reinforcement learning algorithms on SUMO
Project description
SUMO-gym
OpenAI-gym like toolkit for developing and comparing reinforcement learning algorithms on SUMO.
Installation
Install SUMO, SUMO GUI and XQuartz according to official guide.
$ python3 -m venv .env
$ source .env/bin/activate
(.env)$ pip install -r requirements.txt
(.env)$ pip install sumo-gym
(.env)$ export SUMO_HOME=<your_path_to>/sumo SUMO_GUI_PATH=<your_path_to>/sumo-gui # and copy the paths to ~/.bashrc
The installation is successful so far, then you can try the examples in the tutorials, for example:
(.env)$ python3 tutorials/fmp-jumbo.py --render 0
Features
SUMO-gym aims to build an interface between SUMO and Reinforcement Learning. With this toolkit, you will be able to convert the data generated from SUMO simulator into RL training setting like OpenAI-gym.
Remarkable features include:
- OpenAI-gym RL training environment based on SUMO.
import gym
from sumo_gym.envs.fmp import FMP
env = gym.make(
"FMP-v0", mode, n_vertex, n_edge, n_vehicle,
n_electric_vehicles, n_charging_station,
vertices, demand, edges,
electric_vehicles, departures, charging_stations,
)
for _ in range(n_episode):
obs = env.reset()
for t in range(n_timestamp):
action = env.action_space.sample()
obs, reward, done, info = env.step(action)
if done:
break
env.close()
- Rendering tools based on matplotlib for urban mobility problems.
- Visualization tools that plot the statistics for each observation.
Contributors
We would like to acknowledge the contributors that made this project possible (emoji key):
N!no 💻 🐛 🤔 |
yunhaow 💻 🐛 🤔 |
Sam Fieldman 🐛 🤔 |
Lauren Hong 💻 |
nmauskar 💻 |
This project follows the all-contributors specification.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sumo_gym-0.5.0.tar.gz.
File metadata
- Download URL: sumo_gym-0.5.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6976e15cfee17f439ef5c3ec58e4c5cbdfedc6ce8b8730820a530c036e49723
|
|
| MD5 |
64f98699fe42f267ef56e634a4fae6f0
|
|
| BLAKE2b-256 |
98f759052a71586a2b1fe4535b70494613cf88a8b28412686b51531c203ff77d
|
File details
Details for the file sumo_gym-0.5.0-py3-none-any.whl.
File metadata
- Download URL: sumo_gym-0.5.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2174445c998c0ddc8209cea899554d809d4fdbbaaaa161f822eff7db97b8589
|
|
| MD5 |
86d9bcfa28889ef29cb86d66fc46fd16
|
|
| BLAKE2b-256 |
c5cebbbd55244352a6d50f9e89505e29d215993dfb7797d56ec8c3340b5d3775
|