Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A High Level Python Deep Reinforcement Learning library. Great for beginners, for prototyping and quickly comparing algorithms

Project description

Gitter


Gitter Pytorch Gitter Gitter Gitter

A High Level Python Deep Reinforcement Learning library. Great for beginners, prototyping and quickly comparing algorithms

Environments

UNDER CONSTRUCTION!

Do not use yet!

System 3.5 3.6 3.7
Linux CPU Build Status Build Status <center>—</center>
Linux GPU Build Status Build Status <center>—</center>
Windows CPU / GPU <center>—</center> Build Status <center>—</center>
Linux (ppc64le) CPU Build Status Build Status
Linux (ppc64le) GPU Build Status Build Status

Installation

Run the following to install:

pip install drlkit

Usage

import numpy as np
from drlkit import TorchAgent, Plot, EnvironmentWrapper

ENV_NAME = "LunarLander-v2"
env = EnvironmentWrapper(ENV_NAME)
agent = TorchAgent(state_size=8, action_size=env.env.action_space.n, seed=0)

# Train the agent
env.fit(agent, n_episodes=1000)

# See the results
Plot.basic_plot(np.arange(len(env.scores)), env.scores, xlabel='Episode #', ylabel='Score')


# Play untrained agent
env.load_model(agent, env="LunarLander", elapsed_episodes=3000)
env.play(num_episodes=10, trained=False)

# Play trained agent
env.play(num_episodes=10, trained=True)

Project details


Download files

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

Files for drlkit, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size drlkit-0.1.7-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size drlkit-0.1.7.tar.gz (8.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page