RL Course by David Silver - Lecture 2: Markov Decision Process

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ค. 2024
  • #Reinforcement Learning Course by David Silver# Lecture 2: Markov Decision Process
    #Slides and more info about the course: goo.gl/vUiyjq

ความคิดเห็น • 474

  • @NganVu
    @NganVu 4 ปีที่แล้ว +147

    0:45 Markov Processes
    13:00 Markov Reward Processes
    43:14 Markov Decision Processes
    1:40:18 Extensions to MDPs

  • @FreestateofOkondor
    @FreestateofOkondor ปีที่แล้ว +22

    It's crazy to me how much more of RL I've understood in these 2 beginning lectures vs multiple days of trying to understand what my professors have cooked up in their lecture. And David actually goes into even more depth.

  • @VinBhaskara_
    @VinBhaskara_ 5 ปีที่แล้ว +208

    Fantastic. The lectures are so consistent, formal, and organized - mathematically as well as pedagogically. Optimal policy for teaching such a course!

    • @huaweijian2210
      @huaweijian2210 4 ปีที่แล้ว +1

      One of the best lectures here at UCL CS :)

    • @astaconteazamaiputin
      @astaconteazamaiputin 3 ปีที่แล้ว +3

      Indeed. One of the best lectures I have seen on a difficult topic. And his attitude is just...rare and priceless actually. I feel outmost respect for his pedagogical methods.

    • @mathavraj9378
      @mathavraj9378 3 ปีที่แล้ว +2

      I see what you did there. nice

    • @matthiasho3216
      @matthiasho3216 2 ปีที่แล้ว +1

      I totally agree. Mr David Silver is a great lecturer

  • @stevetang5131
    @stevetang5131 3 ปีที่แล้ว +21

    Best RL course 5 years ago and now still is to me. Thank you.

  • @mathavraj9378
    @mathavraj9378 3 ปีที่แล้ว +98

    can we appreciate the audience too? so interactive and they asked all questions that made our foundation even better. Kudos to David for patiently answering everyone with equal dedication

  • @muzammilnxs
    @muzammilnxs 7 ปีที่แล้ว +117

    This lecture series is a gem in reinforcement learning. Best material for RL as yet!!

    • @shivannawal7687
      @shivannawal7687 6 ปีที่แล้ว +1

      I've heard of this course as well. Do you have a resource that provides the correct way to download the packages required for starting the course ? Thanks

    • @eyeofhorus1301
      @eyeofhorus1301 5 ปีที่แล้ว +3

      I would expect nothing less from a guy at the forefront of AlphaZero

  • @tylersnard
    @tylersnard 4 ปีที่แล้ว +4

    I looked everywhere for a comprehensible explanation of RL. This is easy to understand and awesome. Thank you!

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 4 ปีที่แล้ว +13

    He has amazing ability to explain complexity in such clear way.

  • @Jacob-wp4km
    @Jacob-wp4km 6 ปีที่แล้ว +3

    This intro to MDP is seriously high-quality. Informative yet understandable.

  • @dudley5424
    @dudley5424 8 ปีที่แล้ว +317

    Thanks, Petyr Baelish. Great lecture series.

    • @Chr0nalis
      @Chr0nalis 8 ปีที่แล้ว +8

      He lacks the moustache.

    • @rickyhan7023
      @rickyhan7023 6 ปีที่แล้ว +5

      I'm impressed by the size of his head compared to his body.

    • @falcon20243
      @falcon20243 5 ปีที่แล้ว +46

      RL is a ladder.

    • @NilavraPathak
      @NilavraPathak 5 ปีที่แล้ว +2

      Nah looks more like Alex Honnold

  • @opalpearl3051
    @opalpearl3051 ปีที่แล้ว +2

    I have watched lectures from MIT and Stanford and David blows them away.

  • @TahlilAhmedchowdhury
    @TahlilAhmedchowdhury 4 ปีที่แล้ว +1

    I must say this is by far the best course whether you want to learn Deep or Shallow RL. Its so intuitive and easy to understand the basic of RL concepts. The current CS285 Course has a great material but for me its hard to understand. I repeatedly come back here to clear concepts. David Silver is a great Teacher.

  • @angelachikaebirim1043
    @angelachikaebirim1043 5 ปีที่แล้ว +5

    Prof. Silver is a brilliant teacher. Really enjoying this

  • @whaloob
    @whaloob 3 ปีที่แล้ว +4

    This guy is an impressively good lecturer. Easily comparable to, if not better than, the best profs I’ve had so far in 7 semesters of university.

  • @adbocode
    @adbocode 7 ปีที่แล้ว +292

    WARNING: take headphones off 42:25 -> 42:35 and 55:55 -> 56:05

    • @Stu49583
      @Stu49583 6 ปีที่แล้ว +30

      I wish I read this comment before that

    • @shrishabharadwaj4811
      @shrishabharadwaj4811 6 ปีที่แล้ว +3

      Me too.

    • @huahua71
      @huahua71 6 ปีที่แล้ว +4

      I guess many find this comment after hearing the noise

    • @chaitragn3379
      @chaitragn3379 5 ปีที่แล้ว +4

      Hahahah I read this comment and searched what is it. True take off headphone or be prepared for it.

    • @prateekagarawal5311
      @prateekagarawal5311 5 ปีที่แล้ว

      Thanks

  • @rameshmaddali6208
    @rameshmaddali6208 5 ปีที่แล้ว +1

    I can not resist from commenting. These presentations are more learnable I am scratching my head since a week. Fortunately I got into your video presentations. Awesome Dave Gold*.

  • @jamesr141
    @jamesr141 2 ปีที่แล้ว +1

    David is an amazing teacher. Because he loves the subject. Now I love it, too. Thanks David. Thanks Deepmind.

  • @Bromine97
    @Bromine97 3 ปีที่แล้ว

    Thank you for such a great set of lectures on Sutton and Barto's book. The lectures are so apt, thank you David for all your lectures

  • @khaled4635
    @khaled4635 2 ปีที่แล้ว

    Way better than the 2021 lecture with a similar title. Never found such a detailed explanation of MDPs Thanks

  • @zhongchuxiong
    @zhongchuxiong ปีที่แล้ว +11

    0:45 Markov Processes {S, P}. used to describe reinforcement learning environment.
    3:26 Markov Property: the current state contains all the information of history.
    4:35 State transition Matix. transition probability from s to s`.
    7:27 Example: student decision chain.
    13:00 Markov Reward Processes {S, P, R, γ}
    29:10 Bellman Equation for MRPs: Vs = Rt + γ * Σ(Ps+1 * Vs+1)
    39:01 Bellman Equation in Matrix Form.
    43:14 Markov Decision Processes {S, A, P, R, γ}
    46:15 Policies: for taking actions. π(a|s)
    50:51 Value Function.
    state-value funciton
    action-value function
    53:37 Bellman Expectation Equation, following a policy.
    Bellman expectation equation for Vπ(s)
    Bellman expectation equation for Qπ(s,a)
    1:02:52 Bellman Expectation Equation in matrix form
    1:04:01 Q&A
    1:08:06 Optimal Value Function. q*
    1:15:41 Optimal policy. π ≥ π` if v(s) ≥ v`(s), ∀s (for all states)
    Theorem: for any MDP, there's an optimal policy that's ≥ all other policies.
    Theorem: all optimal policies leads to the same optimal value funciton.
    1:19:54 find the optimal policy
    1:19:55 Bellman optimality equation.
    v*(s) = max(q*(a,s))
    q*(a,s) = R + γ * ΣP * v*(s`)
    1:29:39 how to solve bellman optimality equation? it's non-linear. use iterative solution.
    value iteration (next lecture)
    policy iteration (next lecture)
    q-learning (future lecture)
    sarsa
    1:31:49 Q&A
    1:40:18 Extensions to MDPs
    continuous & infinite MDP
    partially observable MDP
    undiscounted, average reward MDP

  • @yidingji7552
    @yidingji7552 4 ปีที่แล้ว +1

    Best introductory RL course on TH-cam!

  • @ludmiladeute6353
    @ludmiladeute6353 3 ปีที่แล้ว +1

    Thank you very much, professor David, for these great lectures!

  • @morganjones8368
    @morganjones8368 4 ปีที่แล้ว

    Exceptional lecture series so far. Very clear useful examples and explainations. Thank you very much Dr. Silver.

  • @user-gl6os8eh9g
    @user-gl6os8eh9g ปีที่แล้ว

    Despite its low resolution and not clear sound, this is the Best reinforcement learning lecture.
    Thanks for super easy, detailed explanation!

  • @astaconteazamaiputin
    @astaconteazamaiputin 3 ปีที่แล้ว +4

    Thank you for the question at 1:04:30 about states turning into actions / decisions, I appreciate the clarification !

  • @elio3101
    @elio3101 6 ปีที่แล้ว +8

    Great lecture. I really liked the approach, building from MP to MRP and finally MDP. It was well connected, like listening to a story. Thank you very much!

  • @JohnHAdams-vo2pk
    @JohnHAdams-vo2pk 4 ปีที่แล้ว +1

    Fantastic Lectures. I use them along with the Sutton/Barto text book. Excellent stuff

  • @mangaart3366
    @mangaart3366 ปีที่แล้ว +1

    What an amazing lecture! I had so much fun watching it and it helped clarify some things in my head about MDP.

  • @user-qw4jf1th7c
    @user-qw4jf1th7c 5 หลายเดือนก่อน +1

    Absolutely fantastic !! Thank you Dr. Silver !

  • @jieshi169
    @jieshi169 5 ปีที่แล้ว +1

    You save my day! Thank you so much for sharing this video on youtube!

  • @sagarhukkire742
    @sagarhukkire742 6 ปีที่แล้ว

    Thanks ..the way he explains math is simply amazing...

  • @channagirijagadish1201
    @channagirijagadish1201 5 ปีที่แล้ว

    Excellent lecture series. Thanks, David.

  • @volkerleukhardt4830
    @volkerleukhardt4830 ปีที่แล้ว

    Very cool, having this available free of charge. Thank you so much 😊🙌

  • @adi331
    @adi331 2 ปีที่แล้ว +6

    The part from 54:30 to 1:01:00 was a lot to take into. But it's actually not that much once you get a grip on it.
    First there is the *Bellman Equation* and the *Bellman Expectation Equation*
    The difference is that the *Bellman Expectation Equation* also incorporates actions.
    *Bellman Expectation Equation* = *Bellman Equation* + actions.
    After that we basically just have 4 variations of this:
    1. *Vπ* in terms of *Qπ*
    2. *Qπ* in terms of *Vπ*
    3. *Vπ* in terms of *itself*
    4. *Qπ* in terms of *itself*

    • @fahmikhoirurrijal9427
      @fahmikhoirurrijal9427 8 หลายเดือนก่อน +1

      i still don't understand how the calculations that we got the values for student MDP in 53:30, it was said prior that in MDP there's not just one expectation value anymore but here every nodes has one value?
      e.g how do we get the +2.7 value in the second class?

    • @shresthapatir6495
      @shresthapatir6495 2 หลายเดือนก่อน

      @@fahmikhoirurrijal9427if you understood it now can you please explain?

    • @theahmedmustafa
      @theahmedmustafa 29 วันที่ผ่านมา

      ​ @shresthapatir6495 Idk if this a little too late but here is how you get it:
      The value of the state = expected value of all actions that can be taken from it
      The value of an action = reward + expected value of all states it leads to
      There are two actions from that state: Sleep or Study.
      Lets talk about Sleep. This action always leads to terminal state so the expected value of states it leads to is 0. The reward is also 0 as stated in slides.
      Value of Sleep = reward + expected value of all states it leads to = 0 + 0 = 0
      Same can be done for Study. This action always leads to next state which has a value of 7.4 so the expected value of states it leads to is 7.4. The reward stated is -2.
      Value of Study = reward + expected value of all states it leads to = -2 + 7.4 = 5.4
      Now we have values of all actions for this state.
      The value of the state is the expected value of all its actions. In this case, the policy is to have a 50/50 choice if actions so each action has a 0.5 probability.
      Value of state = expected value of all actions = (0.5 * value of Sleep) + (0.5 * value of Study) = (0.5 * 0) + (0.5 * 5.4) = 2.7
      So the value of this state is 2.7

  • @jacksong8748
    @jacksong8748 4 ปีที่แล้ว +20

    1:41:24 did anyone else feel like an agent in a partially observable environment when the camera shut off while he was talking about partially observable environments?

  • @Anonymous-vh9tc
    @Anonymous-vh9tc 4 ปีที่แล้ว

    best teacher on RL, there is no contest

  • @consecuencias.imprevistas
    @consecuencias.imprevistas 7 ปีที่แล้ว +16

    If you're confused like I was at slide 32 (53:27) when he goes over the state-value function for the student MDP, the calculation for each node, using the look-ahead step from Bellman Equation is: v_pi(s) = E_pi[R_t+1 + gamma*v(S_t+1)|S_t = s].
    For instance, for the case of the -1.3 node, we calculate, given that the policy assigns 0.5 probabilities for all actions:
    0.5*(-2 + 2.7) + 0.5*(-1 + -2.3) ~= -1.3
    Where the first term of the sum is the contribution from the Study node, and the second term is the contribution from the Facebook node

    • @wonchulkim3008
      @wonchulkim3008 7 ปีที่แล้ว

      Could you be more specific??? I don't know how to get -1.3

    • @MinhVu-fo6hd
      @MinhVu-fo6hd 7 ปีที่แล้ว

      It is 0.5*[-2+2.7*(1)] + 0.5*[-1-2.3*(1)] = -1.3

    • @seongmukgang9843
      @seongmukgang9843 6 ปีที่แล้ว

      Thanks very much.

    • @wahabfiles6260
      @wahabfiles6260 4 ปีที่แล้ว

      I dont understand difference between state value function and action value function. In state value, the value of being in some state depends on the immediate reward in the next state. But we need an "action" to got to the next state so isnt it essentially action value function?

  • @jordan4890
    @jordan4890 3 ปีที่แล้ว +4

    "The future is independent of the past given the future" is crazy deep when you think about it. How many people lament over past transgressions and stress over "how it should have gone down" when in reality obtaining your goals is much more along the lines of "what can I do right now in this moment"

  • @slack128
    @slack128 3 ปีที่แล้ว +1

    The explanation of the Bellman Optimality Equation for V* was really enjoyable to watch. Thank you.

  • @donamincorleone
    @donamincorleone 8 ปีที่แล้ว +3

    Great lecture. Thanks!

  • @AakarshNair
    @AakarshNair 9 หลายเดือนก่อน

    shockingly clear explanations!

  • @emilfilipov169
    @emilfilipov169 5 ปีที่แล้ว

    Amazing lectures!

  • @ilfat_khairullin
    @ilfat_khairullin 3 ปีที่แล้ว

    Thank you! Amazing lecture!

  • @FedericoBaldassarre
    @FedericoBaldassarre 6 ปีที่แล้ว +5

    My question is related to when the reward for a state-action pair is computed in a Markov Decision Process.
    When showing the Student MDP on page 25 (min 45:00), the reward for (study, pub) is given immediately after the action is taken and exiting the state. This is compatible with the way we indicate the reward as R^a_s, meaning that it is defined by the action you've taken and the state you're exiting.
    However, later on in the video (min 56:30) and on the slides (page 32) it looks like the reward is given when the environment pushes you to the next state, once the action has been chosen. In formulas, it seems like r depends on the action and the next state, so R^a_{s'}
    To me, it makes more sense that the agent receives the reward as a function of the action and the state it'll end up in, rather than the state it is leaving. Consider a game where one can decide to attack or run: if I decide to attack and the environment decides that I should be defeated, I would like to get a negative reward immediately and not later.
    So, which one is the right way of thinking? Do the equations and the plot need fixing or am I misunderstanding something?

    • @MsCalcioo
      @MsCalcioo 5 ปีที่แล้ว +5

      Hi,
      The initial example is an example of Markov Reward Process. So, the reward function only depends on the state (you can check the slide for the definition of MRP). Therefore, you get a reward at time t+1 when you exit the state at time t no matter what the action is. The later example is Markov Decision Process. In MDP, your reward function definition also considers which action you take. So you take some action and exit the state at time t ("study" or "pub") and get a reward at time t+1 based on your actions and where you'll end up with.

    • @ercanatam6344
      @ercanatam6344 2 ปีที่แล้ว

      @@MsCalcioo You seem an expert on MDP. I have a question, "Pub" was a state in MRP example but in MDP it is removed being a state. Why? This confuses me. Moreover, rewards in MDPs are shown on the arc from (s,a) to s', but in the MDP example this convention is not followed.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      @@ercanatam6344 The states in the student MDP are literally the same as the states in the MRP, David just did not write the names in the circles/squares to avoid saturating the notation. What is confusing you is that he is using the words "pub" or "study" in order to describe actions as well. He means "go to pub" or "go to study". If you carry out the action "go to study" or "go to pub", you end up in the states "study"/"pub". Sometimes "go" could also mean "keep in", as in "keep in the pub", "keep studying", but I hope you get what I mean.

    • @fahmikhoirurrijal9427
      @fahmikhoirurrijal9427 8 หลายเดือนก่อน

      @@edmonddantes4705 i still don't understand how the calculations that we got the values for student MDP in 53:30, it was said prior that in MDP there's not just one expectation value anymore but here every nodes has one value?
      e.g how do we get the +2.7 value in the second class?

    • @edmonddantes4705
      @edmonddantes4705 8 หลายเดือนก่อน

      @@fahmikhoirurrijal9427 For any MDP, given a fixed policy pi, every state has a value given by the state-value function. The state-value function is literally defined in the previous slide and the chosen policy pi is uniform, so I am not sure what you are missing. Anyway, he applies the formula in the previous slide (you can do Monte Carlo sampling for an approximation or apply the Bellman expectation equation). PS: By the way, any MDP with a fixed policy is an MRP.

  • @0mane0
    @0mane0 4 ปีที่แล้ว +4

    just to make it clear about the question asked at about 23:00:
    I actually think that the sequence is finite not by an arbitrary definition but due to the fact that every loop in that scenario will eventually terminate with proabability of 1.
    For instance the "stay in facebook" loop has a probability of 0.9^n of happening during n stages, wich tends to zero as n tends to infinity, thus the probability of (eventually) leaving the loop tends to 1.

    • @andriesrosseau5048
      @andriesrosseau5048 4 ปีที่แล้ว +2

      Yes, he kinda dismisses the question out of hand, but the answer is more mathematically subtle than he makes it out to be.

    • @DornArmadro
      @DornArmadro 2 ปีที่แล้ว

      I searched for a commentary like that, because I got confused from the answer of this question in the video. Thanks. :)
      I think this can be seen by a short analysis of the transition matrix, e.g., the eigenvalues which are all between zero and one for each state except for the state "Sleep", which is one. This means that P^n for n to infinity converges to a matrix only with zeroes except for the column "to Sleep" which are all 1 then.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      Yes, episodic Markov processes terminate almost surely :). It is subtle. Also MDPs with a.s. absolutely bounded immediate rewards have finite discounted return (gamma < 1). But he is not very rigorous, he just wants to convey the main ideas.

  • @TheTaekwondo1996
    @TheTaekwondo1996 2 ปีที่แล้ว

    Thanks a lot for the great lecture!

  • @sng5192
    @sng5192 8 ปีที่แล้ว

    Thanks.. what a nice lecture!!

  • @ans1975
    @ans1975 8 ปีที่แล้ว

    Great stuff. Thanks a lot for sharing !

  • @machine-wisdom
    @machine-wisdom 6 ปีที่แล้ว +1

    One thing I'd like to discuss is whether the discount factor should be the same for both positive and negative rewards. Losses loom larger than gains, and it is fair to imagine that a risk aversive agent would not discount a negative reward.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      Note that, in general, for the fixed point convergence theorems (see lectures 4 and 5) to converge mathematically (and hence to be usable), negative rewards need to be discounted. How much discount you add is up to you, but I am guessing you can run simulations with different discount factors and see what works better, use something like TD-lambda where there are combined returns with different discounts, etc.
      On a different note, I have the impression that from a mathematical point of view, using negative or positive rewards is kind of equivalent. Indeed, let the immediate returns be uniformly bounded by below by a negative constant that we will call -C. Then by summing C to all the rewards, you construct a MDP that only has positive rewards and the optimal policies of the original process (the one with negative rewards) and the modified one and clearly the same, they are shared. Now you could ask: what is better for convergence? And that seems like a nontrivial question that depends on the problem, algorithm, spaces, etc.

  • @Chanakya06
    @Chanakya06 3 ปีที่แล้ว +8

    Best course material to start Reinforcement learning. However the math seems to be difficult at least for me.

  • @Shreyasrangasai
    @Shreyasrangasai 5 ปีที่แล้ว

    Is there any website for the "notes" referred to in the lecture? The website in discussion just has the slides.

  • @Alejandra-jq4xf
    @Alejandra-jq4xf 4 ปีที่แล้ว

    Brilliant. Thank you

  • @alfcnz
    @alfcnz 6 ปีที่แล้ว +3

    What's the convention he's mentioning at 31:48, of the reward indexing?

    • @alfcnz
      @alfcnz 6 ปีที่แล้ว +1

      "Sutton & Barto convention" and he's referring to this textbook incompleteideas.net/book/the-book-2nd.html

  • @minhdang1703
    @minhdang1703 7 ปีที่แล้ว +4

    I can't thank you enough for sharing such valuable lectures.

    • @kiuhnmmnhuik2627
      @kiuhnmmnhuik2627 7 ปีที่แล้ว +2

      Nah... you can always read the papers. The information is already out there.

    • @memechannel3345
      @memechannel3345 3 ปีที่แล้ว

      Yea

  • @drq3098
    @drq3098 6 ปีที่แล้ว

    Great lectures! Thank you! Can you please check: Time 1:17:00 the relation on policies is total, b/c a partial order does not always have a maximal element.

    • @iAmUzaar
      @iAmUzaar 4 ปีที่แล้ว +3

      I know this is an old comment but here goes. Having a maximal element is not the differentiator between partial/total order. Being able to use the comparison relation between any element, however, is. Here we define the comparison relation as v_π(s) ≥ v_π'(s) for all s. However, it may be the case that there exists s*, s' such that v_π(s*) ≥ v_π'(s*) and v_π'(s') ≥ v_π(s') which means that the relation cannot be applied to the two policies, they are incomparable. Therefore the value function defines only a partial order.

  • @sonam9281
    @sonam9281 5 ปีที่แล้ว

    great explanation!

  • @MGO2012
    @MGO2012 7 ปีที่แล้ว

    Thanks for efforts.

  • @kevinmcinerney9552
    @kevinmcinerney9552 7 ปีที่แล้ว +2

    At approx 22mins somebody asks about an infinite sequence. David says this is impossible, but even it was possible it's interesting to observe that the sequence of rewards would sum a finite value because it's actually just geometric series. This was discussed in the Udacity course a bit. Loving these lectures btw. David is magnificent.

    • @JaysonSunshine
      @JaysonSunshine 7 ปีที่แล้ว

      Also, since there is a sink, the probability goes to zero of generating a sequence of length n as n goes to infinity.

    • @monktastic1
      @monktastic1 6 ปีที่แล้ว +2

      I think he was talking about the case where there's no reduction factor across time.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      To be more precise, the discounted return converges almost surely as long as the rewards are uniformly bounded (almost surely) and gamma is strictly less than one.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      @@monktastic1 That statement requires some mathematical formalisation, since one could have two different states pointing at each other with probability one, and hence arriving to any of those states would give rise to an infinite alternating sequence. However, those states could be formalised as one state and then you could consider the class of those two states to be a fixed point. There is some truth in your statement, but it requires more formalisation, it is hand-wavy.

  • @youngforever5265
    @youngforever5265 7 ปีที่แล้ว

    for slide in 46:04, what is the state probability transition matrix?

  • @ueiwqoak
    @ueiwqoak 6 ปีที่แล้ว

    @1:38:00 when he's talking about the principle of optimality, the repeated optimal behavior will lead you to the optimal solution,......it seems each time we're only looking ahead one step, but each look ahead is recursive I guess. So are we looking forward just one time step or are we looking infinitely forward? The idea of getting stuck in a local optimum is on my mind, I think there's something I'm missing.
    But yeah my question is HOW does looking forward one time step capture the set of other possible future time steps that I might take avter moving from state 1 to state 2? I am perplexed with how we can confidently name the value of nodes that are 1 degree away when their value is dependent on their own surrounding nodes

  • @kiuhnmmnhuik2627
    @kiuhnmmnhuik2627 7 ปีที่แล้ว +2

    @1:37:00 Here's an easier example to understand the idea behind the optimality conditions.
    Let's say you want to find the shortest path from A to C and someone gives you a supposedly optimal solution which passes through B, i.e. the (supposedly) optimal path is A->B->C. If the path A->B is not the shortest path from A to B, then the total solution can't be optimal because we can find a better path A~>B and then form A~>B->C which is shorter than A->B->C.
    Now let's say someone gives you a supposedly optimal policy pi. This is more tricky than the shortest path example because of recursion. You notice that pi doesn't always choose the optimal action at every given time. In other words, you compute q_pi for the policy pi and you notice that
    q_pi(s,a) = R(a|s) + gamma sum_{s'} P(s'|s,a) sum_{a'} pi(a'|s') q_pi(s',a') <
    R(a|s) + gamma sum_{s'} P(s'|s,a) max_{a'} q_pi(s',a')
    for some pair (s,a).
    Let pi' be the improved policy which always chooses the best action according to q_pi. We get
    q_pi(s,a) = R(a|s) + gamma sum_{s'} P(s'|s,a) sum_{a'} pi(a'|s') q_pi(s',a') <
    R(a|s) + gamma sum_{s'} P(s'|s,a) max_{a'} q_pi(s',a') =
    R(a|s) + gamma sum_{s'} P(s'|s,a) sum_{a'} pi'(a'|s') q_pi(s',a')
    Note that we have pi' and q_pi (not q_pi'!) in the same expression. We would like to have q_pi' instead of q_pi.
    We can update q_pi with the new estimations and then repeat the maximization process. Note that at each maximization step we increase our estimation of q_pi until we converge to q_pi'. Since we're always increasing q_pi, we must have
    q_pi < q_pi'
    which means that pi' is strictly better than pi. I hope this makes sense. I've never read the official proof and this is just the sketch of one direction of the proof (i.e. optimality => optimal condition).
    In conclusion, whenever q_pi doesn't satisfy the bellman optimality equation (BOE), then we can increase q_pi until, estimation after estimation, we converge to a q_pi' which satisfy the BOE and such that pi' > pi.

  • @MrPneunomia
    @MrPneunomia 5 ปีที่แล้ว

    Best RL course series I've tackled

    • @akarshrastogi3682
      @akarshrastogi3682 5 ปีที่แล้ว

      If you've seen other courses / university lectures like Stanford's CS234 or UCB CS285, could you please recommend some playlist that's very useful like this one, probably with a little focus on python implementation?

  • @achyuthvishwamithra
    @achyuthvishwamithra 2 ปีที่แล้ว +1

    In reality, must we program an agent to store the optimal action calculated for each state, in the data structure of the state thus adhering to markov property or will the agent calculate optimal value at every step every time?

  • @ogsconnect1312
    @ogsconnect1312 5 ปีที่แล้ว +38

    Well done! At 6:05, I guess the lower matrix value should be Pn1

    • @luisjalabert8366
      @luisjalabert8366 4 ปีที่แล้ว +2

      Same error at 39:30

    • @astaconteazamaiputin
      @astaconteazamaiputin 3 ปีที่แล้ว

      Yes, it should. And he says this during the talk, so no doubt about it.

    • @adi331
      @adi331 2 ปีที่แล้ว +1

      @@astaconteazamaiputin It's corrected in the slides at: www.davidsilver.uk/wp-content/uploads/2020/03/MDP.pdf

    • @mohamedmusa7149
      @mohamedmusa7149 ปีที่แล้ว

      @@luisjalabert8366 Yes, that is an error.

  • @Archeopteryx
    @Archeopteryx 7 ปีที่แล้ว

    at 54:47 there is a Rt+1 for both the state-value and the action-value functions. It is said that Rt+1 is specific to the action taken at a the state. How can that be true, since Rt+1 is given as soon as we leave the state? Wouldn't it simply depend on what state we are leaving?

  • @SuperShank76
    @SuperShank76 6 ปีที่แล้ว +1

    fantastic lecture. Prof. David Silver is amazing. The questions are a bit silly. The lectures are amazing.

  • @a.m.howlader609
    @a.m.howlader609 6 ปีที่แล้ว +1

    How can I design the transition probability matrix for different states, is it random? Please help. Thanks

    • @BGasperov
      @BGasperov 5 ปีที่แล้ว +1

      Not sure I understood you well, but the transition dynamics is defined by the environment (it's part of the MVP/MDP tuple).

  • @kostyamamuli1999
    @kostyamamuli1999 2 ปีที่แล้ว

    great lecture!

  • @liujinkua9063
    @liujinkua9063 2 ปีที่แล้ว

    Thanks for your video! It is really excellent! However, I have a question at 1:02:52 in the video that why the left state value Vpie is equal to the right state value Vpie (the first equation)? Should the right state value Vpie be the successor state value? and the summation of the successor state value seems not equal to the current state value.

  • @olenapanasovska9900
    @olenapanasovska9900 3 ปีที่แล้ว +3

    The transition probability of this course exponentially lows down from 1 mln ( the first lesson) to 50 thousand in 10 lessons. Only 5% have come out from Class 3)))

  • @yoloswaggins2161
    @yoloswaggins2161 6 ปีที่แล้ว +8

    Got my crew of Markov reward values, G unit.

  • @jont7207
    @jont7207 4 ปีที่แล้ว +3

    37:18 How do we calculate the value of states that have circular transitions? i.e. the value of class 3 (v(s)=4.3) depends on the value of pub (v(s)=0.8). How do we arrive at 0.8 for the pub then if the value of the pub depends on the value of class 3?

    • @jont7207
      @jont7207 4 ปีที่แล้ว +2

      I guess this is done in the Dynamic Programming for the next lecture. It is solved recursively by dynamic programming, since there is no closed form for bellman equation.

  • @juleswombat5309
    @juleswombat5309 7 ปีที่แล้ว +2

    Yeah well David really now needs to write a book on this subject material. Enjoying the videos but really need a captured analysis. There are few books on RL, Sutton's book is nearly twenty years old (draft updated for next year) But this lecture series is easier to comprehend than Standards.Any book needs to have the algorithms described, to show how the theory can be applied.Well done.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      Most of the material is taken from Sutton & Barto, even most of the pictures, examples, etc, so that book you are talking about is already written.

  • @MrBeatronic
    @MrBeatronic 8 ปีที่แล้ว +43

    At 1:11:47, isn't optimal action-value function q*("going to pub") =1 + (0.2*6 + 0.4*8 + 0.4*10) = 9.4 instead of 8.4?

  • @sanjayksau
    @sanjayksau 4 ปีที่แล้ว

    Is it possible to go from state s to s' with a specific action but with possibility of different rewards?
    Basically, an example where p(s'|s,a) is not equal to p(s', r|s, a). Will this be a valid example:
    If s and s' represent floor 2 and 3 respectively, action: {go one floor up, go one floor down}, but the rewards for going from floor 2(s) to floor 3(s') might be different depending on whether stairs are taken or elevators?

  • @natureoflife5490
    @natureoflife5490 4 ปีที่แล้ว +1

    Great lecture, however, if there is an autogenerated subtitle then it is easy to realize.

  • @JD0ng
    @JD0ng 3 ปีที่แล้ว

    props to the person who asked the question at 31:27. Thank you!

  • @FrostW1nd
    @FrostW1nd 2 ปีที่แล้ว

    19:07 The guy taking a call walking across the lecture room missing out the great content, -10 immediate reward there.

  • @ichbins161
    @ichbins161 3 ปีที่แล้ว +2

    in 37:18 - Why is there no reward for going in the pub, so why is it 4.3 and not 5.3

  • @preethiabi2008
    @preethiabi2008 ปีที่แล้ว +1

    Thank you professor

  • @3DAYSGG
    @3DAYSGG 3 ปีที่แล้ว

    At 1:00:05 how are the probabilities of going from the pub to the 3 other states calculated?

  • @tlotlooepeng8721
    @tlotlooepeng8721 4 หลายเดือนก่อน

    very good!!

  • @sarvagyagupta1744
    @sarvagyagupta1744 6 ปีที่แล้ว

    On 54:40 slide, aren't the two equations recursive? Since vpi(St+1) depends on its future state?

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      They are. That's what you use in order to show that acting greedily actually improves the policy (lecture 3).

  • @nermienkhalifa5997
    @nermienkhalifa5997 5 ปีที่แล้ว +2

    Loved The Student Markov State Example :D!

  • @kiuhnmmnhuik2627
    @kiuhnmmnhuik2627 7 ปีที่แล้ว +5

    I just want to point out that the recursive formulas are very easy to understand and derive if one disentangle them. For instance, let's say *s* is the current state, *a* an action and *s'* the new state after the action, i.e. s->a->s'. Then
    v_pi(s) = sum_{a,s'} P(a,s'|s) [R(a|s) + gamma v_pi(s')]
    where P(a,s'|s) is the probability of taking action *a* and ending up in state *s'* given that we are in state *s*.
    Now we note that P(a,s'|s) = P(s'|s,a)P(a|s) = P(s'|s,a)pi(a|s). Also, sum_{a,s'} (...) is sum_a sum_{s'} (...), so, we get
    v_pi(s) = sum_{a,s'} P(a,s'|s) [R(a|s) + gamma v_pi(s')]
    = sum_a sum_{s'} P(s'|s,a)pi(a|s) [R(a|s) + gamma v_pi(s')]
    = sum_a pi(a|s) sum_{s'} P(s'|s,a) [R(a|s) + gamma v_pi(s')]
    = sum_a pi(a|s) [ sum_{s'} P(s'|s,a) R(a|s) + sum_{s'} P(s'|s,a) gamma v_pi(s') ]
    = sum_a pi(a|s) [ R(a|s) + gamma sum_{s'} P(s'|s,a) v_pi(s') ]
    which is the formula @57:38.
    Same thing with q_pi(s,a). We start from state *s* and do action *a*. What happens is that we end up in state *s'* and then do another action *a'*. In other words, the sequence is s->a->s'->a'. Since we know *s* and *a*, but *s'* and *a'* are random, we compute the mean of the total reward over *s'* and *a'*:
    q_pi(s,a) = sum_{s',a'} P(s',a'|s,a) [R(a|s) + gamma q_pi(s',a')]
    That's it!
    Now note that
    P(s',a'|s,a) = P(a'|s,a,s')P(s'|s,a) = P(a'|s')P(s'|s,a) = pi(a'|s')P(s'|s,a)
    where we used the fact that *a'*, given *s'*, is independent of *s* and *a*.
    Therefore, similarly to before, we get:
    q_pi(s,a) = sum_{s',a'} P(s',a'|s,a) [R(a|s) + gamma q_pi(s',a')]
    = [sum_{s',a'} P(s',a'|s,a) R(a|s) ] + [sum_{s',a'} P(s',a'|s,a) gamma q_pi(s',a')]
    = R(a|s) + gamma sum_{s',a'} P(s',a'|s,a) q_pi(s',a')
    = R(a|s) + gamma sum_{s'} sum_{a'} pi(a'|s')P(s'|s,a) q_pi(s',a')
    = R(a|s) + gamma sum_{s'} P(s'|s,a) sum_{a'} pi(a'|s') q_pi(s',a')
    which is the formula @59:00.
    This is little more than basic probability.

  • @jshrey8
    @jshrey8 4 ปีที่แล้ว

    at 38:10, when using 0.8 to calculate reward for C3 as 4.3. Now if we want to calculate the reward for going to pub i.e 0.8, won't we be using 4.3 as the value in the equation as it is one of the next possible states? I tried calculating but it is coming out to be 0.72 and not 0.8. can someone pls explain? thanks.

  • @BRUNNSPARK
    @BRUNNSPARK 2 หลายเดือนก่อน +6

    If you are reading this in 2024 and thinking what value can a 10 years old course may offer, you are completely wrong. I have looked at many courses and lectures to find out the best startup RL course and found this as the best. Force yourself to start with this.

    • @happydays334
      @happydays334 2 หลายเดือนก่อน

      Can we build the machine learning program/code with this course I am interested but I don't know if I would learn how to implement it in the 'coding' part of it?

  • @yuxinzhang9403
    @yuxinzhang9403 3 ปีที่แล้ว

    Is it possible to train a risk-adverse agent? i.e., the goal is to avoid running into states that gets it destroyed instead of maximizing its value.

  • @willlogs
    @willlogs 4 ปีที่แล้ว +2

    Why would 59 people dislike this free gold?!

  • @TXxJiggle
    @TXxJiggle 11 หลายเดือนก่อน

    A little difficult to keep up with but very rewarding.

  • @43SunSon
    @43SunSon 4 ปีที่แล้ว +6

    There is a typo @1:22:08 ?? q*=8.4 ? I think should be 9.4 = 1+1(0.4*10+0.4*8+0.2*6) base on the equation q*(s,a) @1:26:55 . Someone verify this with me?

    • @DeathStocker
      @DeathStocker 3 ปีที่แล้ว

      That's exactly what I found weird. I think it has to be 9.4.

    • @43SunSon
      @43SunSon 3 ปีที่แล้ว +1

      @@DeathStocker it is. I am right, i checked other comments, they said the same thing.

    • @DeathStocker
      @DeathStocker 3 ปีที่แล้ว

      @@43SunSon thanks for confirming!

    • @kaspar8292
      @kaspar8292 3 ปีที่แล้ว

      Yup, I just got stuck there too. Should be 9,4

  • @SuperMyckie
    @SuperMyckie 2 ปีที่แล้ว

    fantastic Series... but I need help here, do you get reward from exiting a State or reward from entering a new State.. does the reward used in calculations come from the state being Exited or the Next State

  • @phongphanp
    @phongphanp 7 ปีที่แล้ว +1

    Do you have the slide in ppt form ? Please .
    The real love, It've the mean !

  • @Moustafa865
    @Moustafa865 7 ปีที่แล้ว +9

    I think there is a problem with the State transition matrix. First entry in the last row has a wrong subscript index. It should be {n,1} instead of {1,1}.

    • @Alley00Cat
      @Alley00Cat 6 ปีที่แล้ว +2

      A student in the class mentions this

    • @Avivalious
      @Avivalious 6 ปีที่แล้ว

      I agree

    • @nittur1008
      @nittur1008 6 ปีที่แล้ว

      Being {n,1}, it would not make sense as it would be , calculating probability of going to state 1 knowing state n. right?

    • @Morpho32
      @Morpho32 6 ปีที่แล้ว

      It does make sense. If we are in state n, we can go to state 1. Unless state n is "absorbing", in this case we cannot go anywhere after reaching state n but it would still appear in the transition matrix with values 0.

    • @HellYeah223
      @HellYeah223 6 ปีที่แล้ว

      I think you might be confusing states and steps. Assume you can go from state n to state 1, but not from step n back (in time) to step 1.

  • @eladnachmias1197
    @eladnachmias1197 2 ปีที่แล้ว

    Around minute 51:00, the bellman equation for the action-value function shouldn’t have the policy subscript for the expectation, as the current action is already given, so it is an averaging goes only over the “environment dice”.

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      Your comment indicates lack of understanding. Of course it should have the subscript pi. G_t is the discounted return, so you need to take many more actions in the future states in order to calculate that expectation, even if your immediate action a is fixed.

  • @durgaprasadnagarkatte6470
    @durgaprasadnagarkatte6470 4 ปีที่แล้ว

    Can someone help in understanding how to calculate v(s) in Markov reward process for discount factor = 0, 0.9, 1

  • @yuxinzhang9403
    @yuxinzhang9403 3 ปีที่แล้ว

    Regarding the question at 1:34:30 on eliminating risk,
    Is it possible to train two agents and use their combined experience to train a third one? i.e., one that is risk-adverse and one that is profit-seeking yields a risk-adverse profit-seeking agent.

    • @arminneashrafi2846
      @arminneashrafi2846 ปีที่แล้ว

      One thing to consider it that these attributes are usually in trade-off, you get more of one at the expense of less of the other.

  • @rhngla
    @rhngla ปีที่แล้ว

    At 11:37, David mentions that non-stationary Markov Processes can be manipulated to use the formalism presented for stationary case, by augmenting Markov states with a potentially infinite number of states. However, the definition of Markov Process at 7:19 notes that S is a finite set of states. I'd appreciate any clarifying insights!

    • @edmonddantes4705
      @edmonddantes4705 ปีที่แล้ว

      That's an amazing question! The answer is that the new state space is indeed infinite. Assume S is a finite set of states. Let X_k be a Markov chain on S that NEEDS NOT BE TIME-HOMOGENEOUS. Define a new state space Omega = SxSx...xSxSx... (i.e. S to the power of the natural numbers, mathematically S^{\mathbb{N}}, which is INFINITE). In other words, the elements that belong to Omega are infinite tuples of the form (s_1,s_2,s_3,...,s_n,s_{n+1},...) (tuples with infinitely many ordered states). Assume n and m are two natural numbers such that n is greater than m (without loss of generality). Define a transition probability P* on Omega via the formula P*({s_1}x{s_2}x{s_3}x...x{s_n}xSxSx...xSx...|{s_1}x{s_2}x{s_3}x...x{s_m}xSxSx...xSx...) =P(X_{m+1}=s_{m+1},...,X_{n}=s_n|X_m=s_m), where P represents the probability function of the original Markov chain on S. Note that {s_1}x{s_2}x{s_3}x...x{s_n}xSxSx...xSx... is simply the set of all tuples starting by the states s_1,s_2,...,s_n! The new transition probability P* defines a new Markov chain which is time-homogeneous. Omega has the cardinality of the real numbers, but that is not a problem, since MDPs are often defined for infinite sets S. Actually, in most of the papers on RL, the case where S is continuous is considered, but David treats the discrete case in this lecture for the sake of simplicity. I am not being very technical, since I do not know your background in math and I also don't have much time, but this can be properly formalised. If S is not finite, this can equally be done. You just need to be a bit careful with the construction of the new sigma-algebra and that's it.
      PS: In case you are not familiar with general notation, x represents Cartesian product, {s} represents a set containing the state S, the symbol | represents conditioned. I am not being precise in certain things, but I hope this helps.

  • @yibingevelynwei278
    @yibingevelynwei278 4 ปีที่แล้ว +3

    1:13:18 Can someone please tell me again how to calculate 8.4 for action Pub? Why I calculate 9.4 = 1+0.2*6+0.4*8+0.4*10

    • @harrivayrynen
      @harrivayrynen 4 ปีที่แล้ว

      Easy answer, you get 8.4 when you forget to add also part where r=1

  • @andyyuan97
    @andyyuan97 8 ปีที่แล้ว +16

    Can someone enable the automatic CC?

    • @abhi220
      @abhi220 6 ปีที่แล้ว +12

      by someone you mean, the guy who uploaded the video?

    • @wahabfiles6260
      @wahabfiles6260 4 ปีที่แล้ว

      @@abhi220 lol