Giter VIP home page Giter VIP logo

rl-evolving-auxiliary-reward's Introduction

DQN with Evolving Auxiliary Reward Function

DQN is augmented with a reward function (EvoReward) that evolves (each episode currently) using a basic genetic algorithm.

EvoReward takes in the current environment state and agent action to provide a good direction for the agent, even in the absence of external rewards. Experiments with Q-learning and Deep Q-learning agents augmented with EvoReward show that it significantly improves performance in both dense and sparsely rewarded environments and that it has the potential to be practically used.

Requirements

python 3.5
Keras
gym
gym_minigrid
numpy
matplotlib

gym_minigrid is a minimal gym environment with sparse rewards.

How to use

Run: python paralell_trials.py

Runs DQN+EvoReward by default with a population of 10 on MiniGrid-Empty-6x6-v0 environment. Use '--dqn_type 0' argument to use a normal DQN to compare. Use '--help' to see more options.

Files

  • evoDQN.py: DQN implementation supporting EvoReward function
  • evoReward.py: Evolving reward function class
  • multiprocess.py: For multiprocessing each individual in the population. This is test code. Does not work with EvoReward currently.
  • parallel_trials.py: Aggregate results from multiple trials of training.
  • scripts/run_grid_trials: Script to run parallel_trials.py in multiple processes to get results faster.

Results

Formal algorithm and results can be found in docs

rl-evolving-auxiliary-reward's People

Contributors

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