Code Monkey home page Code Monkey logo

dqn-multi-agent-rl's Introduction

Deep Q-learning (DQN) for Multi-agent Reinforcement Learning (RL)

DQN implementation for two multi-agent environments: agents_landmarks and predators_prey (See details.pdf for a detailed description of these environments).

Code structure

  • ./environments/: folder where the two environments (agents_landmarks and predators_prey) are stored.
    1. ./environments/agents_landmarks: in this environment, there exist n agents that must cooperate through actions to reach a set of n landmarks in a two dimensional discrete k-by-k grid environment.
    2. ./environments/predators_prey: in this environment, n agents (called predators) must cooperate with each other to capture one prey in a two dimensional discrete k-by-k grid environment.
  • ./dqn_agent.py: contains code for the implementation of DQN and its extensions (Double DQN, Dueling DQN, DQN with Prioritized Experience Replay) (See details.pdf for a detailed description of the DQN and its extensions).
  • ./brain.py: contains code for the implementation of neural networks required for DQN (See details.pdf for a detailed description of the neural network implementation).
  • ./uniform_experience_replay.py: contains code for the implementation of Uniform Experience Replay (UER) which can be used in DQN.
  • ./prioritized_experience_replay.py: contains code for the implementation of Prioritized Experience Replay (PER) which can be used in DQN.
  • ./sum_tree.py: contains code for the implementation of sum tree data structure which is used in Prioritized Experience Replay (PER).
  • ./agents_landmarks_multiagent.py: contains code for applying DQN to the agents_landmarks environment.
  • ./predators_prey_multiagent.py: contains code for applying DQN to the predators_prey environment.
  • ./results_agents_landmarks/: folder where the results (neural net weights, rewards of the episodes, videos, figures, etc.) for the agents_landmarks environment are stored.
  • ./results_predators_prey/: folder where the results (neural net weights, rewards of the episodes, videos, figures, etc.) for the predators_prey environment are stored.
  • ./details.pdf: a pdf file including a detailed description of the DQN and its extensions, the environments, and the neural network implementation.

Results

Predators and Prey Environment

In this environment, the prey is captured when one predator moves to the location of the prey while the other predators occupy, for support, the neighboring cells of the prey's location.

Fixed prey (mode 0)

Random prey (mode 1)

Random escaping prey (mode 2)

Agents and Landmarks Environment

10 agents and 10 landmarks

16 agents and 16 landmarks

Todos

  • Write required dependencies and installation steps
  • ...

dqn-multi-agent-rl's People

Contributors

mohammadasghari 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.