SlideShare a Scribd company logo
1 of 199
Download to read offline
We present the first deep learning model to
successfully learn control policies directly from
high-dimensional sensory input using
reinforcement learning. The model is a
convolutional neural network, trained with a
variant of Q-learning, whose input is raw pixels
and whose output is a value function estimating
future rewards. We apply our method to seven
Atari 2600 games from the Arcade Learning
Environment, with no adjustment of the
architecture or learning algorithm. We find that it
outperforms all previous approaches on six of the
games and surpasses a human expert on three of
them.
팀원소개
주찬웅
(네이버)
박민철
(국민대학교)
이건희
(서울과기대)
김상근
(패스트캠퍼스)
김준태
(대전대학교)
개인 의견
결국 우리의 목표는
DQN 정복
입력
DQN
출력
알고리즘
DDQN
(김준태)
Multi-
Step RL
(이건희)
구조
Dueling
Network
(김상근)
NoiseNet
(주찬웅)
separate processes
메모리
PER
(박민철)
Context
-DQN
-Double DQN
-PER
-Dueling
-Multi step
-Noisy Network
DQN
https://arxiv.org/pdf/1312.5602.pdf
Q-learning + DL
강화학습이 진행되는 과정
강화학습이 진행되는 과정
Agent의 Action을 통해 Episode를 모은다.
강화학습이 진행되는 과정
Agent의 Action을 통해 Episode를 모은다.
모여진 Episode를 바탕으로 Q값과 정책 값을 Update.
하지만
Ref : Lecture 6: Q-Network
차원의 저주(Curse of Dimensionality) 문제 발생
바둑판만 보더라도
상태 공간이 10^38!!
Function approximation 사용
CNN
특징추출
Q함수 학습
일반화(Generalization)가 잘되어 있다면
일반화(Generalization)가 잘되어 있다면
처음 보는 상황에서도
일반화(Generalization)가 잘되어 있다면
처음 보는 상황에서도
Q값을 잘 맞출 수 있다.
하지만
DQN을 학습하다 보면
과하게 좋은 Q값을 주게 된다.
그래서
학습이 잘 안 된다.
그러면 어떻게 하지?
Double DQN
https://arxiv.org/abs/1509.06461
이름에서도 알 수 있듯이
2개의 네트워크 사용
두 네트워크의 파라미터
두 네트워크의 파라미터
하나의 네트워크는 빠르게 업데이트를 하면서 Episode를 생성
두 네트워크의 파라미터
하나의 네트워크는 빠르게 업데이트를 하면서 Episode를 생성
다른 하나는 느리게 학습하면서
어느 한 행동의 Q값이 과도하게 커지지 않도록 막아줌
즉
를 구할 때는 일정 반복 횟수마다 업데이트를 해준다
그 결과
우리는 항상 살아 갈 때 우선순위를 따진다.
준태야
내가 먼저야 공부가 먼저야?
DQN은 Replay Memory로 부터
경험을 가져와 학습한다.
Random하게 가져오기 때문에
운빨….???
그러면
학습할 메모리에 우선순위를 주면…?
Prioritized Experience Replay
https://arxiv.org/abs/1511.05952
DQN
DQN
Experience를 Replay memory에 넣어놓고 학습한다.
DQN
Experience를 Replay memory에 넣어놓고 학습한다.
DQN + PER
DQN
Experience를 Replay memory에 넣어놓고 학습한다.
DQN + PER
학습해야 하는 Experience에 우선순위를 부여
우선순위는 어떻게 측정?
TD-Error 사용
NextState의 Maximum한 Q값
NextState의 Maximum한 Q값 현재 예측된 Q값
NextState의 Maximum한 Q값 현재 예측된 Q값
TD-Error
하지만
TD-Error만 가지고 학습을 하면
몇 가지 문제점이 발생한다
첫째
첫째
선택되지 않은 경험은 학습을 안 한다.
첫째
선택되지 않은 경험은 학습을 안 한다.
첫째
선택되지 않은 경험은 학습을 안 한다.
TD-Error가 낮아
=5
=4
=3
=2
=1
=5
=4
=3
=2
=1
TD-Error크다
=3
=2
=1
TD-Error가 큰 순서대로 학습
=5
=5
=3
=2
=1
Experience 다시 채우기
=3
=2
=1
다시 학습
=3
=2
=1
우린 언제쯤…
둘째
둘째
선택된 경험만 학습하여 오버피팅(Overfitting) 발생
예를들면
셋째
셋째
노이즈에 민감
확률적 샘플링 방법
Probability of sampling transition
Probability of sampling transition
Priority of transition
Probability of sampling transition
Priority of transition
how much prioritization is used
Probability of sampling transition
Priority of transition
how much prioritization is used
= 0 Random기반 = DQN방법
Probability of sampling transition
Priority of transition
how much prioritization is used
= 0 Random기반 = DQN방법
= 1 TD-Error 기반
Probability of sampling transition
Priority of transition
how much prioritization is used
= 0 Random기반 = DQN방법
= 1 TD-Error 기반
= 0.6 DQN + TD-Error
Priority of transition
Priority of transition
1. Proportional prioritization
Priority of transition
1. Proportional prioritization
0보다 약~~간 큰
Priority of transition
1. Proportional prioritization
0보다 약~~간 큰
TD-Error가 0이 되는걸 막는다.
Priority of transition
1. Proportional prioritization
0보다 약~~간 큰
TD-Error가 0이 되는걸 막는다.
2. Rank – based prioritization
r ( ) 는 T − 에 의해 replay
memory가 정렬되었을 때의 순서
PER는 확률기반으로 update를 한다.
확률 기반으로 update를 하려면 모든 값이 골고루 분포 되어 있어야 한다
하지만
Priority replay는 편차가 발생한다
Important sampling weights
Important sampling weights?
Important sampling weights?
(TD-error)이 아닌 (weighted TD-error) 에 의해 update.
Important sampling weights?
(TD-error)이 아닌 (weighted TD-error) 에 의해 update.
w/max (w) 로 정규화를 함으로써 bias크기를 낮춘다.
Dueling DQN
https://arxiv.org/pdf/1511.06581.pdf
Q(s, a)
Q(s, a)
특정 상태(s)에서
Q(s, a)
특정 상태(s)에서
특정 행동(a)을 했을 때
Q(s, a)
특정 상태(s)에서
특정 행동(a)을 했을 때
이것이 얼마나 좋은지
다시 생각해 보면
가치의 2가지 근본적인 개념으로 생각 가능
첫번째
주어진 상태에 대해 얼마나 좋은지 말해주는
가치함수 V(s)
두번째
다른 행동과 비교하여 특정 행동이 얼마나
좋은지 알려주는
이득함수 A(s, a)
A(s, a) = Q(s, a) – V(s)
DQN
Dueling DQN
어떻게 DeepMind는 V와 A로 나눴을까?
DeepMind의 직관적이랍니다.
한 스텝만 진행한 후 받은 Reward로 학습하는 TD
한 스텝만 진행한 후 받은 Reward로 학습하는 TD
Episode가 끝나야 업데이트를 하는 Monte Carlo
어떻게 Update를 해야 더 좋아질까?
작심삼일을 계속 반복하면 10000시간의 법칙이 되는 것 처럼
중간 스텝마다 Reward를 받으면서 학습해 볼까?
Multi-Step Reinforcement Learning:
A Unifying Algorithm
https://arxiv.org/pdf/1703.01327.pdf
?
?
먼저 TD update 부터
Update target
Update target
n-step update는?
n-step
빠르게 설명 하겠습니다
V 대신에 Q-function사용
V 대신에 Q-function사용
expectation
Importance sampling이 필요 없는 off-policy
=0 Expectation
=1 Sampling
DQN을 학습하다 보면
DQN을 학습하다 보면 학습을 멈출 때가 있다.
이럴땐?
매가 답
NOISY NETWORKS FOR
EXPLORATION
https://arxiv.org/pdf/1706.10295.pdf
Action space noise param space noise
우리 모두가 아는 그 식
오잉?
다시 한번
w
w b
w b
Random variables
w b
Random variables
Learnable
DQN and Dueling에 적용
Noise variables
Noise variables
Factorised Gaussian noise를 사용!!
Factorised Gaussian noise
Factorised Gaussian noise
Gaussian variables
Factorised Gaussian noise
Gaussian variables
Gaussian variables for noise of the outputs
Factorised Gaussian noise
Gaussian variables
Gaussian variables for noise of the outputs
비슷한 시기에
Open AI 에서도 나온 논문
Parameter Space Noise for Exploration
https://arxiv.org/pdf/1706.01905.pdf
모델 파라미터
모델 파라미터
가우시안 노이즈
모델 파라미터
???
threshold
thresholddistance
thresholddistance
어떤 distance?
논문에는 이렇게 나와 있습니다.
perturbed and non-perturbed policy
흠…..
상근님의 단어 풀이
perturbed and non-perturbed policy
perturbed and non-perturbed policy
노이즈가 포함된 policy 노이즈가 포함되지 않은 policy
다시 본론으로 돌아와
위 논문들을 다 합치면
DQN
Double DQN
Prioritised Experience Replay
Dueling Network Architecture
Multi-step Returns
Distributional RL
Noisy Network
ㅎㅎㅎ….
DQN
Double DQN
Prioritised Experience Replay
Dueling Network Architecture
Multi-step Returns
Noisy Network
https://github.com/reinforcement-learning-kr/break_dqn
다음에는….
감사합니다

