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
Linux GPU Build Status Build Status
Windows CPU / GPU Build Status
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.0.7.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

drlkit-0.0.7-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

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