Skip to main content

State of the art opinionanted DQN training and inference

Project description

State of the Art Deep Q Networks

sota_dqn is an opinionated deep Q network library focused on productive implementation.

sota_dqn makes state of the art Reinforcement Learning easy and productive to use. Methods such as Prioritized Experience Replay and fixed q target training are implemented by default.

Other methods are under consideration for implementation such as:

Overview

Goals

  • Provide a sound api to interact with state of the art deep Q learning
  • Abstract where necessary without over-abstracting. This is not a library for those without knowledge of DQN architecture

Non-Goals

  • Provide a complete deep Q learning api.
  • one liners for dqn models (i.e. rainbow = RainbowModel(env=env))

Examples

Installation

sota_dqn is published on pypi by a CI/CD workflow

pip install sota_dqn

sota_dqn can also be installed as a git repo:

git clone https://github.com/LukeWood/sota-dqn.git &&
cd sota-dqn && 
pip install -r requirements.txt .

Quickstart

Batteries included examples held in examples/.

Cartpole

The quickest example to get started with is the basic which uses the CartPole-v1 environment.

random sample video

Cartpole-V1 before training

You can train a model for yourself quickly.

The model has the following architecture:

model architecture

This is created by the training script.

python examples/basic/dqn_train.py

After the first checkpoint is saved you can test the model.

python examples/basic/dqn_inference.py

trained sample video

Cartpole-V1 after training

Ms Pacman

This example builds on on the foundations set in the basic example. In the Ms Pacman example the raw image data is returned from the environment at each step. Preprocessing converts the images to gray scale to reduce the dimensionality of the input space.

On top of this a convolutional model with the following architecture is used: cnn architecture

A GPU is highly recommended for training this model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sota_dqn-0.0.7.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file sota_dqn-0.0.7.tar.gz.

File metadata

  • Download URL: sota_dqn-0.0.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sota_dqn-0.0.7.tar.gz
Algorithm Hash digest
SHA256 dedd5d1ca34f3c47a17c581dc31b86946de953d78bd37fd0af7163eb37f44d66
MD5 45554a11f56f0aeebf3aeaf29c69d7e6
BLAKE2b-256 2d3fe4af4961300689992dfe845e48eb7751070472b217d3463ebe9e66bfc0b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page