Skip to main content

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.

Metadata

Release files for sota-dqn 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sota-dqn 0.0.7
File Size Uploaded
sota_dqn-0.0.7.tar.gz 5.0 kB Details

Release files / sota_dqn-0.0.7.tar.gz

Download URL sota_dqn-0.0.7.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dedd5d1ca34f3c47a17c581dc31b86946de953d78bd37fd0af7163eb37f44d66
BLAKE2b-256 checksum
How to use checksums
2d3fe4af4961300689992dfe845e48eb7751070472b217d3463ebe9e66bfc0b7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page