More Related Content

What's hot

딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해Hee Won Park
 
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기Kwangsik Lee
 
파이썬으로 나만의 강화학습 환경 만들기
파이썬으로 나만의 강화학습 환경 만들기파이썬으로 나만의 강화학습 환경 만들기
파이썬으로 나만의 강화학습 환경 만들기정주 김
 
keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)beom kyun choi
 
ML + 주식 phase 2
ML + 주식  phase 2ML + 주식  phase 2
ML + 주식 phase 2HoChul Shin
 
iT Cafe - Deep Learning
iT Cafe - Deep LearningiT Cafe - Deep Learning
iT Cafe - Deep LearningDongmin Kim
 
LSTM 네트워크 이해하기
LSTM 네트워크 이해하기LSTM 네트워크 이해하기
LSTM 네트워크 이해하기Mad Scientists
 
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)Euijin Jeong
 
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...YeChan(Paul) Kim
 
[기초개념] Recurrent Neural Network (RNN) 소개
[기초개념] Recurrent Neural Network (RNN) 소개[기초개념] Recurrent Neural Network (RNN) 소개
[기초개념] Recurrent Neural Network (RNN) 소개Donghyeon Kim
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)WON JOON YOO
 
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호NAVER D2
 
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Mad Scientists
 
Learning to remember rare events
Learning to remember rare eventsLearning to remember rare events
Learning to remember rare events홍배 김
 
