let us not love with words or tongue but actions and truth.

IT/강화학습 12

Proximal Policy Optimization (PPO)

Summary: 1. DQN: Q값 추정을 neural network로 2. Policy Gradient: Q값 추정 안하고 Policy 자체를 학습 3. A2C: Actor와 Critic을 분리하여 critic이 value값 추정 4. DDPG: Actor는 Critic에 완전히 의존. Critic이 action의 가치 추정 5. TD3: DDPG upgrade 6. SAC: Entropy가 높은 policy 우선 7. PPO: Trusted region 기반 policy update PPO의 motivation learning rate에 따라 결과가 많이 좌우됨 (sudden drop이 발생하는 원인) 해결책: trusted region내에서 움직이면 sudden drop을 피할 수 있음 truste..

IT/강화학습 2022.12.13

Twin Delayed DDPG (TD3), Soft Actor-Critic (SAC)

Twin Delayed DDPG (TD3) TD3와 DDPG의 차이점 1. Clipped double Q learning 기존의 DDPG는 4개의 layer를 사용했다면, TD3는 main/target critic network를 하나씩 더 사용하여 총 6개를 사용함 2. Delayed policy updates the actor network parameter is delayed and updated only after two steps of the episode. Crtic을 많이 업데이트하고, actor를 중간중간 가끔식 update하자라는 뜻임 (최소 2번에 1번씩 actor를 update해주자) 3. Target policy smoothing target action에도 noise를 추가해주자...

IT/강화학습 2022.12.06

Multi-Armed Bandit (MAB)

가장 좋은 slot machine을 찾기위해 아래와 같은 프로세스를 따름 모든 slot machine을 실험해보고 그중에서 가장 max의 reward를 주는 slot machine을 찾음 이 실험을 위해 발생한 비용을 regret이라고 함 즉, regret = cost multi-armed bandit에서의 - action = slot machine arm의 개수 = number of bandit - observation space= 1 (왜냐 하면 slot machine을 땡기면 매번 똑같은 state로 돌아오기 때문에) - p_dist = 각 slot machine(기계)의 승률 - r_dist = reward distribution = (1, 1, 1) → 이기면 1, 아니면 0 multi-arme..

IT/강화학습 2022.12.04

Actor Critic methods - DDPG

직접적으로 policy에 대해 critic하여 value-network의 가치를 상승시키는 목적으로 policy-based와 value-based를 합친것임 – The actor network • A policy network • Finds an optimal policy – The critic network • A value network (estimates state value) • Evaluates the policy produced by the actor network : 어떤 state의 가치를 판단해줌 Policy gradient에서의 value network와의 비교 - Policy gradient: value network의 목적은 state value를 사용하여 policy gradien..

IT/강화학습 2022.11.29

Policy Gradient Methods

1. Value-based RL 정의: 높은 Q값에 근거하여 value를 선택하는 것 단점: continuous-action space한 환경에서는 바로 적용되기 어려움 eg1) 스피드를 150이상으로 선택하겠다. eg2) 각도를 10도 변경하겠다. 해결책: discretization (별로 효과적이지 않음) 2. Policy-based RL: policy gradient DQN input: state output: Q-value Policy gradient input: state output: action을 취할 probability → stochatic policy와 유사함 (policy-based method에서는 stochatic policy를 사용) → ㅠ(a|s)로 표현 • If we get ..

IT/강화학습 2022.11.15

Deep Q Network

DQN이 등장하게된 배경 Q table로 해결하기 어려운 것 when the number of states is too large. → 계산하기가 매우 복잡해짐 위의 벽돌상태를 (깨진것, 안깨진것) 0,1로 표시하고 공의 위치를 0/1로 표시하면 너무 많은 조합이 있음 → 해결책 ) 이미지 자체를 input으로 사용하자. 단, 순간의 이미지를 캡쳐하므로 공의 방향을 알기 어려움 → 해결책 ) time-series 4개의 이미지를 연속해서 가져옴 하지만 또 너무 많은 조합 → DQN을 사용하자. DQN 정의: Q table을 함수화하여 input을 state로 정하고 output을 각 action에 대한 Q-value로 하는 것 Understanding DQN - supervised learning을 사용..

IT/강화학습 2022.11.01

Temporal Difference Learning

** policy가 정해진상태에서 V, Q 구하는 것 = prediction ** policy를 정하는 것 = control 1. Temporal Difference Learning - TD Prediction Monte Carlo method의 단점 episode가 너무 길거나, 끝나지 않는 episode이면(continuous tasks) return값을 계산할 수 없으므로 temporal difference learning을 사용함 Monte Carlo method의 장점 현실은 dynamic programming을 쓸 수 없는 경우가 많다(model-free method 필요) Dynamic programming의 장점 bootstrapping을 사용하여 episode가 끝날때까지 기다리지 않아도..

IT/강화학습 2022.10.25

Monte Carlo methods - Importance Sampling

Importance의 필요성에 대해 이 전 글에서 언급했던 내용을 다시 복습해보면 아래와 같다. off-policy의 단점: 한번 try했던 policy가 가장 best임에도 불구하고, random하게 생성된 policy로 진행이 되어 이전 best policy에 대한 가치를 제대로 반영 하지 못함 → randomly하게 선택했을 때의 distribution과(behavior policy) 목표하는 것의 distribution(target policy)이 일치 하지 못할 때 → 해결책: importance sampling을 사용하여 해결함 the importance sampling ratio The relative probability of the trajectory under the target and..

IT/강화학습 2022.10.12