ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Temporal Difference 1
    Tech/Algorithms 2011. 6. 27. 21:28

     

     Reinforcement learning에서 가장 핵심적인 아이디어라 하면, Temporal Difference learning이라 들 수 있다. 앞선 포스팅에서 Monte Carlo와 Dynamic Programming 등에 대해 간략히 설명해보았는데, Reinforcement learning에서 사용되는 Temporal difference learning은 이 2가지 방법을 모두 적절히 combination한 모델이라 볼 수 있다.

     

    • Monte Carlo와 같은 점 : The environment's dynmaic에 대한 Modeling이 없이, raw experience 만으로도 learning이 가능하다.
    • Dynamic Programming과 같은 점 : Final outcome까지 기다리지 않고, estimate의 update가 가능하다.

     


    c.f) Reinforcement Learning의 핵심은 Policy evaluation을 하는 것으로, Monte Carlo, Dynamic Programming, Temporal Difference 모두 이 때에 사용하는 Algorithm이다.

     

    Temporal Difference를 이용한 Prediction

     

    Reinforcement Learning에서는 현재 State에서 기대되는 Reward estimate를 구하는 것이 핵심이다. (policy evaluation)

    Monte Carlo와 Temporal Difference는 모두 경험에 기반하여 prediction을 하는데, 미묘한 차이점이 있다. Monte Carlo에서는  현재 State에서 visit가 끝난 후, 실제 reward를 가지고 estimate를 update하게 되어 있다. 즉, 최종 reward가 발생하기 전까지는 estimate의 update가 없다. (Monte Carlo methods wait until the return following the visit is known then use that return as a target for V(s) )

    이를 수식으로 나타내면 아래와 같다.

    V(s_t)&\leftarrow V(s_t)+\alpha\left[R_t-V(s_t)\right] 

     

     반면에 Temporal Difference는 다음 visit가 발생할 때 바로 update를 한다. 즉, 최종적인 reward를 이용하는 것이 아니라, 다음 time step t+1에서 기대되는 reward estimate를 이용하여 update한다.

    V(s_t)&\leftarrow&V(s_t)+\alpha\left[r_{t+1}+\gamma V(s_{t+1})-V(s_t)\right] 

     

     Monte Carlo 수식의 Reward 위치에 Temporal Difference에는 무엇이 들어갔는지 눈여겨 보자.

     이렇게, Temporal Difference에서 existing estimate에 의존하여 값이 update되는 특성을 bootstrapping이라 한다.

     

     

    이 글은 스프링노트에서 작성되었습니다.

    댓글

Copyright 2022 JY