개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow양 한빛
 
딥러닝의 기본
딥러닝의 기본딥러닝의 기본
딥러닝의 기본deepseaswjh
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기NAVER D2
 
Bag of Tricks for Image Classification with Convolutional Neural Networks (C...
Bag of Tricks for Image Classification  with Convolutional Neural Networks (C...Bag of Tricks for Image Classification  with Convolutional Neural Networks (C...
Bag of Tricks for Image Classification with Convolutional Neural Networks (C...gohyunwoong
 

What's hot (20)

딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해딥러닝 기본 원리의 이해
딥러닝 기본 원리의 이해
 
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
 
DP 중급 2
DP 중급 2DP 중급 2
DP 중급 2
 
01. dp hard
01. dp hard01. dp hard
01. dp hard
 
파이썬으로 나만의 강화학습 환경 만들기
파이썬으로 나만의 강화학습 환경 만들기파이썬으로 나만의 강화학습 환경 만들기
파이썬으로 나만의 강화학습 환경 만들기
 
keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)keras 빨리 훑어보기(intro)
keras 빨리 훑어보기(intro)
 
ML + 주식 phase 2
ML + 주식  phase 2ML + 주식  phase 2
ML + 주식 phase 2
 
iT Cafe - Deep Learning
iT Cafe - Deep LearningiT Cafe - Deep Learning
iT Cafe - Deep Learning
 
LSTM 네트워크 이해하기
LSTM 네트워크 이해하기LSTM 네트워크 이해하기
LSTM 네트워크 이해하기
 
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)
강화학습 기초_2(Deep sarsa, Deep Q-learning, DQN)
 
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...
Learning to Communicate to Solve Riddles with Deep Distributed Recurrent Q-Ne...
 
[기초개념] Recurrent Neural Network (RNN) 소개
[기초개념] Recurrent Neural Network (RNN) 소개[기초개념] Recurrent Neural Network (RNN) 소개
[기초개념] Recurrent Neural Network (RNN) 소개
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
 
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
 
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
 
Learning to remember rare events
Learning to remember rare eventsLearning to remember rare events
Learning to remember rare events
 
개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow개발자를 위한 공감세미나 tensor-flow
개발자를 위한 공감세미나 tensor-flow
 
딥러닝의 기본
딥러닝의 기본딥러닝의 기본
딥러닝의 기본
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
 
Bag of Tricks for Image Classification with Convolutional Neural Networks (C...
Bag of Tricks for Image Classification  with Convolutional Neural Networks (C...Bag of Tricks for Image Classification  with Convolutional Neural Networks (C...
Bag of Tricks for Image Classification with Convolutional Neural Networks (C...
 

Similar to Dqn break

Reinforcement learning v0.5
Reinforcement learning v0.5Reinforcement learning v0.5
Reinforcement learning v0.5SANG WON PARK
 
파이썬과 케라스로 배우는 강화학습 저자특강
파이썬과 케라스로 배우는 강화학습 저자특강파이썬과 케라스로 배우는 강화학습 저자특강
파이썬과 케라스로 배우는 강화학습 저자특강Woong won Lee
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization홍배 김
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)ssusercdf17c
 
Nationality recognition
Nationality recognitionNationality recognition
Nationality recognition준영 박
 
Rl from scratch part5
Rl from scratch part5Rl from scratch part5
Rl from scratch part5Shinwoo Park
 
강화학습 & Unity ML Agents
강화학습 & Unity ML Agents강화학습 & Unity ML Agents
강화학습 & Unity ML AgentsHyunjong Lee
 
Alpha Go Introduction
Alpha Go IntroductionAlpha Go Introduction
Alpha Go IntroductionIldoo Kim
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks ISang Jun Lee
 
Multiagent Cooperative and Competition with Deep Reinforcement Learning
Multiagent Cooperative and Competition with Deep Reinforcement LearningMultiagent Cooperative and Competition with Deep Reinforcement Learning
Multiagent Cooperative and Competition with Deep Reinforcement LearningYeChan(Paul) Kim
 
Chapter 15 Representation learning - 1
Chapter 15 Representation learning - 1Chapter 15 Representation learning - 1
Chapter 15 Representation learning - 1KyeongUkJang
 
Introduction toDQN
Introduction toDQNIntroduction toDQN
Introduction toDQNCurt Park
 
Forward-Forward Algorithm
Forward-Forward AlgorithmForward-Forward Algorithm
Forward-Forward AlgorithmDong Heon Cho
 
Gaussian Mixture Model
Gaussian Mixture ModelGaussian Mixture Model
Gaussian Mixture ModelKyeongUkJang
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장Sunggon Song
 
Deep learning seminar_snu_161031
Deep learning seminar_snu_161031Deep learning seminar_snu_161031
Deep learning seminar_snu_161031Jinwon Lee
 

Similar to Dqn break (17)

Reinforcement learning v0.5
Reinforcement learning v0.5Reinforcement learning v0.5
Reinforcement learning v0.5
 
파이썬과 케라스로 배우는 강화학습 저자특강
파이썬과 케라스로 배우는 강화학습 저자특강파이썬과 케라스로 배우는 강화학습 저자특강
파이썬과 케라스로 배우는 강화학습 저자특강
 
Q Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object LocalizationQ Learning과 CNN을 이용한 Object Localization
Q Learning과 CNN을 이용한 Object Localization
 
머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)머신 러닝을 해보자 1장 (2022년 스터디)
머신 러닝을 해보자 1장 (2022년 스터디)
 
Nationality recognition
Nationality recognitionNationality recognition
Nationality recognition
 
Rl from scratch part5
Rl from scratch part5Rl from scratch part5
Rl from scratch part5
 
강화학습 & Unity ML Agents
강화학습 & Unity ML Agents강화학습 & Unity ML Agents
강화학습 & Unity ML Agents
 
Alpha Go Introduction
Alpha Go IntroductionAlpha Go Introduction
Alpha Go Introduction
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks I
 
Multiagent Cooperative and Competition with Deep Reinforcement Learning
Multiagent Cooperative and Competition with Deep Reinforcement LearningMultiagent Cooperative and Competition with Deep Reinforcement Learning
Multiagent Cooperative and Competition with Deep Reinforcement Learning
 
Chapter 15 Representation learning - 1
Chapter 15 Representation learning - 1Chapter 15 Representation learning - 1
Chapter 15 Representation learning - 1
 
Introduction toDQN
Introduction toDQNIntroduction toDQN
Introduction toDQN
 
Rl
RlRl
Rl
 
Forward-Forward Algorithm
Forward-Forward AlgorithmForward-Forward Algorithm
Forward-Forward Algorithm
 
Gaussian Mixture Model
Gaussian Mixture ModelGaussian Mixture Model
Gaussian Mixture Model
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
Deep learning seminar_snu_161031
Deep learning seminar_snu_161031Deep learning seminar_snu_161031
Deep learning seminar_snu_161031
 

Dqn break