Universe RL trainer platform. Simple. Supple. Scalable.
tinyverse is a reinforcement learning platform for gym/universe/custom environments that lets you utilize any resources you have to train reinforcement learning algorithm.
The core idea is to have two types of processes:
Those processes revolve around database that stores experience sessions and weights. The database is currently implemented with Redis since it is simple to setup and swift with key-value operations. You can, however, implement the database interface with what database you prefer.
install redis server
sudo apt-get install redis-server
install python packages
pip install gym[atari]
pip install universe
- most likely needs dependencies, see urls above.pip install joblib redis prefetch_generator six
conda install -y -c https://conda.binstar.org/menpo opencv3
Spawn several player processes. Each process simply interacts and saves results. -b stands for batch size.
for i in `seq 1 10`;
do
python tinyverse atari.py play -b 3 &
done
Spawn trainer process. (demo below runs on gpu, change to cpu if you have to)
THEANO_FLAGS=device=gpu python tinyverse atari.py train -b 10 &
evaluate results at any time (records video to ./records)
python tinyverse atari.py eval -n 5
Devs: see workbench.ipynb