Code Monkey home page Code Monkey logo

amgu's Introduction

format Pypi

About Amgu

The majority of paper in the subject of DRL & traffic mannagment don't share thier code or the data they used for train. There is an need to organize & create uniforms between paper &code a like. Amgu try to execly do that, creating abstract classes that can be hierarchical from and be easy to use and prevent cooled start. Traffic Managment System (including agent) has been created using thoes classes.Amgu-Traffic enable developer to use easy API with custom & premade model and envierments & Attacks on thoes.

Built With

Amgu has been built using, the following:

Getting Started

To use this project you'll need to have CityFlow already install inside your pip enviorment. In Addition ray should be installed custom to your machine(x86/x64).

Installation

Bellow example show the step to install and run example of Amgu.

  1. Install Amgu Traffic using Pypi.
       pip install Amgu/.
  2. Use in your code.
       from Amgu.basic.env import CityFlow1D
       from Amgu.basic.reward import *
       from Amgu.runnner import stable_baseline_train
       from stable_baselines3 import DQN
    
       exp_name = "DQN_delta_waiting_time_1x1"
       stable_baselines_config = {
           "experiment_name": exp_name,
           "env_config": {
               "config_path": "example/1x1/config.json",
               "steps_per_episode": 400,
               "save_path": "example/1x1/res/",
           },
           "env_param": {"reward_func": queue_length, "district": True},
           "policy_param": {
               "policy": "MlpPolicy",
               "tensorboard_log": f"{exp_name}/tesnorboard",
               'policy_kwargs': dict(activation_fn=th.nn.ReLU, net_arch=[146,50,8]),
               "gamma": 0.95,
               "learning_rate": 0.005,
               "exploration_initial_eps": 1,
               'exploration_fraction': 0.9,
               "exploration_final_eps": 0.15,
               'target_update_interval': 1_000,
           },
           "evaluation_interval": 400,
           "evaluation_duration": 1,
           "stop": {"training_iteration": 2_000},
       }
       stable_baseline_train(DQN, CityFlow1D, stable_baselines_config)

Roadmap

  • Abstract Class.
  • Traffic Class (using cityflow).
  • Add Documntation.
  • Build Test

See the open issues for a full list of proposed features (and known issues).

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

amgu's People

Contributors

amit-nadam avatar dev0guy avatar guyarieli17 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

guyarieli17

amgu's Issues

Create Test For Traffic

We need to create a simple unitest module for the package.
The function for each file has been created & needs to be implemented.

Third Step- Multiagents

  • Create New ENV for multiagent
  • Multiagent models
  • Compare single agent with couple of intersection against multiagent

Environment path isn't working

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Second Step- Tensor board

  • How and Where to save to data from rllib
  • Create simple tensorboard
  • Decide on graph to show on tensorboard
  • Create tensorboard with those graphs

Create Lib for are product

Currently, the package does not follow the guideline of PyPi package.
Therefore, there is a need to create a project hierarch + docs (easy Api) + abstract all methods for easy access

  • project hierarch
  • docs
  • abstract all methods

Create Docs

Docs add been created however there are two env inside the docs on traffic.

Single Entry point

  • Add a single script that runs each option
  • Add attacks for the future from prev project

First Steps - Init

  • db- create database, run and visualise json file.
  • create simple custome env for rllib
  • create simple custome model for rllib

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.