Coder Social home page Coder Social logo

uidilr / deepirl_chainer Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 1.0 19 KB

Implementation of GAIL and AIRL using chinerrl

License: MIT License

Python 100.00%
inverse-reinforcement-learning imitation-learning reinforcement-learning gail airl adversarial generative irl

deepirl_chainer's Introduction

Deep Inverse Reinforcement Learning

Contents

Chainer implementation of Adversarial Inverse Reinforcement Learning (AIRL) and Generative Adversarial Imitation Learning (GAIL). The code heavily depend on the reinforcement learning package Chainerrl.

Commands

Train and sample expert trajectory

python train_gym.py ppo --gpu $gpu_id --env CartPole-v0 --arch FFSoftmax --steps 50000 

Run GAIL

python train_gym.py gail --gpu $gpu_id --env CartPole-v0 --arch FFSoftmax --steps 100000 \
                    --load_demo ${PathOfDemonstrationNpzFile} --update-interval 128 --entropy-coef 0.01

Run AIRL

python train_gym.py airl --gpu $gpu_id --env CartPole-v0 --arch FFSoftmax --steps 100000 \
                    --load_demo ${PathOfDemonstrationNpzFile} --update-interval 128 --entropy-coef 0.01

LICENSE

MIT

deepirl_chainer's People

Contributors

uidilr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lim271

deepirl_chainer's Issues

Incorrect AIRL reward

The paper suggests that the reward is given by: f(s, a, s') - \pi(a | s) (which is the same as logD - log(1-D)) but the reward in the repo is g(s, a).
Why is this discrepancy?

where is the demonstration data?

If I have to make demonstration, how do I compose the dimension of demonstration?
For example,
state = [batch, sequence, *observation_shape]
action = [batch, sequence, *action_shape]

I trained "halfcheetah-v4" for above shape of demonstration, but gail and airl does not be learnt at all...

I does not know what I mistake...

and For binary cross entropy loss, why softmax function is more stable??

License

I think it is good work.
Which is a license of these codes?

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.