Git Product home page Git Product logo

noisydemo's Introduction

NoisyDemo

Course project for CSC2626

the code requires gym and stable-baselines-3 to run properly. Install the packages using pip install stable-baselines3.

Trajectory creation

First, train a RL agent that simulate human expert using experts/train_model.py. For example, train an A2C model for CartPole-v1 using stable-baselines3 by running cd experts then python train_model.py --env CartPole-v1 --model A2C. This will generate a file named A2C_CartPole-v1.zip under current directory.

Then create trajectory by running experts/create_trajectory.py. For example, to simulate trajectories from 10 users with different accuracy, run python create_trajectory.py --dataset_path ../datasets --env CartPole-v1 --model A2C --n_experts 10 --num_noisy 5. This will create 10 trajectories,5 from simulated experts and 5 from simulated noisy demonstrators.

Run reinforcement learning with demonstration

To run pure reinforcement learning using DQN, first run cd ../rlfd then run python dqn.py --env CartPole-v1 --n_episodes 1000 --figpath ../fig. This gives results for DQN (without using demonstration) in fig repository.

To run RlfD without consider which user the trajectories come from, run python rlfd.py --env CartPole-v1 --expert_label A2C --toggle_new_method 0. To run To run our method, run python rlfd.py --env CartPole-v1 --expert_label A2C --toggle_new_method 1. This gives results for rlfd in fig repository.

noisydemo's People

Contributors

elliotschrider avatar footoredo avatar gnaiqing avatar

Watchers

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