Code Monkey home page Code Monkey logo

deep-q-networks's Introduction

Deep Q Networks

This is a project that implements deep q-networks using pycharm.

Package Installation Process

The easiest way to make sure this package is properly installed is to create a new virtual environment for this installation. Then follow the steps below.

  1. Clone this repository into a folder <folder-directory>
  2. Open a terminal in that folder and run: pip install -e .
  3. Install the proper version of pytorch for your virtual environment, using the command provided in https://pytorch.org/. For refference, the command used to setup the virtual environment during development was pip3 install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html, but different hardware and environments (virtualenv vs conda) require a different personalized command.
  4. Download the Roms from atari from https://github.com/openai/atari-py#roms and follow the instructions for installation from source.
  5. Follow the installation instructions (in the Installation section) from https://github.com/openai/baselines to install the atari baselines.

Installing from testpypi:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple dqn==x.x.x

Notes on the versions of this project:

  • 0.0.1 - Initial version of the project

  • 0.1.0 - Added Q-learning

  • 0.1.1 - Fixed bug in last release (the file with the implemented QLearningAgent had not been added to the commit.)

  • 0.1.2 - Fixed a small issue with the q-learning algorithm and added a feature that allows it to count iterations as episodes or timesteps.

  • 0.1.3 - Another small fix.

  • 0.1.4 - Added an epsilon greedy policy with non-linear decay.

  • 0.1.5 - Added yet another epsilon greedy policy, where the decay is done by steps: every few timesteps, the epsilon decays a value.

  • 0.1.6 - Fixed issues with Linear DQNs and added a test example.

  • 0.2.0 - Added DoubleDQNAgent. Renamed the AtariDQNPolicy to a more general and appropriate name: TrainEvalPolicy.

  • 0.2.1 - Small modifications to make the agents more adaptable to other environments besides gym ones.

  • 0.3.0 - LinearDQN is now implemented as GeneralLinearDQN was. Updates were made in the DQNAgent and DoubleDQNAgent.

  • 0.4.0 - CustomLinearDQN added. In a later update it will completely replace LinearDQN. DoubleDQNAgent readded. Apparently it had been removed by accident in the previous version.

  • 0.4.1 - Bugfix in DQNAgent.

  • 0.4.2 - Changed the name if the class AtariDNQEnv to the intended name AtariDQNEnv

  • 0.4.3 - Added evaluation episodes, like in the original deep mind article. The best performing agent is saved.

  • 0.4.4 - Fixed bug from the previous version.

  • 0.4.5 - The number of eval episodes and time between eval stages can now be manually set for DQN and DoubleDQN with atari games.

  • 0.4.6 - Plots for the loss are now stored.

  • 0.4.7 - Bugfix: in the previous version there was a mistake that made it so that the plots stored for the loss were wrong.

  • 1.0.0 - Multitask distillation added to the library.

  • 1.0.1 - A MultiDistilledAgent can be loaded without the teachers, by initializing that parameter with a list containing only instances of None.

deep-q-networks's People

Contributors

ilvieira avatar

Watchers

 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.