A High Level Python Deep Reinforcement Learning library. Great for beginners, for prototyping and quickly comparing algorithms
Project description
A High Level Python Deep Reinforcement Learning library. Great for beginners, prototyping and quickly comparing algorithms
UNDER CONSTRUCTION!
Do not use yet!
System | 3.5 | 3.6 | 3.7 |
---|---|---|---|
Linux CPU | — | ||
Linux GPU | — | ||
Windows CPU / GPU | — | — | |
Linux (ppc64le) CPU | — | ||
Linux (ppc64le) GPU | — |
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
Release history Release notifications | RSS feed
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)
Built Distribution
drlkit-0.1.7-py3-none-any.whl
(11.7 kB
view hashes)