Giter Site home page Giter Site logo

yunho0130 / start-rl Goto Github PK

View Code? Open in Web Editor NEW
30.0 6.0 18.0 147.87 MB

<Do it 강화학습 입문(Getting Started with Deep Reinforcement Learning)> 소스코드 저장소

Shell 0.09% Python 46.20% Jupyter Notebook 6.95% C# 44.12% Dockerfile 0.14% ShaderLab 0.29% C 0.01% CSS 2.04% HTML 0.08% Batchfile 0.06% Smalltalk 0.01%

start-rl's Introduction

start-RL

《Do it 강화 학습 입문(Beginning Reinforcement Learning)》 소스 코드 저장소

Yes24

실습 소스 코드

01장 강화 학습이란?

03장 알파고 도전을 위한 첫 걸음

  • OpenAI Gym Retro 환경에서 강화 학습 모델 훈련시키기

    • Airstriker-Genesis 게임을 플레이하는 강화 학습 모델

    OpenAI gym-retro 소스 코드 살펴보기

  • UnityML 환경에서 강화 학습 모델 훈련시키기

    • 머리 위에 올려진 공을 떨어뜨리지 않는 3Dball 환경

    • 이족보행을 학습시켜 목적지까지 이동시키는 Walker 환경

    • 여러 에이전트간 상호작용이 필요한 Soccer 환경

    UnityML 소스 코드 살펴보기

04장 딥레이서로 구현하는 자율 주행

05장 영화 <아이언맨>의 자비스 만들기

  • Google Colab 통한 실습
    아래의 Jupyter Notebook 파일은 Google Colab과 연결되도록 만들어 두었습니다. 이를 통해 05장의 주요 강화 학습 모델 학습 코드를 간편하게 실행해 보세요.

  • OpenAI GPT-2로 알아보는 자연어 처리

  • OpenAI GPT-3와 강화 학습의 미래

06장 분산 강화 학습 공부하기

  • MS Azure 무료 체험으로 할 수 있는 분산 강화 학습 실습
    • 윈도우 원격 데스크톱 접속 환경 구성하기
    • Ray 아키텍쳐 및 RLlib 설치 하기
    • 분산환경에서 카트폴 실행 하기

분산 강화 학습 실습 명령어 및 예제 코드 살펴보기

07장 강화 학습으로 만드는 신경망 구조

  • NNI ENAS를 활용한 NAS 실습 보기
    • 매크로 탐색 공간을 활용한 ENAS
    • 마이크로 탐색 공간을 활용한 ENAS
    • ENAS에서 생성된 신경망 구조를 활용한 재학습

NNI ENAS 실습 명령어 및 예제 코드 살펴보기

인용 Citation

본 레파지토리나 《Do it! 강화 학습 입문》의 내용을 인용하실 때에는 아래의 인용 정보를 사용하시면 편리합니다.

