Coder Social home page Coder Social logo

reinforce_tianshou's Introduction

Reinforce Tianshou

My implementation of REINFORCE RL algorithm with the help of tianshou reinforcement learning framework. This builds on top of my implementation using only PyTorch here: https://github.com/drozzy/reinforce

The code trains an agent to solve a CartPole-v0 environment and then renders a few episodes with a trained agent.

Video Explanation

See my video here: Tianshou: Best RL Framework You Never Heard Of

Contents:

  1. The reinforce_tianshou.py is the complete example.
  2. The intermediate_steps/reinforce_tianshou_no_trainer.py shows how things would look without a trainer.
  3. The intermediate_steps/reinforce_tianshou_no_trainer_no_net.pyshows things without a trainer and a built-in network.
  4. The intermediate_steps/reinforce_tianshou_no_net.py shows how to create a custom network and a custom policy, while using built-in trainer.
  5. The slides_code/policy_component.py - shows an example of calling a built-in policy on an observation from CartPole environment.

Install

conda env create -f environment.yml
conda activate reinforce_tianshou
pip install -r requirements.txt

Run

python reinforce_tianshou.py

References

--Andriy Drozdyuk

reinforce_tianshou's People

Contributors

drozzy avatar

Stargazers

Sujit Nalawade avatar Chang Liu avatar

Watchers

 avatar James Cloos 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.