GithubHelp home page GithubHelp logo

cc605 / fni-rl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmis-turbo/fni-rl

0.0 0.0 0.0 4.44 MB

[TPAMI, 2023] Fear-Neuro-Inspired Reinforcement Learning for Safe Autonomous Driving

Home Page: https://www.researchgate.net/publication/374522737_Fear-Neuro-Inspired_Reinforcement_Learning_for_Safe_Autonomous_Driving

Python 100.00%

fni-rl's Introduction

FNI-RL

This repository is the implementation of our research "Fear-Neuro-Inspired Reinforcement Learning for Safe Autonomous Driving". This research has been published in IEEE TPAMI.

Additionally, FNI-RL has also been featured by IEEE Spectrum Magazine: Neural Reactions to Fear Make AI Drive More Safely.

Introduction

Schematic of the Proposed FNI-RL Framework for Safe Autonomous Driving

ENV

In recent years, many neuroscientists have argued that, the specific fear nervous system (i.e., amygdala) in the brain plays a central role, which can predict dangers and elicit defensive behavioral responses against threats and harms; this is crucial for survival in and adaptation to potential risky environments. Additionally, some studies in neuroscience and psychology have highlighted the necessity of actively forecasting hazards or contingencies via world models to ensure the survival of organisms. Motivated by the above insights, we devised a brain-like machine intelligence paradigm by introducing an adversarial imagination mechanism into a constrained reinforcement learning framework, allowing autonomous vehicles to acquire a sense of fear, thereby enhancing or ensuring safety.

Demonstration

The video demonstration of our work can be found: Please click to watch the video.

In all demonstrations, the red-colored car represents the FNI-RL-driven autonomous vehicle.

1. Unprotected left turn task at an unsignalized intersection with oncoming traffic (TrafficEnv1-v0)

Scenario (a)

2. Unprotected right turn task at an unsignalized intersection with crossing traffic (TrafficEnv2-v0)

Scenario (b)

3. Unprotected left turn task at an unsignalized intersection with mixed traffic flows (TrafficEnv3-v0)

Scenario (c)

4. Unprotected crossing negotiation task at an unsignalized intersection with mixed traffic flows (TrafficEnv4-v0)

Scenario (d)

5. Long-term goal-driven navigation task with mixed traffic flows (TrafficEnv5-v0)

Scenario (e1)

Scenario (e2)

User Guidance

Installation

This repo is developed using Python 3.7 and PyTorch 1.3.1+CPU in Ubuntu 16.04.

We utilize the proposed FNI-RL approach to train the autonomous driving agent in the popular Simulation of Urban Mobility (SUMO, Version 1.2.0) platform.

We believe that our code can also run on other operating systems with different versions of Python, PyTorch and SUMO, but we have not verified it.

The required packages can be installed using

pip install -r requirements.txt

Run

There are five traffic environments, including four short-distance tasks (TrafficEnv1-v0, TrafficEnv2-v0, TrafficEnv3-v0, and TrafficEnv4-v0) and one long-distance task (TrafficEnv5-v0). For example, users can leverage the following command to run the code in the terminal and train the autonomous driving agent under the unprotected left turn task at an unsignalized intersection with oncoming traffic:

python run_short_dis_tasks.py --env_name TrafficEnv1-v0

Users can also use the following command to run the code in the terminal and train the the autonomous driving agent under the long-term goal-driven navigation task with mixed traffic flows:

python run_long_dis_task.py --env_name TrafficEnv5-v0

Acknowledgement

We greatly appreciate the important references provided by the two code repositories SMBPO and SAC for the implementation of our research.

Citation

If you find this repository helpful for your research, we would greatly appreciate it if you could star our repository and cite our work.

@ARTICLE{10273631,
  author={He, Xiangkun and Wu, Jingda and Huang, Zhiyu and Hu, Zhongxu and Wang, Jun and Sangiovanni-Vincentelli, Alberto and Lv, Chen},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={Fear-Neuro-Inspired Reinforcement Learning for Safe Autonomous Driving}, 
  year={2024},
  volume={46},
  number={1},
  pages={267-279},
  doi={10.1109/TPAMI.2023.3322426}}

fni-rl's People

Contributors

tmis-turbo avatar

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.