@book{Do-it-Reinforcement-Learning,
  title={Do it! 강화 학습 입문},
  author={조규남, 맹윤호, 임지순},
  isbn={9791163032526},
  url={http://www.yes24.com/Product/Goods/101924618},
  year={2021},
  publisher={이지스퍼블리싱}
}

start-rl's People

Contributors

canine89 avatar mystous avatar yunho0130 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

start-rl's Issues

3장 질문

3장에 레트로와 유니티 모두 environment.yml을 이용하여 가상환경을 만들 때 오류가 발생합니다
윈도우 10 사용중이고 미설치 오류가 떠서 dependencies에 있던 항목들을 pip 하단으로 이동시켰습니다
먼저 유니티에서는 하단 사진과 같이 이동하였고 수정 후 다시 가상환경을 생성시키려고 하니 이미 있는 환경이라고 나옵니다
image
그래서 conda remove -n rl-unity-agent를 해보니 CondaValueError: no package names supplied,\try "conda remove -h" for more details이라 나옵니다. 따라서 하면 삭제는 되지 않고
usage: conda-script.py remove [-h] [-n ENVIRONMENT | -p PATH] [-c CHANNEL] [--use-local] [--override-channels]
[--repodata-fn REPODATA_FNS] [--all] [--features] [--force-remove] [--no-pin] [-C] [-k]
[--offline] [-d] [--json] [-q] [-v] [-y] [--dev]
[package_name ...]

Remove a list of packages from a specified conda environment.

This command will also remove any package that depends on any of the
specified packages as well---unless a replacement can be found without
that dependency. If you wish to skip this dependency checking and remove
just the requested packages, add the '--force' option. Note however that
this may result in a broken environment, so use this with caution.

Options:

positional arguments:
package_name Package names to remove from the environment.

optional arguments:
-h, --help Show this help message and exit.
--dev Use sys.executable -m conda in wrapper scripts instead of CONDA_EXE. This is mainly for use
during tests where we test new conda source against old Python versions.

Target Environment Specification:
-n ENVIRONMENT, --name ENVIRONMENT
Name of environment.
-p PATH, --prefix PATH
Full path to environment location (i.e. prefix).

Channel Customization:
-c CHANNEL, --channel CHANNEL
Additional channel to search for packages. These are URLs searched in the order they are given
(including local directories using the 'file://' syntax or simply a path like
'/home/conda/mychan' or '../mychan'). Then, the defaults or channels from .condarc are
searched (unless --override-channels is given). You can use 'defaults' to get the default
packages for conda. You can also use any name and the .condarc channel_alias value will be
prepended. The default channel_alias is http://conda.anaconda.org/.
--use-local Use locally built packages. Identical to '-c local'.
--override-channels Do not search default or .condarc channels. Requires --channel.
--repodata-fn REPODATA_FNS
Specify name of repodata on remote server. Conda will try whatever you specify, but will
ultimately fall back to repodata.json if your specs are not satisfiable with what you specify
here. This is used to employ repodata that is reduced in time scope. You may pass this flag
more than once. Leftmost entries are tried first, and the fallback to repodata.json is added
for you automatically.

Solver Mode Modifiers:
--all Remove all packages, i.e., the entire environment.
--features Remove features (instead of packages).
--force-remove, --force
Forces removal of a package without removing packages that depend on it. Using this option
will usually leave your environment in a broken and inconsistent state.
--no-pin Ignore pinned file.

Networking Options:
-C, --use-index-cache
Use cache of channel index files, even if it has expired.
-k, --insecure Allow conda to perform "insecure" SSL connections and transfers. Equivalent to setting
'ssl_verify' to 'false'.
--offline Offline mode. Don't connect to the Internet.

Output, Prompt, and Flow Control Options:
-d, --dry-run Only display what would have been done.
--json Report all output as json. Suitable for using conda programmatically.
-q, --quiet Do not display progress bar.
-v, --verbose Can be used multiple times. Once for INFO, twice for DEBUG, three times for TRACE.
-y, --yes Do not ask for confirmation.

Examples:

conda remove -n myenv scipy

The system cannot find the path specified.
The system cannot find the path specified.

라는 오류가 나옵니다

다음으로 레트로에서는 똑같이 pip밑으로 이동시키고 가상환경 삭제 후 다시 재생성을 시도했는데
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['C:\python\envs\rl-gym-retro\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\Users\경북대학교\start-RL\gym-retro\condaenv.7p8uihse.requirements.txt']
Pip subprocess output:

Pip subprocess error:
ERROR: Could not find a version that satisfies the requirement libcxx==4.0.1=hcfea43d_1 (from -r C:\Users\경북대학교\start-RL\gym-retro\condaenv.7p8uihse.requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for libcxx==4.0.1=hcfea43d_1 (from -r C:\Users\경북대학교\start-RL\gym-retro\condaenv.7p8uihse.requirements.txt (line 1))

failed

CondaEnvException: Pip failed
라는 오류가 나오거나
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::vs2015_runtime-14.27.29016-h5e58377_2'.
Rolling back transaction: done

[Errno 13] Permission denied: 'C:\python\envs\rl-gym-retro\vcruntime140.dll'
()
라는 오류가 나옵니다
어떻게 해결을 해야 할 지 모르겠습니다

Ground Rules

  • 수학은 정성적으로 다루고, 코드를 최대화 한다.
  • 코드는 Reference Code를 가져오되, 인용표기를 철저히 한다. 주석은 한글화 한다.
  • 맥을 기반으로 저술 => 윈도우에서 안되는 거 나중에 본다
  • Anaconda/Virtualenv 쉬운 것으로 (각자 편한 걸로)
  • Python 3.x 이상
  • AWS 기반으로 작성 Deep Racer, NAS
  • 모든 컨콜은 녹화한다
  • 각자 최소 작업 분량은 70페이지로 한다. 더 늘어나는 것은 재량껏

6장_Azure, Ray 워커 접속이 잘 안 되네요

•환경: 윈도우10(My PC) // 우분투18 2세대 가상 머신 접속

Putty 사용-X11 forward 세팅(GUI)
-firefox 실행되고, dashboard 확인/글카 드라이버 안 잡음

•가상 머신 1ea는 확인 완료

★마스터 / 슬레이브(워커) 접속이 쉽지 않네요

  1. Azure 웹사이트
    마스터 : 인바운드 6379 포트 추가
    슬레이브: 인바운드 6379 포트 추가

★책에서는 3389 포트 추가로 되어있음
3389, 8080, * 도 했는데 별 반응 없네요

  1. 우분투 18 가상 머신
    *포트허용
    sudo iptables -I INPUT 1 -p tcp --dport 6379 -j ACCEPT

    *Ray 시작

    1. 마스터 실행
      ray start --head --port=6379 --block

    2. 슬레이브 실행
      ray start --address='10.5.0.4:6379' --redis-password='5241590000000000'

슬레이브에서
telnet 10.5.0.4 6379
계속 trying 뜨는거 보면, ★방화벽에서 막고 있는데★, 더 이상은 모르겠네요 ^^

•설치하면서 특이사항
※U18 파이썬 버전: 책_py 3.8.5
콘다 생성시 3.9 로 변경되서 // ★py 3.8.3 지정해서 설치함 // 텐서 2.6 // 케라스 2.6 (두개 일치)
conda create --name ray python=3.8.3
conda install --name ray pip python=3.8.3

※텐서 설치 후 // 케라스 추가 설치함
conda install --name ray tensorflow -y
pip install keras==2.6.*
이후 Train 가능

제안서 작업

Ch1, 2, 4 - 조규남 작가님
Ch3 - 맹윤호 작가님
Ch5 - 임지순 작가님 BP 보고 나머지 작가님들 작성, 5.2는 맹윤호 작가님

1/19까지 작성 완료

본서 80페이지 Environment 에서 Dependency 오류가 납니다.

해당 레포를 클론하고 environment.yml 을 콘다로 설치 시

하기와 같은 이슈가 발생합니다.

오래된 버전으로 인해 발생한 문제 같은데, 해결법이 있다면 알려주시면 감사하겠습니다.

ResolvePackageNotFound:

  • xz==5.2.4=h1de35cc_4
  • python==3.7.7=hc70fcce_0_cpython
  • libffi==3.2.1=h475c297_4
  • libcxxabi==4.0.1=hcfea43d_1
  • ncurses==6.2=h0a44026_0
  • tk==8.6.8=ha441bb4_0
  • libcxx==4.0.1=hcfea43d_1
  • zlib==1.2.11=h1de35cc_3
  • libedit==3.1.20181209=hb402a30_0
  • readline==8.0=h1de35cc_0
  • openssl==1.1.1e=h1de35cc_0
  • sqlite==3.31.1=ha441bb4_0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.