Giter VIP home page Giter VIP logo

qnets's Introduction

Homework Code for 10703: Deep Reinforcement Learning at CMU

Submitted by: Vasu Sharma ([email protected]) and Akshat Agarwal ([email protected])

Requirements:

  1. Pytorch (www.pytorch.org)
  2. OpenAI Gym
  3. Python 3
  4. OpenCV2 (pip3 install python-opencv)

Commands to run:

  1. Linear Q-Networks:

Training: python DQN_Implementation.py --env CartPole-v0 --type 0

Testing: python DQN_Implementation.py --env CartPole-v0 --type 0 --test 1 --load <path_to_file>

Note: To run with no experience replay, please go into the code for LinearQ_Agent and change self.buffer_size and self.batch_size to 1.

  1. DQN:

Training: python DQN_Implementation.py --env CartPole-v0 --type 1

Testing: python DQN_Implementation.py --env CartPole-v0 --type 1 --test 1 --load <path_to_file>

  1. Dueling Q-Networks:

Training: python DQN_Implementation.py --env CartPole-v0 --type 2

Testing: python DQN_Implementation.py --env CartPole-v0 --type 2 --test 1 --load <path_to_file>

  1. Atari DQN:

Training: python DQN_Implementation.py --env SpaceInvaders-v0 --type 3

Testing: python DQN_Implementation.py --env SpaceInvaders-v0 --type 3 --test 1 --load <path_to_file>

Additional Flags:

The flags are parsed at the very end of the DQN_Implementation.py file, with comments on their usage. However, I am also mentioning here for completeness.

  1. --env environment name (default: CartPole-v0)
  2. --render pass 1 for rendering during test time, never renders during training (default: 0)
  3. --type 0 for Linear, 1 for DQN, 2 for Dueling, 3 for Atari (default: 1)
  4. --no-cuda pass True to not use CUDA if CUDA enabled machine (default: False)
  5. --target pass 1 to use target network, 0 to not use (default: 1)
  6. --test pass 1 to test, 0 starts training (default: 0)
  7. --load used only during test time, path to model file storing trained weights (default: None)

qnets's People

Contributors

agakshat avatar vasusharma avatar

Watchers

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