BlobRl is a modular library for reinforcement learning which works on pytorch.
For installing pytorch follow Quick Start Locally for your config.
Install blobrl
- to use it:
pip install blobrl- to use it on notebook:
pip install blobrl[notebook]- to help development:
pip install blobrl[dev]import gym
env = gym.make("CartPole-v1")from blobrl.agents import AgentRandom
action_space = env.action_space
observation_space = env.observation_space
agent = AgentRandom(observation_space=observation_space, action_space=action_space)Create Trainer
from blobrl import Trainer
trainer = Trainer(environment=env, agent=agent, log_dir="./logs")Start training:
trainer.train(max_episode=100, nb_evaluation=4, render=True)Visualize training and evaluation metrics:
tensorboard --logdir logsWe will use GYM environments for moments.
Watch TODO for environments in coming.
Agent implemented:
- AgentConstant, this agent choice one random action on start and will take her all next time
- AgentRandom, this agent choice one random action each time
- DQN, Deep Q Learning (Mnih et al., 2013)
- DoubleDQN, (van Hasselt et al., 2016)
- DuelingDQN, (Wang et al., 2016)
- CategoricalDQN, (Bellamare et al., 2017)
You can find all examples here
You can see more results and analysis
