Skip to content

drozzy/reinforce_tianshou

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages