【深度强化学习入门篇】(一)安装配置ViZDoom环境

一、预装环境:

          Ubuntu16.04

          cmake2.8及以上

          gcc4.9及以上

          python2.7+python3

       【注】: xxx  --version 命令即可查看软件版本(xxx为cmake or gcc)

二、安装依赖:

#Zdoom dependencies

sudo apt-get install build-essential zlib1g-dev libsdl2-dev libjpeg-dev \
nasm tar libbz2-dev libgtk2.0-dev cmake git libfluidsynth-dev libgme-dev \
libopenal-dev timidity libwildmidi-dev 

#Boost libraries

sudo apt-get install libboost-all-dev

#Python2 dependencies

sudo apt-get install python-pip
pip install numpy

#Python 3 dependencies

sudo apt-get install python3-pip 
pip3 install numpy

#Lua binding dependencies

sudo apt-get install liblua5.1-dev 

#其他依赖

a.scipy

sudo apt-get install python-scipy

b.matplotlib

sudo apt-get install python-matplotlib

c.tensorflow

sudo apt-get install python-pip python-dev
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

三、安装:

#从github 克隆自带boost版本的ViZDoom(因为需要下载freedomfreedom-0.10.1.zip,所以需要翻QIANG)

git clone https://github.com/mwydmuch/ViZDoom -b local_boost_python

#编译源码

./cmake_clean.sh
./cmake_all.sh
make

#使用pip本地安装

sudo -H pip install .

安装完毕,验证一下:

#cd 到ViZDoom包下面,以home为例(默认home)

cd home
cd ViZDoom/examples/python
./basic.py

如果能显示出DOOM界面,说明安装完成。

 

你可能感兴趣的:(深度强化学习,从零开始入门深度强化学习)