Git Product home page Git Product logo

shaz-5 / irl Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 15.91 MB

This repository contains implementations of Inverse Reinforcement Learning (IRL) algorithms based on the paper "Algorithms for Inverse Reinforcement Learning" - (Ng &Russell 2000)

License: MIT License

Jupyter Notebook 97.94% Python 2.06%
inverse-reinforcement-learning reinforcement-learning grid-world mountain-car q-learning

irl's Introduction

Inverse Reinforcement Learning Experiments

This repository implements and showcases experiments based on the paper "Algorithms for Inverse Reinforcement Learning" by Ng & Russell (2000).

Experiment Descriptions

1. 5 x 5 Grid World

In the initial experiment, a 5 x 5 grid world is used. The agent starts from the lower-left grid square and navigates to the absorbing upper-right grid square. The actions correspond to the four compass directions, but with a 30% chance of moving in a random direction instead. The objective is to recover the reward structure given the policy and problem dynamics.

Results:

  • Obtained a reward function by observing the policy of a trained agent which closely approximated the true reward.
  • Also derived a reward funtion from a given policy.

Mountain Car

2. Mountain Car Task

The second experiment involves the "mountain-car" task, where the goal is to reach the top of the hill. The true, undiscounted, reward is -1 per step until reaching the goal. The state is the car's position and velocity, and the state space is continuous.

Mountain Car

Results:

  • Using a reward function based on the car's position and 26 Gaussian-shaped basis functions, the algorithm produces a reward function that captures the structure of the true reward.

Obtained Reward Function

3. Continuous Grid World

The final experiment applies the sample-based algorithm to a continuous version of the 5 x 5 grid world. The state space is [0, 1] ร— [0, 1], and actions move the agent 0.2 in the intended direction with added noise. The true reward is 1 in a non-absorbing square [0.8, 1] ร— [0.8, 1], and 0 everywhere else.

Results:

  • The algorithm, using linear combinations of two-dimensional Gaussian basis functions and produces reasonable solutions.

Further Reading

Feel free to explore my introductory presentation to Inverse Reinforcement Learning (IRL) and also get an overview of the experiments conducted.

References

  • Ng, A., & Russell, S. (2000). Algorithms for Inverse Reinforcement Learning.
  • ShivinDass. (n.d.). GitHub - ShivinDass/inverse_rl. GitHub.
  • Neka-Nat. (n.d.). Neka-nat/inv_rl: Inverse reinforcement learning argorithms. GitHub.

irl's People

Contributors

shaz-5 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

niceboy120

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.