Skip to content

yahsiuhsieh/dqn-dense-traffic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Decision Making in Dense Traffic using DQN

Deep reinforcement learning techniques apply to autonomous driving problems.


Agent running in the intersection environment.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Simulator

highway-env

Built With

  • Python 3.6.10

  • PyTorch >= 1.7.0

  • gym 0.17.3

  • numpy >= 1.16.2

  • matplotlib >= 3.1.1

Code Organization

.
├── Highway                       # Scripts for highway environment
│   ├── dueling_dqn.py            # Dueling DQN
│   ├── double_dqn.py             # Double DQN
│   ├── double_dqn_cnn.py         # Double DQN with CNN architecture
│   └── double_dqn_prioritized.py # Double DQN with Prioritized Buffer
├── Intersection                  # Scripts for intersection environment
├── doc                           # Detailed info
└── README.md

How to Run

There are 4 methods you can try, namely dueling DQN, double DQN, double DQN with cnn, and double DQN with prioritized replay buffer, with corresponding file name.

ex. if you want to try double DQN in highway environment, just do

cd Highway
python double_dqn.py

Configure the Environment

We configured the highway environment in the following way, you can also read the documentation online for other settings.

env = gym.make("highway-v0")
env.config["lanes_count"] = 4
env.config["duration"] = 100
env.config["vehicles_count"] = 10
env.config["vehicles_density"] = 1.3
env.config["policy_frequency"] = 2
env.config["simulation_frequency"] = 10
env.reset()

Results


Agent running in the highway environment.


Average training reward in the highway environment.

Authors

About

Decision Making in Dense Traffic using Deep Q-Learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages