{"id":18449388,"url":"https://github.com/dev0guy/amgu","last_synced_at":"2025-08-17T13:35:25.842Z","repository":{"id":37851819,"uuid":"481217159","full_name":"dev0Guy/amgu","owner":"dev0Guy","description":"🚦 Traffic Management System 🚏 With Deep Reinforcement Learning 🚗","archived":false,"fork":false,"pushed_at":"2022-06-18T13:55:59.000Z","size":60603,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"production","last_synced_at":"2025-06-14T17:03:48.178Z","etag":null,"topics":["cityflow","drl-pytorch","library","open-source","rllib","traffic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev0Guy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-13T12:57:29.000Z","updated_at":"2022-10-08T06:01:47.000Z","dependencies_parsed_at":"2022-06-22T22:15:32.760Z","dependency_job_id":null,"html_url":"https://github.com/dev0Guy/amgu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dev0Guy/amgu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0Guy%2Famgu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0Guy%2Famgu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0Guy%2Famgu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0Guy%2Famgu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev0Guy","download_url":"https://codeload.github.com/dev0Guy/amgu/tar.gz/refs/heads/production","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev0Guy%2Famgu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856563,"owners_count":24657688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cityflow","drl-pytorch","library","open-source","rllib","traffic"],"created_at":"2024-11-06T07:19:54.061Z","updated_at":"2025-08-17T13:35:25.815Z","avatar_url":"https://github.com/dev0Guy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/amgu.png\" height=\"150\" /\u003e\n\u003c/p\u003e\n\n[![format](https://github.com/dev0Guy/amgu/actions/workflows/black.yml/badge.svg?branch=production)](https://github.com/dev0Guy/amgu/actions/workflows/black.yml)\n[![Pypi](https://github.com/dev0Guy/amgu/actions/workflows/Pypi.yml/badge.svg?branch=production)](https://github.com/dev0Guy/amgu/actions/workflows/Pypi.yml)\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About Amgu\n\nThe majority of paper in the subject of DRL \u0026 traffic mannagment don't share thier code or the\ndata they used for train.\nThere is an need to organize \u0026 create uniforms between paper \u0026code a like.\nAmgu try to execly do that, creating abstract classes that can be hierarchical from\nand 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 \u0026 premade\nmodel and envierments \u0026 Attacks on thoes.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/animation.gif\" height=\"350\" /\u003e\n\u003c/p\u003e\n\n\n### Built With\n\nAmgu has been built using, the following:\n\n* [Python](https://www.python.org/)\n* [PyPi](https://pypi.org/)\n* [Cityflow](https://github.com/cityflow-project/CityFlow)\n* [Ray-rllib](https://github.com/ray-project/ray/blob/master/python/ray/rllib)\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo use this project you'll need to have CityFlow already install inside your pip enviorment.\nIn Addition ray should be installed custom to your machine(x86/x64).\n\n### Installation\n\nBellow example show the step to install and run example of Amgu.\n1. Install Amgu Traffic using Pypi.\n   ```sh\n      pip install Amgu/.\n   ```\n2. Use in your code.\n   ```python\n      from Amgu.basic.env import CityFlow1D\n      from Amgu.basic.reward import *\n      from Amgu.runnner import stable_baseline_train\n      from stable_baselines3 import DQN\n\n      exp_name = \"DQN_delta_waiting_time_1x1\"\n      stable_baselines_config = {\n          \"experiment_name\": exp_name,\n          \"env_config\": {\n              \"config_path\": \"example/1x1/config.json\",\n              \"steps_per_episode\": 400,\n              \"save_path\": \"example/1x1/res/\",\n          },\n          \"env_param\": {\"reward_func\": queue_length, \"district\": True},\n          \"policy_param\": {\n              \"policy\": \"MlpPolicy\",\n              \"tensorboard_log\": f\"{exp_name}/tesnorboard\",\n              'policy_kwargs': dict(activation_fn=th.nn.ReLU, net_arch=[146,50,8]),\n              \"gamma\": 0.95,\n              \"learning_rate\": 0.005,\n              \"exploration_initial_eps\": 1,\n              'exploration_fraction': 0.9,\n              \"exploration_final_eps\": 0.15,\n              'target_update_interval': 1_000,\n          },\n          \"evaluation_interval\": 400,\n          \"evaluation_duration\": 1,\n          \"stop\": {\"training_iteration\": 2_000},\n      }\n      stable_baseline_train(DQN, CityFlow1D, stable_baselines_config)\n   ```\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n- [x] Abstract Class.\n- [x] Traffic Class (using cityflow).\n- [x] Add Documntation.\n- [x] Build Test\n\nSee the [open issues](https://github.com/dev0Guy/amgu/issues) for a full list of proposed features (and known issues).\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev0guy%2Famgu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev0guy%2Famgu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev0guy%2Famgu/lists"}