A3C run torcs

2017 年 7 月 20 日 CreateAMind

https://github.com/bn2302/rl_torcs


check: https://github.com/bn2302/rl_torcs/issues


we will replace docker use process!


after run ; Come in for an interview




Reinforcement learning with docker and torcs

Installation

The Torcs reinforcement learning environment is based on an Amazon EC2 g2.2xlarge instance running Ubuntu 16.04.

To setup the environment, the following commands have to be executed from a shell:

git clone https://github.com/bn2302/rl_torcs
cd rl_torc/docker/
sudo su
source root_setup.sh
reboot

After rebooting the instance please run the following commands:

cd rl_torc/docker
source user_setup.sh

The script will install the nvidia drivers, nvidia-docker and an xserver, which is used to connect to the agent via virtualgl.

Next to that the script will build the images for two docker containers:

* Torcs running in a container with virtualgl and turbovnc

* A reinforcement learning environment containing Tensorflow, a modified
  vim and other goodies

Start the docker container

The reinforcement learning docker environment is started using start_rl to reattach the environment the alias attach_rl can be used.

Start the training

The different agents can be trained using the scripts in the src folder called train_X.py. Please not if an agent is prematurely canceled the corresponding torcs container must be stopped using docker stop NAME. To list the running containers please use docker ps -l -a

Monitor the training

To monitor the training process, please connect to the containers, go into the logs directory and start tensorboard using

tensorboard --logdir=a3c_0:'./a3c/train_0/',a3c_1:'./a3c/train_1',a3c_2:'./a3c/train_2',a3c_3:'./a3c/train_3',a3c_4:'./a3c/train_4/',a3c_5:'./a3c/train_5',a3c_6:'./a3c/train_6',a3c_7:'./a3c/train_7',ddpg_1:'./ddpg_1',dddpg_ref:'./ddpg_ref',ddpg_2:'./ddpg_2/'

Tensorboard can be accessed via port 6006 from a browser. When connecting to an AWS instance via ssh, forward the port with -L 6006:localhost:6006. Then tensorboard can be opened in a browser using http://localhost:6006/

Start the testing

Testing is done in the Jupyter notebook test.ipynb . To start the jupyter server run the following command from the main directory

jupyter server --allow-root

Jupyter can be accessed via port 8888 from a browser. When connecting to an AWS instance via ssh, forward the port with -L 6006:localhost8888

References

https://github.com/awjuliani/DeepRL-Agents/blob/master/A3C-Doom.ipynb as the basis for the A3c implementation.

https://github.com/yanpanlau/DDPG-Keras-Torcs as the basis for the DDPG.

https://github.com/plumbee/nvidia-hw-accelerated-box as the basis for the setup scripts.


登录查看更多
1

相关内容

Docker - An open platform for distributed applications for developers and sysadmins.
【圣经书】《强化学习导论(2nd)》电子书与代码,548页pdf
专知会员服务
197+阅读 · 2020年5月22日
Python分布式计算,171页pdf,Distributed Computing with Python
专知会员服务
105+阅读 · 2020年5月3日
专知会员服务
158+阅读 · 2020年1月16日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
168+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
专知会员服务
198+阅读 · 2019年8月30日
通过Docker安装谷歌足球游戏环境
CreateAMind
11+阅读 · 2019年7月7日
谷歌足球游戏环境使用介绍
CreateAMind
31+阅读 · 2019年6月27日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】MXNet深度情感分析实战
机器学习研究会
16+阅读 · 2017年10月4日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
【推荐】(Keras)LSTM多元时序预测教程
机器学习研究会
24+阅读 · 2017年8月14日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
Meta-Learning with Implicit Gradients
Arxiv
13+阅读 · 2019年9月10日
Accelerated Methods for Deep Reinforcement Learning
Arxiv
6+阅读 · 2019年1月10日
Arxiv
3+阅读 · 2018年10月11日
Multi-task Deep Reinforcement Learning with PopArt
Arxiv
4+阅读 · 2018年9月12日
ViZDoom Competitions: Playing Doom from Pixels
Arxiv
5+阅读 · 2018年9月10日
VIP会员
相关VIP内容
【圣经书】《强化学习导论(2nd)》电子书与代码,548页pdf
专知会员服务
197+阅读 · 2020年5月22日
Python分布式计算,171页pdf,Distributed Computing with Python
专知会员服务
105+阅读 · 2020年5月3日
专知会员服务
158+阅读 · 2020年1月16日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
168+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
专知会员服务
198+阅读 · 2019年8月30日
相关资讯
通过Docker安装谷歌足球游戏环境
CreateAMind
11+阅读 · 2019年7月7日
谷歌足球游戏环境使用介绍
CreateAMind
31+阅读 · 2019年6月27日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】MXNet深度情感分析实战
机器学习研究会
16+阅读 · 2017年10月4日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
【推荐】(Keras)LSTM多元时序预测教程
机器学习研究会
24+阅读 · 2017年8月14日
强化学习族谱
CreateAMind
26+阅读 · 2017年8月2日
Top
微信扫码咨询专知VIP会员