Skip to main content

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.

Source Distribution

drlkit-0.1.7.tar.gz (8.7 kB view hashes)

Uploaded source

Built Distribution

drlkit-0.1.7-py3-none-any.whl (11.7 kB view hashes)

Uploaded py3

Supported by

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