Skip to content

wooridle/DeepRL-PPO-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DeepRL-PPO-tutorial

This repository contains tutorial material on Doing DeepRL with PPO in GDG DevFest 2017 Seoul.

๋ฐœํ‘œ์ž๋ฃŒ

Doing_RL_with_PPO.pdf ์ž…๋‹ˆ๋‹ค.

Roboschool ์„ค์น˜ ๊ฐ€์ด๋“œ

์„ค์น˜์— ์•ž์„œ roboschool์€ Mac๊ณผ Linux ์šด์˜์ฒด์ œ๋งŒ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

๊ฐ€์žฅ ๋จผ์ € roboshcool์„ ๊นƒํ—™์—์„œ ๋‹ค์šด๋ฐ›์Šต๋‹ˆ๋‹ค.

git clone https://github.com/openai/roboschool

๊ทธ๋ฆฌ๊ณ  ๋จผ์ € ROBOSCHOOL_PATH๋ฅผ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด ์„ค์ •์€ ์„ค์น˜๋•Œ๋งŒ ์ด์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ํ˜„์žฌ shell์—์„œ๋งŒ ์ ์šฉ๋˜๋„๋ก ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•ด ์ค๋‹ˆ๋‹ค. /path/to/roboschool ๋Œ€์‹  ์ž์‹ ์ด ๋‹ค์šด๋ฐ›์€ roboschool ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ROBOSCHOOL_PATH=/path/to/roboschool

์ด์ œ roboschool ์„ค์น˜์— ํ•„์š”ํ•œ ํŒจํ‚ค์ง€๋“ค์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ๊ฐ์˜ ์šด์˜์ฒด์ œ์— ๋งž๋Š” ์„ค์น˜๋ฅผ ์ด์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

  • Linux
sudo apt install cmake ffmpeg pkg-config qtbase5-dev libqt5opengl5-dev libpython3.5-dev libboost-python-dev libtinyxml-dev
  • Mac
# Will not work on Mavericks: unsupported by homebrew, some libraries won't compile, upgrade first
brew install python3
brew install cmake tinyxml assimp ffmpeg qt
brew install boost-python --without-python --with-python3 --build-from-source
export PATH=/usr/local/bin:/usr/local/opt/qt5/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/opt/qt5/lib/pkgconfig
  • Mac, Anaconda with Python 3
brew install cmake tinyxml assimp ffmpeg
brew install boost-python --without-python --with-python3 --build-from-source
conda install qt
export PKG_CONFIG_PATH=$(dirname $(dirname $(which python)))/lib/pkgconfig

๊ทธ ๋‹ค์Œ์€ roboschool์„ ๋Œ๋ฆฌ๋Š”๋ฐ ํ•„์š”ํ•œ ๋ฌผ๋ฆฌ์—”์ง„์ธ bullet3๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋จผ์ € bullet3๋ฅผ ๋จผ์ € ๊นƒํ—™์—์„œ ๋ฐ›์•„์™€์„œ ๋นŒ๋“œ๋ฅผ ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ** git cloneํ•œ roboschool ๋””๋ ‰ํ† ๋ฆฌ์—์„œ bullet3๋ฅผ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”.

git clone https://github.com/olegklimov/bullet3 -b roboschool_self_collision
mkdir bullet3/build
cd bullet3/build
cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=1 _DCMAKE_INSTALL_PREFIX:PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_EXTRAS=OFF  -DBUILD_UNIT_TESTS=OFF -DBUILD_CLSOCKET=OFF -DBUILD_ENET=OFF -DBUILD_OPENGL3_DEMOS=OFF ..
make -j4
make install
cd ../..

๋งˆ์ง€๋ง‰์œผ๋กœ gym๊ณผ roboschool์„ ์„ค์น˜ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. (python2 ๋ฒ„์ „์„ ์ด์šฉํ•œ๋‹ค๋ฉด pip๋ฅผ ์ด์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.)

pip3 install gym
pip3 install -e $ROBOSCHOOL_PATH

About

This repository contains tutorial material on Doing DeepRL with PPO in GDG DevFest 2017 Seoul.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages