Welcome to Deepair’s documentation!

Deepair (/diːp er/) is a Python library that have reliable implementations of Deep reinforcement learning algorithms.

Simple way to start

Install deepair with pip

pip install deepair

start with gym env

import gym
from deepair.dqn import Rainbow

env = gym.make('LunarLander-v2')

rain = Rainbow(env=env, memory_size=10000, batch_size=32, target_update=256)

rain.train(timesteps=200000)

# test
state = env.reset()
done = False
score = 0

while not done:
   action = rain.select_action(state, deterministic=True)
   next_state, reward, done, info = env.step(action)

   state = next_state
   score += reward

print("score: ", score)
_images/rainbow_lunalander.gif

Installation

pip install deepair

Tutorial

How to save and load model

RL Algorithms

DQN

Custom technique

Developer guides

Deepair

deepair package

Subpackages
deepair.dqn package
Module contents
Module contents

Indices and tables