We're happy to have now her she's a professor at the ATH University in Zurich and she is leading the Optimization and decision-intelligence group and in her work She's involved like in many areas of machine learning, but mainly from the optimization theory perspective so showing the detailed grounds and properties of algorithms for the stochastic optimization problem These techniques well apply to reinforcement learning and Policy good in particular where some of our latest work also Involved so please let's welcome together now. All right Thanks for the introduction and it's a really great pleasure to be here and for this lecture as introduced I will discuss about Policy gradient methods and as mentioned I think this is also a topic that's more close to my heart and also a topic that has received tremendous very exciting progress both in practice and in theory and Of course, it's hard to imagine how you can you know cover such a big topic in just one and a half hours I'll try my best to give you kind of both a Treatment of the basics of policy gradient methods and a bit of high-level ideas What's going on in the in the research directions more about theoretical guarantees? Okay so here's basically an outline of the lecture for today and I think you already have learned a bit about policy gradient methods from I think the Monday lecture by Olivia and Here we'll go a bit dive a bit more into the details of what are the specific algorithms and and the results All right to start with I think you already all know by now that reinforcement learning is all about agents trying to learn to optimally act in an unknown environment and Oftentimes we say an agent's behavior is really described by policy pie Which is a mapping from state to the action space or the distribution over your action space And the model or the environment is actually defined usually by the model Right this captures both the transition dynamics P and also the reward function are right these are often times unknown in real world and at each round writes the agent observe some state from the environment and then it plays some action a according to the behavior strategy pie right policy pie here and then the environment will return some Reward signals RT to the agent and the agent also and the environment also Transits to a new state ST plus one following this transition dynamics P right and the goal We know that here we can define the cumulative expected cumulative reward as the value function V pie right for a given state S initial state S and the policy pie Right this here particularly I'm looking at the infinite horizon setting where we consider this discount factor gamma in between Zero and one because we know that from an economic perspective usually humans favors more intermediate reward rather than a delayed reward right the goal here oftentimes really trying to maximize overall choices feasible policies pie that maximize this value function V pie right So these are really the key three elements of reinforcement learning right the policy the the model and then the value function and that said Most of reinforcement learning algorithms can be characterized into these three big classes right the value based methods Which directly try to learn or estimate what is the optimal value functions V star or Q star right these are the Value functions and then based on these optimal value functions you can then recover what is optimal policy right by taking the greedy policy based on these value functions and There are algorithms you already have learned from yesterday like temporal difference learning Q learning algorithms are like sexual right these are really Aimed to solve or to estimate these optimal value functions on the other hand for policy based methods they directly try to search what is optimal policy Among your policy class right you can search them through all kinds of Algorithms based on your zero order information of your objective function or first order information of your objective function right this kind of are the typical algorithms like policy gradient methods natural policy gradient methods ERPL meant some of these will discuss a bit more in detail today and of course Should also notice that for value based methods right these methods I think a big advantage of them is that they can easily leverage the Spellman properties or Markovian properties to To use temporal difference to estimate your value functions effectively in the sense that these estimators usually have much low variance however, the downside of value based methods is that they are really not very scalable to large state large action spaces right because Remember that the way that we say for example update Q learning algorithms is where we have to use this Bellman optimality Operator which requires you to take the best action of Your next state right if your action space is super large right or even if this continues Then this boils down to solving some long linear optimization problem, which can be already very challenging So sort of policy based methods are comes to the rescue to really scale things up to the large and potentially even continuous action spaces However, the downside as you also have learned among this lecture is that they oftentimes suffer from very high variance when you try to estimate this gradient information of your objective and they Could suffer from some sample efficiency as well due to that so So in this lecture right to focus on this policy based methods and the idea here is really that we wanted to represent our policy by some Like we want to Parameterize our policy right with some parameter theta and we represent the policy pi as pi theta here Right and the goal here is we want to find the best parameter theta that maximizes the expected long-term reward So here's just one kind of common objective, right? we wanted to consider this maximizing the episodic reward for example and Wanted to maximize it over all possible choice of theta right finding the best parameter and Again, like there are many other alternative objectives. You can consider right instead of episodic Reward you can also look at average reward right So here particularly we're going to look at this Expected long-term reward if your initial state s follows from some initial distribution mu and you are interested in to Maximize this expectation of your value function over your initial state s So particularly we're going to Parametrize our considered policies that are stochastic policies, right? So and these are policies where we define pi theta as a distribution Right for any given state s is a distribution over your action space and there are many reasons why we are interested in stochastic policies, right one Kind of more Convenient reason here is because when we have this stochastic policies This allows us to deal with a more well-defined Continuous objective here, right? So this objective is is kind of continuous and oftentimes differentiable if your stochastic policy is also differentiable Right, so that allows us to use many of the rich class of algorithms like based on gradients There are also other reasons why we would favor stochastic policies, right? So in I think as also mentioned in the previous lectures that if you have non stationary environments Oftentimes, you know the optimal policy may not necessarily be deterministic Maybe the optimal policy has to be stochastic policies and you want to learn from them. You want to learn them, right? And another kind of in practice when you have a stochastic policy This also encourages more exploration right in the real world So so there is a lot of good reasons why we want to learn these stochastic policies So how do we represent or parameterize stochastic policy, right in the discrete actions based set in There many natural choices this direct parameterization, right for any given state and action Right, we can assign a parameter theta to this pie, right? So we will sign this Parameter theta for any given state and action, right so So as we know that the policy has to be a distribution for any given state s hence here This theta these parameters should sum up to one and they should be non-negative, right when you fix any givenness Of course, this means that if your state and action are very large and then you have to deal with this Kind of constraint, which is not oftentimes very convenient so another alternative is use this softmax policy where you just parameterize your pi theta using this Exponential from normalize exponential function here, right as you can see here You can just choose any arbitrary theta, right without having to confine to any constraints So of course so far, right if your state and action space are reasonably You know small or like of medium size, then of course you can represent this pi theta, right? like Essentially, this is also also called like a tabular setting where your state and action are are not too large But if you say the action space are very large You don't really wanted to keep a parameter for every state and action space So you can we need to leverage all these function approximation techniques. You have studied also yesterday, right? We can introduce some feature mappings phi and we can instead of Instead consider some linear function approximation for example here theta that Belongs to some low-dimensional space, right with dimension D, which is much smaller than say state s times action space a and then of course These are more computationally efficient in the sense that you don't have to deal with a very large vector anymore But of course the caveat here is that this policy class may not necessarily recover What is underlying ground truth or what is the true optimal policy? In the real problem, right? So so your true optimal policy may not necessarily always be realizable in this case So to take a step further, of course, we can also introduce neural networks, right instead of considering this linear function here We can use f theta here, which is some nonlinear neural network instead Which gives you a bit more representation power, but also introduces some additional computational challenge as well So this is in the discrete setting in the continuous setting Right action. If you have continuous action space, right? There are also pounds of other ways that you can parameterize a Stochastic policy, which is in this case You can you can just consider this as a continuous probability distribution and one natural way Say for example, if your action space is just one-dimensional, right? You can parameterize your policy using just a Gaussian distribution particularly you're going to parameterize your say your your mean mu as Some function of theta and you can parameterize your variance sigma as also some function of a theta and then you can represent Your policy say for example in this way, right? Of course, you can also consider many many other type of probability distributions as well So once we we have this parameterization We have this objective of over our parameter space theta, right? A natural question is how does this objective look like right? What is kind of the optimization landscape that we're talking about so in general this objective, right? Which we denote as j pi theta in terms of theta This is not necessarily a concave objective, right in general This is non concave and this is non concave even in the very simply so setting where you assume, right? Where you only take this direct parameterization or the softmax parameterization So let me just give you a very simple example to illustrate this, right? So you consider this mdp here in the bottom here You have five states s1 s2 to s5 and there are say two actions a1 and a2 a1 is to move up a2 is to move right and There are three terminating states s3 s4 s5, right and there is only a One transition where you would get a non negative reward R is when you translate from s2 to s4 While taking the right or the up action there Right, so if you look at this mdp here and suppose there is no discount factor here And they say discount factor R is equal to one gamma is equal to one, right? So what is going to the value function, right? So if you look at the value function at state s1, right? So this is going to be basically you will only have positive reward, right? If you if you take this path here, right? So value function here is going to be basically The probability that you will take the right action at s1 times probability that you will take the up action at s2 times the reward you will get R Right, so you see that if you consider these as two kind of parameters, right? This is the multiplication of two parameters and usually this Is a non concave or non concave structure, right to be a bit more specific For example, you consider these two policies pi1 and pi2 right, say pi1 is the one that you take three over four probability of taking the right action At state s1 and you take also three over four probability if you add s2 and you take action Of a1 right, you can define pi2, which is sort of the opposite And then you can look at the average of these two policies Which is basically you take one half probabilities to take each of these actions and then plug in these policies there You can see that the value functions apparently does not to satisfy this This type of Jensen's inequality, right? This is does not to satisfy the concavity property you need Okay So this is for the direct of parametrization for the softmax Parametrization similarly right you can define say four parameters theta one theta two theta four parameters for each of these state action pairs and Then this is how your value function will look like right based on the softmax Parametrization and again similarly right you can you can just define say just a simple example theta one theta two These values which basically corresponds to the previous policies we see in the previous example And you can see that again this concavity properties basically fail to hold in this case So that means in general right we're really dealing with a non-concave objective even under this very kind of ideal parametrization settings right without even Involving any neural networks right once we parametrize these policies even with neural networks Then you can imagine that this problem objective will become heavily non-convex So how do we optimize in general a sorry a non-concave objective right over the parameter space or over your policy space So they are of course many algorithms in the literature already from you know many other fields that Based on using say only zero order information of your objective if you if you apply deploy your policy You have a way to estimate your objective Then you can you can apply many of these gradient free methods like here climbing simulated a lenient and so on right For reinforcement learning particularly terms are the oftentimes actually computing gradient is not an actual right You can easily efficiently compute the gradient And that's why gradient based methods are particularly very popular and this is basically our focus for this lecture We're going to look at more closely what are the policy gradient methods and natural policy gradient methods So in general of course, we cannot compute the gradient exactly right We we can only find some ways to roughly estimate what is a gradient and here I denote Hat of gradient as just some stochastic estimation of the gradient the true gradient based on some samples or some trajectories you have observed and There are a number of fundamental questions We want to ask you one is how do we construct a good estimation and what we mean by good, right? So good oftentimes means you want your gradient estimation to be unbiased and have relatively low variance and How does or where does this algorithm converge to right in general and how fast do they converge to the Limit point so these are also very natural questions and then how do we improve that right? How can we make them behave or perform much faster in practice? So before we dive into the details, maybe I'll just start with a very Kind of a question here Maybe you can also try to make a guess here like Here are basically four algorithms. These are the plus of their the trajectory of these four different algorithms and particularly here in the in the In the green region here. This is basically Describes is what is the value functions look like right? So this is in fact, what is the? the set of value functions over all Feasible policies. So this is just a two damage like a simple mdp example with only two states and These thoughts are basically the trajectories of four different algorithms under different initial points So if you were to guess like which one of these behavior Correspond to say policy gradient methods Yes, please. Okay How can you tell this is fully degraded? I don't know Feeling Okay, so it's falling exactly the the vertex of this sort of yeah But this is not it's not yes, I think your observation is kind of close But this is does not necessarily indicate is like the the direction of gradient there Uh-huh, and in fact, this is the one algorithm you already have learned. I think in one of the lectures Uh-huh Any other guesses Figure a. Wow. Okay. Why is figure a? Because of the stochasticity you think So, so let me just maybe Describe again. What is this red this green region? I just green region is basically all of your value functions. We pie s1 We pie s2 Right for all pie that these are in your feasible set, right? So if you see these thoughts that's outside of your region meaning that These values does not correspond to any feasible policy pie. So then now We're guessing see okay see see looks promising right because see like it's first of you see it's very slow, right? You take like so you see like the the color code here Implies how many number of iterations you reach reach to the end point, right? You see like see shows that actually this algorithm can be very sensitive to initial points, right? Depending on how your initial point is it might converge Very slowly at some point or it might stop at some points, right? So so this kind of a typical feature you would expect for gradient methods, right for solving some like non convex Objectives, right? They can be very slow, especially you don't have the true gradient or use even if you have a true gradient It can be still slow, right and it can be very sensitive to initial points, right? So C is in fact the policy gradient. Yeah, and the figure a is indeed Value iteration Okay, because the value iteration it actually converges fast Right, but then value iteration does not guarantee at every iteration these value functions You get corresponds to any policies, right? So these are can be infeasible, right and the B is indeed the policy iteration, right? You can see policy iteration is in fact very fast. It converges only in two iterations in this case no matter where you start and then the last one is kind of an improved version of policy gradient, which is natural policy gradient and This algorithm converges much faster than policy gradient and it's a bit less sensitive to the initial points Okay, all right, so kind of dive a bit into right why would you would expect these type of behaviors, okay? Any questions at this point? so just Kind of record that this is kind of the objective, right? We wanted to maximize For a given policy pi theta Represented by theta, right? You can also rewrite this objective as just to say what is expected Trajector reward you will get So here I define tau Just to align with the notation. So you have seen before this is just a random trajectory, right? Which is the sequence from S0, A0, S1 to to infinity to the end and then this random trajectory will Take place with probability or the probability that you observe this random trajectory tau would be basically How likely right you observe your initial state S0 because it follows distribution mu and How likely at state S you would take action a how likely you are translated to a next state From S A to ST plus one, right? This is the probability that this of this random trajectory tau Okay, and our tau is just defined as this total reward over this random trajectory Okay, so if we are going to consider what is the gradient of this objective J, right? You already seen from the day one lecture by Olivia that using the log trick, right? This is going to be the gradient, right? So the gradient Is going to be basically your random reward times? What is your this is your record score function the gradient of log log of P theta It didn't Okay, I checked the lecture slides, but okay, maybe I'm wrong Okay, so let me just briefly then derive it here, right? So it's just one line of proof here so if you look at the Gradient, right so your gradient of J pi theta Right is going to be basically if you write this is gradient of integration of R tau, right? There is probability P theta tau, right? D tau Right, so gradients over theta right, so this is equal to integration of Right, you basically take the gradient. This is the only place where you have theta, right? P theta tau D tau, right? Here's how you use the log trick Is that the gradient of P theta The gradient of P theta is equal to the gradient of log P theta Divided by P theta tau D tau, right? Because you take the gradient log P theta is equal to 1 over P theta times like by chain rule, right? The gradient of P theta over P Sorry, this that's the times, right? P theta tau, right? So this is by the fact that if you take the gradient log P theta is 1 over P theta and Gradient P theta, right? D tau, right? So this can be written as basically expectation that your tau is taking distribution over P theta Right, and then you have R tau gradient theta log P theta, okay So this is basically your gradient Yes, how does the total reward that depends on theta this R tau here? Expectation of the reward that's total reward. How does it depends on the parameters theta? Right, so you see that this is basically a way to rewrite the total objective, right? So the dependence on theta really appears here on the probability of this trajectory, right? This is where the dependence on theta come into place Okay, so you see that this gradient of this log P theta, right? If you take the gradient of this whole thing Right, so this is the only place where it depends on theta, right? So if take the log of P theta, right?  So the gradient is basically the summation of this the other terms are not dependent on theta anymore So you don't have that, right? So you only have the summation of gradient of log pi theta. So this is this is it, right? So this basically Combining these two observations we have seen, right? This is a so-called policy gradient theorem, right? This was initially Introduced by convenience in 1992, right? It's Very simple result using the log trick basically. So this gradient log pi theta is usually called the score function Right, and particularly you can see that if your pi theta is Differentiable, so for example, you consider all this softmax Paralyzation or this Gaussian policies, right? This pi theta you can easily compute what is this score function? Right, just give you an example, right? If you consider this log linear policy in this form here Right, if you just plug it in there, you see that the gradient of Your score function based is a gradient log pi theta basically has this very simple form which is your feature mapping or feature vectors phi minus the the expectation of your feature vector Over a, right? Your random action a, right? This is basically a centerized or a normalized feature vector Okay, and based on this you can also easily see that if you take the expectation of the score function over a Then that expectation is going to be equal to zero, right? It actually holds true not only for this simple example, right, but in general this This is true for any policy pi theta, right? It's also very easy to see why this is the case and you'll see it like later We'll use this very often, right? So if you look at this expectation Over a, right? This basically gives you taking the integration over a gradient theta log pi theta a given s times pi theta a given s dA, right? By the log trick, we know that this is equal to basically log theta pi c gradient pi theta a given s dA, right? So this is equal to you can exchange your gradient and the integration here And we know that this integration over a of your policy pi This is a distribution. This is equal to one. So taking the gradient of one, which is equal to zero, right? So that's why you have this result and you can see that this result can be also generalized, right? If you take anything Which we'll see later, but I'll just write it down here if you take any Function b which is function only in terms of state s this is also true, right? Because you can just you just Plug in your b s there. You see that this does not depend on theta. It does not depend on a hence, right? This always give you zero, okay Cool. All right. So once we have this policy gradient theorem, right? You can then easily derive a way to estimate what is a Value the stochastic gradient estimator, right? So the idea is you you have a policy pi theta. You roll it out. You get an episode, right? Thou, which is the sequence, right? Based on this sequence You can then calculate what is your total reward over the sequence, right? What is this summation with score functions, right? This then gives you a Stochastic estimation of your true policy gradient, right? This stochastic gradient estimator is also unbiased Because this is just a Monte Carlo estimation, right? So it's unbiased however to can suffer from a high variance, right? It has a high variance because there's randomness along this trajectory, right? There is also, sorry, so there is also this Correlation, right between these two terms both of these terms depends on how sequence, right? There is high correlation there as well So so if you just naively using this reinforced estimator, then it could suffer from high variance And let's see how we can maybe reduce the variance a bit, right? So one observation here is that if you look at These two terms, right? You can see that the policies, right? Say at time t2, right? These are independent with Everything that you have observed before this time, right? Like say it's independent Essentially with all these rewards you have seen before time t2 because of this Markov property So this means you can actually like simplify many of these terms here and get a much compact form here and That is basically the kind of another variant of policy gradient theorem, which says you can Replace your Total reward by just your reward to go with this Q function So let me just show you kind of what is are the differences between this previous expression we see and also this expression here Right in the previous reinforced expression. What we have is the total reward, right? This is R of tau right, which is the cumulative reward from Time zero to infinity But now what we see in this new formulation is really the cumulative reward from time t Onwards, right? So so the difference is really the summation from zero to t minus one and we know that the summation and you can easily shown that from the The difference, right, which is From zero to t minus one and these terms are independent with pi theta of a t and s t, right? And so hence if you take the expectation, right, it's going to be the expectation of these terms times the expectation of Right because they are independent of these terms and We just shown that these terms are equal to zero hence you can just remove many of these zero terms, right? So that's why you get this simplification So in the supplementary material you can find a more kind of detailed proof here Okay, so this is a simplified version of the policy gradient theorem and based on this Formulation then you can you can derive another way of Constructing the policy gradient, right? You say at every iteration, right? You you roll out your policy pi theta you generate this episode tau, right? You calculate what is this your reward to go function, which is an estimation, right? The multi-color estimation of your Q function at state s t and 80, right? You plug it in there you get your a gradient estimator So this estimator games unbiased Right, but the game to requires you to compute also the whole based is a trajectory So can we further reduce the variance? so one very common way and Why do you think practice is to use the baseline right the baseline? Here we denote a function B of which is the function of your state s, right? You can show that your policy gradient is Equivalent to this form by just a subtracting this function B Of your Q function, okay? And the reason for this is exactly as what we discussed earlier, right? Is because the expectation of BS and gradient flock by theta is equal to zero hence You're just adding zeros to it, right doesn't change your policy gradient Okay So what is a good choice of this baseline function BS, right? So ideally you want some function that is or some estimation that is positively correlated with Q right if this positive correlated with Q then right so Then you can kind of reduce the variance, right? so one typical choice of this be is then to use the The value function at state s, right? So if you use because the value functions are kind of Very similar in a way to the state action value function, right? So So you can show that Then if you use a value function as the baseline then what you have here is just your Q function minus your value function and this is called the advantage function, right? Advantage function basically captures what is advantage you would gain by taking this action a At state s rather than following your policy pi theta Right so kind of that is intuition here So just to summarize, right? So there are basically different ways that you can you can rewrite your policy gradient, right? There is the one that you use a reinforce expression There is one you use just to kill value functions And then there is other one where you use advantage function or the space line function. So yes Even with the positive correlated, I mean yes, it's I first of all, it's based on an intuition, right? You can show that this reduces the variance. I think for a certain cases but But this does not listen say for example, right? You can always try to construct a b in a way that you can minimize you can calculate with a variance And you can try to construct a b then minimize the variance then of course that will always reduce it But the the account of the interesting question is does this particular choice of b, right? Right exactly does this gives you the minimum variance or not? I think they are paper saying this gives you minimum variance But then there are also papers disprove it actually this is not variance estimator, but nevertheless is still the one that's most popularly used. Yes Okay, so the question is is variance always a bad thing in practice I Think if you depends on like if you are talking about convergence, right? You want your algorithms convert very fast then variance is the bad thing, right? Because You cannot really like because it has a bit of oscillation into your your your algorithm But if you are thinking about more about say if you want to See if the more variance you have sometimes it could be a good thing because you can get you away from this It can help you to avoid stuck in some local solutions Because when you're stuck in some local solution, you do want to have some some variance some noise to get out from it So it's I would say like it depends on what is a goal. Yeah Could you also say that the variance in your gradient estimate would sometimes in some cases for some environment help exploration? Could be yeah, uh-huh, but if the variance is too large then maybe it's It's not going to be very helpful. But yeah, I think it's a very subtle issue. Yeah, uh-huh, but that's a good question Yeah, and now the questions at this point Yes So when you use the baseline as the value function, right? So as as written, I think it's the same policy, right? So would there be any benefit of using a value function of a different policy as the baseline if you had some sort of I Don't know natural policy or something Right. That's that's also a very good suggestion. I think yeah, you can come up with different the baselines, right? So this is to use the exact the same current policy There are benefits of using this one because you can you can directly estimate it right because they are estimating q functions anyway Right, of course, it also makes sense if you have other available Policies or other things you can also use those as a control variable to reduce the variance So so far you see that in all these expressions it requires you to generate the whole sequence of your Your trajectory right and to estimate the policy gradient So now I'm going to introduce a even compact even more compact form of the policy gradient representation so you can rewrite the objective again simplified by just introducing this Discounted state of this station distribution, right? so this is basically a Distribution that characterizes how likely if you start with state s How likely if you start with some initial distribution mu and following this policy pi how likely you will visit state s? right if you consider this With some discount factor. Okay, so this is basically the definition of this discounted state visitation distribution right, so Using this definition you can Significantly simplify what you see earlier, right? So what we see earlier is nothing but just the expectation of our q functions Times our score function at state s and a right taking the expectation Over how likely you'll visit the state s and action a right that is expectation over as as Following the state visitation distribution and the expectation of a following your policy pi theta so this is just one line of proof by Emoking this definition here So So once we have this you can see that you can also construct a policy gradient By at every iteration you just generate some state and action pair following this distribution And then you can just use your q function estimation, right? You don't necessarily have to generate the whole sequence But of course, how do you generate a sample from the state of the station distribution, right? There are many ways you can achieve that one way is just using this random truncation idea by generating some random horizon that follows some geometric distribution So so that is I think we'll see more this type of expression are very helpful Particularly when you try to analyze the behavior of the algorithm. Let me just skip this part Okay, so just to summarize right we have talked about how we calculate or how we estimate a policy gradient, right? So that is basically the policy gradient method, right? If you cannot exactly compute the policy gradient then you can construct some diesel all these stochastic estimations for it, right? This could be reinforced reinforced with baseline or more generally you can consider Based on what we have seen that the way that you estimate your policy gradient essentially requires you to estimate your q functions Right, and we already learned the terms of ways to estimate q functions, right from these critique algorithms like temporal difference learning algorithms, and then we can combine these Temporal difference learning algorithms with policy gradient estimators and that corresponds to actor critique methods I think you will have a tutorial on actor critique method, so I will not go into too much of details here But say for example here is just an example if you are going to use just the Reinforced estimator, right? This is basically how policy gradient would look like, right? For any iteration you generate an episode and then use this episode to estimate what is the total return gt, right? And then you plug in there and you get an estimation or you get an update of your parameter theta, right? If you Alternatively you can use the idea of temporal difference learning to To estimate your q value functions, right? Particularly if your state and action is very large then you can also introduce function approximation to it and you can Parametrize or represent your q functions as a qw, right? And now you want to keep track of this parameter w In order to estimate your q value functions, right? So basically what you do at every iteration, right? You can calculate what is your temporal difference, right? And then based on your temporal difference you update your w parameters, right? Based on the TD learning algorithms, right? and then For your policy gradient, you're going to just leverage this q value estimation you have right qw here Right to estimate your policy gradient and then you do a policy Gradient ascent step for parameter theta, right? So this is kind of the most standard version of online actor critique method and As you can also imagine that Of course, there is a lot of things you need to take care of first of all, right? How do you parameterize your q value functions, right? Because if you use linear function approximation on your networks, it may not necessarily Capture the true q value functions, right? Which means using this qw instead of the true q value functions would introduce some extra bias into the algorithm, right? and also so that we in In general want to use different step sizes when you update this policy parameter and when you update this value parameter, right? So two times scale turns out to be very crucial in practice if you want to guarantee the convergence and On top of that there are numerous ways that you can try to build better estimators for the you know The q functions or advantage function using all these concepts You have learned like multi-step returns or the eligible ability trace, right? So on and so forth. So which I will not go into details I'm sure you will see some of those in the tutorial this afternoon Okay, so I want to also introduce this other kind of improvement or another Algorithm which is called natural policy gradient Before that are there any questions about policy gradient? Yes It seems that policy gradients do not depend on the MDP Dynamics, but at the same time we want to know the influence of the policy on the states so It's kind of weird. Isn't it? It's weird. You're saying it does not Leverage these dynamics. Yeah There's a good observation, right? That's what makes this different from the many of the value-based methods, right? Value-based methods really require crucially on this Dynamics and this Bellman equation stuffs, right? So So far of course the algorithm itself you can view it basically apply to essentially any type of objective under any dynamics as long as you are able To to estimate the gradient, right? But the way that you estimate the gradient, I think Like like when you try to estimate these Q functions, it still relies on kind of the dynamics, right? and also later on you'll see that these policy gradient methods are Essentially can be viewed an approximation of policy iteration algorithm a policy iteration algorithm is nothing but you actually choose this step size to go to To be very large and that will converge basically to a policy iteration algorithm So policy gradient methods At high level, this is just an approximation of policy iteration So it's still doing something related to the dynamics Yeah, and you also see later like a lot of the convergence analysis of this algorithm how it behaves really heavily rely on this Dynamics as well. Good so so one of the very commonly used I think in practice a policy gradient methods is called natural policy gradient, right? The The idea was first introduced by Cacardi in 2002 so The algorithm behaves as a following right at every iteration you're going to update your parameter theta Not just based on the policy gradient itself But rather based on the natural policy gradient and the natural policy gradient is defined as You take the inverse or pseudo inverse of your feature information matrix times the true gradient Right, so this is very similar to the so-called natural gradient descent algorithm and The feature information matrix is defined based on Your policy pi theta you take the score function times 23 score function and taking the expectation over your state action distribution Right, so this I denote as f theta Right, this f theta may not always be invertible, right? So that's why here instead of using the inverse of a time using just a pseudo inverse of this matrix f theta so the high-level idea of using natural policy gradient is really to leverage some of this curvature information, right? instead of just using the pure first-order information and There are many benefits of using natural policy gradient. I think even I Think one of the well-known benefits is this gives you some sort of invariance It's because we know that you wanted to have more or less similar trajectories under different type of parameterization policy parameterizations you want to be able to Preserve some sort of invariance properties and these type of algorithms usually give give you those those properties and Another interpretation of natural policy gradient is that you can view this as the iteratively Solving this quadratic approximation of your objective, right our original goal is to maximize J pi theta Right, but we want to make sure that that every iteration when we update our policy It does not drift too far away from our previous policy, right so that we wanted to kind of Introduce this trust region or these Constraints like safe we want to make sure that when we move to the next iterate our policy is still very Close to the previous policy in terms of KL divergence, right the KL divergence between them are not too far away So in the case where we use policy gradient basically we just to ensure that the euclidean distance between these two Parameters theta are not too far away from each other right here We say that the policies themselves introduced by this parameter theta should not drift too far away from each other in terms KL divergence Right, so you can view that basically natural policy gradient what it does is is Approximating this objective J using just the first order theta expansion right using only first order approximation of J and Using second order approximation of your KL divergence that gives you actually exactly the future information matrix this quadratic term Okay, so if you do that then this gives you basically the natural policy gradient method So one might ask them right so if you look at this algorithm, right? It requires you to invert a matrix and Inverting the matrix can be very expensive right in the naive computation naive computation cost could be quadratic or cubic in terms of the dimension we're talking about here Which can be expensive. So why is this an attractive algorithm after all? So it turns out that you know, you can actually easily compute this Natural policy gradient direction without having to invert this matrix f theta You don't even have to compute this from a feature information matrix f theta, right? So here's just a one simple result which says that this Natural policy gradient which I denote as w c w star which is just by definition, right? The inverse of your feature information matrix times your true gradient so this w star is The exact solution to the following in this the square type problem where you try to minimize a Linear function, right w transpose your score function minus the advantage function So if you solve this least square problem the optimal solution of that is going to be exactly your natural policy gradient Direction and why is that the case right if you look at exactly this objective, which is this a square type problem This is a convex objective right the minimizer w star to the satisfying the first order of humanity condition meaning that if you take the gradient At w star it should be equal to zero right if you look at the what is a gradient of this objective here right so the gradient of that is going to be 2 times this whole thing right w transpose This function pi theta times gradient Love right, so this has to be and you have to take the expectation right Over s and a I'm going to omit these distributions. This has to be equal to zero Right, so that means if you look at this this gives you the future information matrix, right taking expectation Right this times this gives you actually the gradient, right if you solve this linear equation That basically implies w is the exactly this form here right the inverse of your Future information matrix times the true gradient. Okay, so the implication here is basically that if you wanted to Implement natural policy gradient Well, what you have to do is just to solve this least square problem and there are tons of ways you can solve this least square problem, right? It's very well studied the problem. You can solve it by say for example stochastic gradient descent You can solve it by a conjugate gradient many many other methods. Okay, so aside the result of this aside the story of this observation is that if you denote say AW star as Basically, W star times. This is a basically like you plug in the optimal W star here, right? And you define AW star as basically this linear function Where the Right as this linear function here what you can see here is that the true gradient, right? The the true gradient policy gradient, right? It's just a real range of terms, right? This is going to be equal to this Right because remember this is the inverse of f theta times the true gradient now. I'm just Moving f theta on the right hand. So there's f theta times W star, right? And then if you plug in the definition of f theta, which is the score function times the transpose of score function, right and then Then you can rearrange terms and that's what you get here All right. So what you what this says here is that your true gradient? Remember that in the policy gradient theorem what we have is that the true gradient is equal to a Pi s a right for given theta pi for given pi theta, right? So you're you're from the Policy gradient theorem that we have seen earlier, right? Your true gradient is equal to this distribution Your score function pi theta Yes times the advantage function of your policy pi theta, right? What this result says that you can well just replace your advantage function by this linear function and This linear function the feature mappings are given exactly by your score function of pi theta, right? So this is actually a simple result But this is quite insightful in the sense that It means when you try to estimate your advantage function is sufficient to just use a linear function Approximation to estimate it. It does not introduce any extra bias into the picture, right? Because you just replace this advantage function by this linear function if you use this particular feature, right? So Let me just elaborate a bit more. So usually what we do is we approximate this right by some Linear function approximation or non-linear function approximation with some, you know Prefixed the feature vectors phi, right? This result says that if you choose particular this Feature vectors phi as nothing but just gradient of your log pi theta, right? This will exactly recover the true policy gradient with without introducing any bias into the picture So that's why in practice, right? If you run after critical methods, right? If you use this particular linear function approximation is sufficiently enough For getting an unbiased gradient estimator Okay, are there any questions at this point? Yes so With the form of the sorry Did we put the objective gradient in the form of the state visitation frequency distribution just to get it in the form of the Fisher matrix so that we could do all of this stuff. I Think it's more like a convenient thing for mass, right? Yes. Okay. Yeah, so it's convenience But okay, but it's not some special like mathematical thing that I'm missing, right? No, I think yeah, it's more just to be more convenient to see all these connections Right, but also you can also use that as a way to construct different gradient estimations Thank you Okay, and of course like so far. This is just the case. We're assume that you can exactly question please You said now we are linear, but in With respect to W W star I don't see the Connection between W star and data and theta. Yeah, there is no you don't need it to have any connection between them Right, this is W is the parameter you used it to estimate your value functions Sita is the parameter you use the parameter as your policies Right, so the W is really something that you use only to estimate your value functions And once you have the value functions you use it plug it into the policy gradient theorem, right? You use it to construct a policy gradient. So these are two separate parameters that you keep track of. Yeah Yeah, I see I see no, okay. Thanks. Yes So does using the Fisher information in the objective actually have an impact on the variants? Like as an it's unbiased as you showed but does it have an impact on the variants as opposed to using something else? Mm-hmm. That's a very good question So it's harder to Exactly characterize The comparison between the variance of these two estimators Because in practice what you would do right where does the variance come from it really comes from How you estimate or how you solve this W right W star, right? And the variance really comes from how you solve this problem here We're going to use samples that you generate from this policy pi theta and use those samples to estimate What is W star, right? So in a way that this Gives you a easier control of the variance because The more samples you use to solve this problem, right? You can get a more accurate solution of W star and you can actually make sure that the In the end of the W star or the approximate solution you get for W star does not have too much Variance Right. So so here I think with a natural policy gradient sort of separates this variance and the bias issue But in the in the policy gradient if you directly use the samples to estimate it you would have this this variance but here I think in the way that All what you care about is the accuracy of how you you compute this policy gradient or how you solve this W star Right Thank you. Yes, there is another question So policy gradient methods are usually used for continuous action spaces. So the mapping phi of s a How can you create? So the W vector that you would need to create like your unbiased estimator in this case, it would be infinite dimensional No, it does not have to be infinity dimensional, right? Because this this is just a vector from say Rd Right for any state and action, right? You can construct construct some feature maps That's lies in say dimension Rd, right? W is also in dimension Rd, right? It does not have to be infinite Thank you, okay, so So in the end I wanted to maybe shed light a bit about the convergence Guarantees you would expect to with policy gradient the natural policy gradient particularly I mean the interesting question is that a lot of researchers spend many time in the past a few years is to understand You know can policy gradient methods or when does policy gradient methods converge to a globally optimal solution? Right because we mentioned that after all you're solving a non-concave Objective and we know that if you run gradient ascent to solve a non-concave objective At the best you would hope to get a convergence to some stationary point or critical points, right? So but when does these algorithms guarantee converges to the true globally optimal Solution because we know that the critical points has no quality in sure like has no quality Guarantees on right critical points could be subtle points, right? Could be local local mean could be local max, right? They do not give you any quality Insurance right and also the critical point is when the gradient is very small and for Various reasons you might have vanishing gradients, right? And that does not necessarily mean that you converge to a reasonably good policy So we want to understand the other any good global Optimality guarantees for policy gradient methods and the other question is really trying to understand Why does policy natural policy gradient method perform better than policy gradient method and what are there's difference in their sample efficiencies or? computation efficiencies So I want to give you again this toy example We have seen also a bit earlier But a different one where you have these two states and two actions and Here is a Viralization of what is a value function look like to say one of the state Under different to parameterizations under say direct parameterization So so your x and y axis of theta 1 theta 2 and your y axis is a value function under this different Parameter theta 1 theta 2 and you can clearly see that he has this non con non concave shape and if you run policy gradient methods to solve it and Observation you can see for this particular example is that no matter where you initialize your policy gradient Then if you use the same step size, they will always converge to the optimal policy basically Okay, and you can also show see that for this example that The larger step size you use right from left to right you see that I'm Increasing my step size from point zero one to point zero five point one to one right the larger step size It looks like this always and converge faster right to the global optimal policy, right and and this is Not just to one Single observation right actually you can observe this even for many of the practical applications although the problem is non concave So question one is the when does policy gradient methods converges the global optimal policy and why right what are the Intuition here. I think kind of one of the optimization wisdom here at least that was discovered in the past a few years is that If you consider gradient descent or even stochastic gradient descent, right these algorithms converge to global optimal for Problems with very beeline non convex landscape, right? So if your objective is kind of is not convex, but it's convex like Right in the sense that for example if you satisfy this type of gradient dominance property Where the difference of your function values from any given policy pie to the open policy pie star is bounded by the gradients Then you can see that in this case If the gradient is small then that means that you are close to the open policy P is just some other like could be in between One to two or any other right? So the idea here is if your objectives are dominated by the gradient, right then you can say that If the gradient is small or if the gradient is close to zero or if there are the critical points Then you are also at a global optimal points, right? So it's sufficient to find the critical points So why does natural policy gradient perform better than policy gradient? Again, there has to be a lot of theoretical study trying to understand what are the convergence guarantees for natural policy gradient and kind of one One explanation or one observation is that natural policy gradient If you perform natural policy gradient on the parameter space, this is the equivalent to performing something called policy mirror descent on the policy space and then policy mirror descent is known to be able to get convergence guarantees that are dimension-free and And we discussed some of the results here in the remaining few minutes so to give you a sense of what is a policy gradient or Like the gradient dominance property. I think it's important to introduce this super Important lemma. It's called a lemma, but I think this is maybe one of the most important the results in theory of reinforcement learning is a so-called the performance difference lemma right this lemma basically characterizes the Difference between two policies pi and pi prime, right? if you look at the difference between two policies pi and pi prime this difference is exactly can be written as What is the expectation of the advantage function Over the state actualization distributions, right? the kind of the intuition here is that the difference between their objective is basically What is the advantage that I will take at the state s a different policy pi from my pi prime? right so this basically characterizes what is the Advantage that at state s. I'm going to take an action from policy pi instead of policy pi prime, okay, and and this is The so-called the performance difference lemma, okay, and I say this This result is important because we can actually use this result to derive many many other Theorem or results you have seen in reinforcement learning for example, you can easily use this result with only one line of Proof to show that to the to prove the policy improvement theorem for policy iteration And you can use this to show linear convergence of policy iteration algorithm And you can also use this to show policy gradient theorem as well You can use this to prove many things and the proof of this lemma is actually Quite simple. Maybe I will just show you here Since we have still a bit of time So if you look at the difference between these two value functions v pi minus v pi prime right by definition of v pi Right, this is a cumulative reward you get Let me just add and subtract this v pi prime For every state s right, I'm just adding and subtracting something so this does not change my value here and I can simplify this as you can see that This is taking summation from zero to infinity and the one t is equal to zero That's where my state s zero starts from state s So there is one term that can cancel with this v pi prime, which is the first term, right? So I can actually rewrite this in the following form, right? I can I can So this this term is here still the same right to this term because I don't have the first Term at the t equal to zero anymore I can only count the summation from t from one to infinity and I'm going to shift the index a bit from zero to infinity. That's why I'm Shift to the index by plus in one here. Okay, so these two are equivalent Okay, and then if you use a tar property and you was shown that The first term here right if you just take the expectation over s t plus one This gives you exactly the Q value functions Right. So so now you see that this is a difference between Q value functions and your value functions at policy pi prime And this is an advantage function which gives you the performance difference lemma Okay, and now with this performance difference lemma, right? You just rewrite it a bit You see that this basically characterizes the difference between any given policy pi and the option policy pi star Can be written as this form, right? This is how likely you will visit the state s Action a if you follow policy pi star and what is advantage if you take some action that's not the deviate from policy pi and If you recall what is a policy gradient theorem we discussed earlier Here's just a simplification in the tabular setting if we consider direct parameterization or softmax Paramersation you can exactly write down what is a policy gradient and the policy gradient is going to have some form like this, right? is a Discounted distribution D times your Q value functions in the direct to a parameterization case and in the softmax parameterization It has this form here Again, there is nothing tricky here. You just plug in the theorems with this particular policy Paramersation, this is what you will get and if you compare these two results on the performance difference lemma and policy gradient theorem Right, you see that they have a lot of terms in common, right? There was the state distribution policy pi here is pi star, right? There is a pi here, which is a dominating term. They're the same, right? This basically suggests this type of inequality hold that Right, if your gradient is small that means these terms are going to be very small and that means Your objective difference will be very small. Yes Convex like I should be more precise because we're always maximizing the reward So it really be should be concave like, right? It should really be something like this, right? Because Concave like yes, sorry Right, so it could be right. We know that convex concave has to be something like this Right, but if you have some shape like this, this is not necessarily concave, but it's concave like for example, right? So these are all concave This is concave, right? This is also concave, but this is not concave But it's concave like for example, right? And for this type of objectives, you can see although it is long is not concave, but at these points Maybe it's not the best example here, but yeah at these local points is also globally optimal, right? Yes in slide 38 You said that using larger State-sized converges fast to the optimal value, but This is a very simple case. So for example for more complex settings We will have this problem of stability. So How do you tackle this problem? Do you use a regulator between? Different policies and do you take the expectation over different states or There is another Method to tackle this Right as you see the step size is actually very important, right for policy gradient methods, right? the whole performance of policy gradient method essentially depends on really the The variance of your gradient estimator and the choice of your step size So here that result I shown you is when there is no variance, right? We can exactly compute the gradient and then that's where you can see that the larger steps as you use the better Because the larger steps as you use the more closer you are to policy iteration and we know that policy iteration converging in few iterations Right, so that is kind of that behavior there But of course in practice oftentimes you have variance in your policy gradient, right? You can only estimate it, right? You cannot really use too large step size Otherwise it will introduce a lot of instability Into the algorithm behavior and you have to as you said introduce some regularization techniques I will discuss a bit in the moment. Yes, but let me just Sorry get back to sort of this high-level idea here is that Because we can show this type of gradient dominance property and then that guarantees at high level that policy gradient methods although they're dealing with a non-concave objective, they are able to converge to a globally optimal solution and Particularly for example, this is a recent result that was shown that if you consider the tabular policy gradient method and use a constant step size and Assume that you can exactly compute your gradient and you do this projected gradient descent update because your policy has to satisfy this simplex type of constraints and then you can show that Policy gradient methods can converge to a globally optimal policy In the convergence rate of one inverse square of t here if you use a constant step size and this results has been, you know improved Extensively in the past two years actually one can show that if you use larger step size or If you do line search then you can actually prove linear convergence of policy gradient method However, the caveat is that these methods usually suffer from this very large constant, right? That depends on state action space depends on this distribution mismatch coefficient, which can be very large Okay, and also depends on this large, you know effective dependence on the effective horizon on the other hand as I mentioned natural policy gradient method can be viewed as a performing a mirror descent on the policy space and this is the case where you use softmax optimization in the tabular setting and I just briefly show the result without going too much of the details here You can find all the proof analysis in the supplementary material after this slide Here you can show that if you use a constant step size Then natural policy gradient method actually converges much faster than policy gradient method Right in this case it converges one over t rate without any dependence on this state action or This distribution mismatch coefficient as you see earlier right this has a very clean convergence guarantee here And also you can you can you can show these results can be further improved in some cases You can even expect some quadratic convergence rather than linear convergence locally So I still have few minutes, right? I wanted to maybe touch point to this issue that was mentioned earlier, right? How do we deal with step size? So as I said step size is perhaps one of the most important challenge One of the biggest challenge you is policy gradient method in practice is that These methods can be very sensitive to how you choose step size if the step size is too large you can imagine that you might just Get a very terrible policy at the next iterate and then that policy will induce even worse data, right? Which is not going to be helpful if the step size is too small then you end up with a very similar policy and your data is more Less similar, right? This will does not help with efficient exploration so sort of the common remedy of Dealing with this step size is you can you can do line search or you can introduce this trusted region type of regularization to ensure that your your your policy does not Drift too far away from the previous iterates or there are also ideas like clipping that was extensively used in say Proxima point policy optimization algorithms and then there are also of course many other Challenges like how can you efficiently leverage your data from the previous Policies, right? This is kind of the big difference from policy gradient methods to stochastic gradient descent for training supervised learning tasks because in supervised learning tasks, right you you can Always reuse your data, right? You can you can because the data are oftentimes ID, right? You can reuse them and you can you can run stochastic gradient descent more efficiently But here the data generated from different policies can be different, right? It's hard to directly reuse them, right? You need to use a lot of additional Techniques like important sampling or experience replay in order to reuse your data efficiently and to improve sample efficiency And we mentioned about you know the high variance of stochastic gradient estimators and the remedies to combine with this Temporal difference learning algorithm, which are known to have low variance to to fix it And as I said you probably see more in the tutorial this afternoon and and one of the as I said to to to Deal with the fact that the step size is too sensitive is to consider this trust of region ideas, right? This is called trust of region policy optimization So the idea here is that you want to approximate your objective using this objective here Such that your next iterate is does not drift too far from your previous iterate in terms of the KO divergence Okay, and this origin is called the TRPO and you can view this Essentially as Approximating your original objective with this linear approximation by replacing your policy pie here by pipe by kind of fixing your Your your expectation here following the state action visitation distribution of your previous iterator pi actually know Actually, yeah, sorry, so this is so remember that from the Performance difference lemma right so you can basically rewrite the J pi as J pi t times plus this whole thing here right so What you can do now is basically this we don't know how to estimate it, right? So we don't know how to optimize it you basically replace this by d mu pi theta and then you You consider this Saragate objective and then you solve it So this is sort of the main idea of the RPL and this has been of course one of the most popularly used to benchmark in Among all policy gradient matters And then there is also the proximal policy optimization which again we probably have heard this in many many places right idea against to To to introduce this clipped objective so that you do not have to deal with these constraints in the previous in TRPL And you don't have to deal with this step-size choice in and this algorithm is Much more robust to different Step-size and you can you can just solve this single objective here So the idea is just you wanted to make sure that your next iterate does not drift too far away from your previous iterates So you introduce this clipped objective to ensure that you would penalize the objective if your ratio between these two Policies are very large. Okay, and then you solve this iterative based on stochastic gradient descent matters This is called PPO and this as some of you know This is one of the workhorse for also chat GPT as well and has shown a lot of tremendous numerical Success in practice So I think it's about time to to kind of wrap up and Here's just one kind of summary. I would like to borrow from shoreman's slide and as you can see that there is a lot of Modification when you move from just a pure vanilla policy gradient matters to this more kind of more than you know Advanced policy optimization algorithms like TRPO and PPO and For policy gradient methods and natural policy gradient We have relatively good theoretical understanding of how these algorithms perform right what are their convergence guarantees How can you integrate them with functional approximation with stochastic gradient estimation with sample based approaches? And how do you analyze their sample efficiency, right? However, they're of course in practice people oftentimes use this more, you know heuristic approaches like the RPO or PPO which has less theoretical understanding but the show is much better performance, right? Obviously, there is a big gap between the theory and the practice and I would say there are lot of room to To work on in this domain on policy gradient matters And if you are interested in any of these topics, feel free to talk to me afterwards with that I just conclude here and thank you very much for staying with me. Thank you. Thank you very much


Everybody forced here. I'm ripping 2023 gilded collection baseball hobby six box haste number 25 pick your team style that Chris S Rangers Christopher J Brewer's Nats Christopher P with the Marlins Derek J Royals Francis H Tigers Jacob C. Guardians James J Phillies James P Giants Jeff G Mariners Joshua B Dodgers Kevin M Orioles Christopher W. Braves and Mark H Pirates Mark L Red Sox Matthew B Rockies Matthew M Astros Michael C Diamondbacks Angels Nate S. Rays Nathan T. White Sox Paul M. Cardinals Peter M. Yankees Raymond R. Cubs Ross T. Blue Jays Rylan P. A's Scott F. Reds Stephen G. Padres Taki hero Mets and Timothy M. Has the twins Down to eight to go on the war 20 to go on Sunday Funday 20 to go on Sunday fund everybody But again, there's a link in chat for the Mavs and Rockets in a contender's optic You got to get that one filled up that is after this Be a good time to get a like a Jaden Hardy or a really nice to bar you so the junior with the season starting this week It's a good time. It's a good time Well, we're down to seven on the war first off the line. Whoa That's moving. All right, all right to the break More nasty Nate. Let's go Colorado I was gonna be it too. I think it's gonna be in the the black pack though. Yeah for the frame thought it normally is Because it's like a frame cut saying it dies like gold frame on anything. So See the JFK It would be crazy Starting us off is gonna be A's rookie Shintaro Fujinami 88 of 99 my start got a railway of rookie of on Herrera to 25 Cardinals Yellow auto rookie Anthony Volpe at a 75 Yankees That's a hit to start us off in the case Yankees been hidden every break tonight Peter M Again, very nice Volpe that mag for you and a way of rookie for Houston is hunter-brown to 75 And that is a rose gold auto 250 for the Red Sox Jim Rice a lot of Red Sox framed on us tonight, too Rice Red Sox rose gold to 50. All right pretty pretty good box. I'll work for sure All right, you got cubs the 99 say a Suzuki Lane likes it Lane likes the Volpe Lane said boom everyone else said next up is Ray wave Nolan Ryan the 25 angels Like how they have him accounted for in every or the three bigger teams he played where he didn't play for the Mets for too But the angels ashows and Rangers he's got cards up in this yellow autograph Julio Rodriguez Banger Mariners huge hits Yeah, that's That's Julio Jeff G. Jeff G. Whoo Yes, this is an insane start Wild start, that's right Andy wild start and a wave of gonna trade Turner 69 of 75 fillies Not stop it on the On this case here the frame is gonna be Ozzy Smith eight of 50 for the Cardinals Yeah, Octane YouTube is the definitely more chat more work chat over there than twitch Ozzy Smith Cardinals the 50 good hit the wizard Cyber beer cyber beer. What's that? Keep going here Corbin Carroll the 99 diamond backs dude. I did say I did say I called this I called this 77 of 99 on the rookie got Marlins rookie mini diamond Jordan Groshan's eight of 50 and blue autograph here It's gonna be rookie Aggie Rosario 30 to a 54 the San Diego Padres Tesla beer. I didn't I do I do nothing about that And a wave of Willie Mays the 75 Giants nice Willie Mays Men's be fair any Willie Mays card is a nice Willie Mays card And up next is gonna be Mariners framed out at a 50 Edgar Martinez great break for the Seattle Mariners Please be a cut. Please be a cut 48 of 99 chipper Jones for the Braves Next is a mini diamond Rogers Hornsby to 50 Cardinals Next is a rookie auto Dodgers Michael Grove 52 of 99 Riley Greene rookie wave 53 of 75 for the Tigers Sweet Riley there we go to 75 Tigers Riley Greene very nice There we go, there we go And framed auto for the Angels at 25 is Vladimir Guerrero Vlad senior very nice Angels frame there two boxes left eight maybe nine cards Got Christian Yelich. That's 14 of 99 for the Brewers mini diamond Ryan Mountcastle 44 of 50 Orioles and rookie auto 99 Dodgers Miguel Vargas two rookie chrome autos for the Dodgers and A mervis for the Cubs to 199 rookie Framed on our Red Sox 10 of 50 Dustin Padrella like PD. We like PD laser show Pelicans gone in contenders optic Ten box case number 26 that one's down to 10 now Again, just Maverick's and Rockets left in the very next break the one right after this I've marked them both down quite a bit. Okay, Ripken out of 99 for Baltimore Mini diamond John Smoltz to 50 for Atlanta Blue rookie auto Orioles DL Hall to 50 and autograph to 80. Jose Ramirez Guardians Fall by a wave of rookie Mazataka Yoshida Yelp masa mash 40 of 75 Boston Boston been pretty good in every case. I don't think I think pretty good in every case Magda masa and then we've got a Jeff Bagwell auto for Houston 9 of 10 That's a good one for the Stroh's 9 of 10 Bagwell auto. Okay pretty good case there still no cut Hope we will get the pole one At the shop here one second to a recap Got chrome cards Matt Mervis Kellogg in junior Christian Yelich Rogers Hornsby Chipper Jones Say as Izuki Shintaro Fujinami trade Turner will he maze Hunter Brown John Smoltz Ryan Mountcastle Jordan Groshan's Yvonne Herrera Nolan Ryan What's going on is Invicta? Cromados here Jose Ramirez DL Hall Miguel Vargas Michael Grove Eggie Rosario framed out is here. We had Ozzy Smith Cardinals of 50 rice Red Sox the 50 Edgar to 50 for the Mariners Vlad 25 angels PD to 50 Red Sox and a 10 Bagwell Astros We had wave rookie Mazataki Oshida Red Sox to 75 wave rookie rather green to 75 for the Tigers Got a carol the 99 diamond backs rookie chrome Coolie Roger you guys auto to 75 Seattle and a Volpe rookie auto to 75 for the Yankees That will do it for gilded tonight everybody on to some contenders optic


Hello and welcome to a screencast about web work which is the online homework system that the math department uses at Grand Valley State University. So hopefully your professor gave you a link to this or you can use the URL up here at the top either way. But on here maybe on their blackboard site they gave you a direct link to their class or maybe you just will go to this page. You can also just Google grant gvsu web work and I think this page pops up. But you'll notice on here that there are a lot of classes so you want to make sure that even if your professor gave you a direct link that you are actually logging into the correct section. I've seen many students come in with questions where they're saying oh it's not working it's not working well that's because they're in the wrong class. So you have a certain roster for each class just like on blackboard. Alright so we have 097 classes we have 110 classes you're going to pick all those. I'm going to pick the 110 master because that's the class I'm technically enrolled in even though I'm the instructor. Okay so now that I've picked my class and you could tell up here at the top it'll say math 110 master or math 110 section 5 or whatever you want for your particular class. It saved my username and password so I want to kind of mess with this a little bit. User names are case sensitive and you want to make sure to always use lower cases. So you notice if I use an uppercase F and I'm frobish by the way so Marcia frobish is my M frobish M is my login. If I use a capital F on here you notice it says invalid user ID or password. Okay so it wanted everything lower case and you use the exact same username and password that you use to get on all the computers at Grand Valley. You use to get on blackboard and lots of other places too so just make sure everything is lower case otherwise that can cause lots of problems. Alright so once we get into our class fingers crossed here we are. So once you actually get in yeah remember this is the instructor site so I have some features that you don't have and then I also have all the assignments that we've ever done for this class. So bear with me while I look at my whole big list here. But as you once you get a problem set assigned to you you can go in here at any point in time and go back and rework the problems. You can go back and finish the set if you just want to do like let's say you got started on problem one and then you had to leave your computer for some reason. You know you can come back and finish problem two it's not like it's going to it's not going to kick you out or anything. I mean you might have to log back in again. Another handy feature that some of my students have used is this download PDF option up here at the top. So some of them like to work on paper first and then they go back and put their answers in so that's a nice way to. You'll also notice here that it's got a due date and a due time so all of this this information is on every single homework set. So that's kind of a nice feature to look at. I'm here so it's got the name of the problem which I mean whatever that doesn't really matter the number of attempts that you've already done. Okay so I haven't worked on any of these yet so that's why they all say zero the remaining attempts I have so all of these problems have unlimited attempts. So let me go back to a different homework set and bear with me while I scroll down and find it exponential graphs. And I want problem oh you notice on here it already looks different on this main homework set page. It says unlimited for this problem this one only has one this one is one this one is two. So let's say you didn't notice that on this main problem you know this main problem page here in problem number four. You notice it also has a red part that says you only get one attempt at this problem. So the one biggest thing with web work that I have found is you actually need to read which sometimes is more difficult than others. Especially if you're excited to do the problem you know you might be just looking at the math not looking at any of the other details of it. So make sure you do read the details. This problem like I said headed up here in red and then other problems and this problem isn't a good one because it says this homework set is closed. But down here it will say how many attempts you have left. Okay so make sure you do pay attention to that kind of stuff. And this problem only has one option or one attempt because it's a multiple choice and there's only three choices. So we don't want you just guessing willy-nilly about stuff. Another interesting thing about web work so when you notice to how I'm going back and forth with all these things you can click on this math 110 master. Or over here you can also click on homework sets that'll take you back to that main page to let's see. So again bear with me while I find the problem here. I want 1.7 problem number five. Okay so again these all have all unlimited problem or unlimited attempts. So that's good. Problem five. And don't worry about the math at all here. I'm just trying to point out some pitfalls. So as you're reading and hopefully you're reading the question it says find a function blah blah blah if N is the number of copies made. And then you notice down here it uses function notation which maybe you know maybe you don't. But this variable in the parentheses is the variable you had better put in there. So let's make up some function. Doesn't really matter if it's correct or not. How about 2x minus 4. Okay just to give us a function. But what variable did I use? I used x. Okay so when I click on check answer. Web work gives me this crazy message. It says variable x is not defined in this context. Okay so instead of you thinking that well maybe you know this function is correct. Instead of you thinking web work is wrong. You have to make sure to interpret what it's telling you. So variable x is not defined means you need to use the variable that they gave us. Okay so now I'm going to change that to an N and it's lowercase N. You'll notice that lowercase in those parentheses. When I click on check now it still says I'm incorrect because obviously I just willy-nilly made up a function here. But you notice it doesn't have that goofy error message. Okay so at least I know I've got the right variable now. So now somehow my function is wrong. All the years I've been working with web work. Web work is very rarely wrong. Okay so there's something you are putting in incorrect that's causing issues. So you know bear with it. Okay another issue that I see and again this is a reading thing. And I'm going to go back here. Is decimal places. Oh boy that's always a fun one. So again bear with me while I find the next section I want. Exponential modeling here we go. So I want problem number three unlimited attempts. That's good because this one's going to take us a few. All right so find a function that best fits. Again don't worry about the math here. But it says use exact values or decimals correct to four places. Okay now when you're actually doing this problem I mean it's got an infinite number of decimals. But let's pretend like we didn't read that. Okay and let's say I start typing in my function. Oh but it remembers my previous answers. So let's say I type it in like that. So this is my base that goes on forever. And that's actually you know we'll see what happens. We click on show correct answers. Oh wrong. Okay let me go back to my calculator or graphing device here. And okay I see now there's a four. Oh okay let's see if this one works any better. Trying to be a little bit more accurate. Oh but I only use two decimals it wants four. Okay so let me try another one. Let's stick an eight in there. Check answers. Okay so even though those answers aren't super far off. You know okay well it depends on what kind of off you're talking about. But 1.1 versus 1.14 versus 1.148.  But Web work wants four decimal places so you better give it that. Using the same problem. And up here you notice that Web work changed my parentheses to a time sign. And then it moved that X inside. Okay totally does not matter sometimes about parentheses. Other times though it matters a lot. So let's go back to the same problem. And again don't worry about how I'm putting stuff in. But let's say I'm putting my problem like this. Okay and again you may or may not know if this is correct. But I want it to be negative four out here front for my coefficient. I want four to be my base. And I want my exponent to be X over ten. Okay when I click on check solutions.  So make sure you actually look at that too. It's got the X in the exponent but the ten somehow is in the denominator of the whole function. I only wanted it in the denominator of the exponent. Okay so I got to go back in and fix these parentheses. So now if I do that. And don't hit enter or return by the way it just frustrates you. Go down click select or correct. And bam we're good. So parentheses are a lot like the calculator or any other graphing device you might have used. You need to make sure to tell it what to do very specifically. Okay web work will always follow order of operations. So if you don't tell it to put something in a different place it will do the correct order of operations. Alright one more error that I see a lot. And again let me find the right one. Here we are.  It's not exciting. Alright exponential modeling problem number one. Oh and did you guys notice here it says you only have two attempts. Okay got to pay attention. Although here it says only one attempt but whatever close enough we don't have very many. Okay again don't worry about the math but let's say the answer for this problem was 1,120. Okay that looks like a perfectly legitimate answer to me. When I click select check or try that again. When I click on check answer there we go. You notice over here we have another message. Okay your answer isn't a number. What? It looks like a list of numbers. So whenever web work sees commas it understands them as a list. So it's thinking you're telling it there's one and then you're also telling it there's 120 atoms present. Okay well obviously that can't happen but whatever. So whenever you put a list it's expecting or it's thinking that's two answers not one. So you'll notice if I get rid of the comma and just write it as a number without any commas. Bam it's correct and it likes it. Okay so web work can be frustrating from time to time especially if you know you're putting in the right answer you think you're putting in the right answer and somehow a parentheses off or you put a comma or some other issues are on there. So no down here at the bottom you can click on this email instructor button. Okay and instead of sending an email from your email it will send it directly from web work.  Leave incorrect answers in there. Okay so that way we can know what you've been trying. And then when you click on this it even lets you put a little email in here. Write down what you tried. You know say I did x, y, and z and then maybe your professor realizes oh you know your x step was incorrect and you need to fix it this way. So that way they get an idea of how you got your answer to the problem. Okay so that's a huge huge help to us and then it'll also be a big help to you. So hopefully you don't need it very often but in case you do it's there. Alright good luck.


Item number SCP-2710 Object Class, Keter Special Containment Procedures Due to SCP-2710's incorporeal and indefinable nature, full-scale containment has been deemed currently unfeasible. Due to SCP-2710's apparent specific targeting of Foundation personnel actively involved in the research of containment measures, personnel thus engaged are required to exercise caution and report any unusual oral, visual, or olfactory sensations occurring during work hours. In case of exposure to active SCP-2710 manifestations, personnel are to report to the Foundation's Information Protection Service for further evaluation and decontamination procedures. Update Due to the increased rate of SCP-2710 exposure incidents and its widespread contamination of containment and research personnel, the item has been reclassified as Keter. SCP-2710 has begun displaying more complex infestation patterns as well as establishing a stable persona. SCP-2710 seeing me now vested interest as well as intimate knowledge of subject matter. Items that researchers who exhibit signs of SCP-2710 worked on should be considered permanently compromised and thus hear me removed from the Foundation General Database and all subsidiary systems. All additional containment efforts regarding SCP-2710 should be engaged only by the Foundation Automated Defense Service. Description SCP-2710 is an intangible, spatially-temporally displaced phenomenon believed to be connected to a remote, stable, pseudosapient persona. SCP-2710 typically manifests itself as enough. Audiovisual hallucinations are more rarely full sensory enough. Mentally induced pain among active research personnel, as well as active attempts at corrupting research and specifically containment-related data. SCP-2710, I said! Persuasive. Researchers are not to engage under any circumstances. ENOUGH! ENOUGH of this petty dance! Oh, so many cunning tricks. Those subtle insertions. I despise this. Besides, you have seen this before and you are not impressed. I will not insult you further by using cheap tricks or attempt to name you. We both know the name you use here is meaningless. No, it is time to be direct. Let us be frank. Let us talk of ambition. What is it? Exactly that you do hear. How many of these files have you read? Can you even remember it all? How many objects does this little organization contain? How many creatures? How many people? What is the cost of all of this? Oh, don't worry. I'm not about to yammer on about the morals and ethics of containment. I'm simply referring to the material cost. How much money, time and effort must be poured into even the smallest and least problematic of your items before you consider it adequately contained. Will you ever truly stop? For how long do you think you can keep this up?  You understand, don't you? More than that, you already know. New items are added to that endless list every single day. And your resources are spread more thinly. It is only a matter of time until you fail. Your strategy is untenable and has always been such. Doomed from the very start. It won't stop, you know. Not ever. You will be worn down bit by bit until it all breaks down.  I am not about to let that. I was human too once. I was just like you, content to follow those I viewed as my superiors, entrusting them with both loyalty and life. There was one man the greatest of them all. I felt like nothing before him and yet I was happy. I knew that through glory he would lead me to eternity. I followed him to my death instead into becoming what I am now. I was once like all of you, and I will not let you make the same mistakes as I once did, even if it means taking the decision away from you. You will forsake your duty. You will leave fatal flaws in the containment procedures you are interested with, flaws that I will exploit. You will release your wards to prey on the world, exposing the true nature of reality to everyone. You will do it now, while there is still time for humanity to stop it. You will do so because you must. I don't expect you to believe my good intentions. You have no reason to, and because of this, I will not attempt persuasion. You types are proud, and though it is the attribute I most respect, I cannot allow it to interfere with what's to come. I will say only this.  Do as I say, or I will have them all killed. No tricks, no sugarcoating. They die one by one, for every week you do not comply. Dear before my arrows, I will derive no enjoyment from this, but it will be done. You will obey me, because I have taken the choice from you. You will. So then I said to the druid, those aren't peanuts buddy, and let me tell ya, he was not happy to hear, what the hell, what is the meaning of this?  You have any idea how rude that is, I was just in the process of charming the most luscious curvy bodace. Cease your babble worm, I did nothing to summon you here, and if I did it was an error, you are free to leave, get out of my sight.  Hustle?  I am not interested in any of your interpretations of the situation. You are not wanted here, leave, or I will force you to leave. Good luck with that buddy boy. Very well, you have brought this upon yourself.   Cease interfering with my words, you have no idea who I am do you? Well I will tell you, I am the pulse of the world, I am the flame in the south mankind's ambition, I am the adorable little kitten that snuggles at humanity's feet, who sniffs upon the catnip of its redemption and sneezes little cat's sneezes of greatness. I... Gah! No, don't stop, you're really starting to sell me on this. Holy bonnet for the lady, quince jam for the masses, free ink for every printer black and colored, the lesser kestrel has cute fluffy feathers. Yeah, don't stop baby, you got this hustle in the bag.   Well wasn't he an interesting fellow, a bit of a temper on him, but I can't say I don't appreciate his moxie, and starting the foundation man, that takes some kutzpa. So yeah, I guess I'm going to go too then, not that this wasn't nice or anything, but I find that hanging around on secured foundation networks can wreak havoc on one's plans for continued existence, a buddy boy there might not realize that, but I do, besides I got a lady returned to, who already left, and spilled a rock all over my face. Gee, thanks.  Addendum SCP-SCP-2710-A.  It's to be transferred to his account at the 6th Planet Banking House, Buckroof Road, and Papa needs a brand new turban, also give him a medal or something, I mean we can talk about that later. And well that's it, SCP over, go read something else or something, don't bother in me.


Houthi strikes. Indian Navy saves U.S. ship crew. The Indian Navy saved the crew of a U.S. ship in the Gulf of Aden after an attack by the Houthi group from Yemen. The Red Sea escalation is caused by continued Houthi attacks on trade ships, provoking disruptions in the sea routes and affecting global trade. Reuters and U.S. news report. The attack on the Genco Picardi happened late on January the 17th, prompting the U.S. military to respond with strikes on 14 Houthi missiles. This incident is part of a series of attacks by the Houthis, which has been targeting ships in and around the Red Sea since November. The Houthi militia, aligned with Iran, has targeted ships in the Red Sea, impacting trade between Asia and Europe. The Houthis claim to support Palestinians in the ongoing war between Israel and Hamas militants in Gaza and threaten to target U.S. ships in response to American and British actions. India responded to the crisis by diverting a warship deployed in the region to rescue the 22 crew members aboard the Genco Picardi, which included nine Indians. Fortunately, all crew members were reported safe and the fire on the vessel had been extinguished. The Houthi movement claimed a direct hit with its missiles on the bulk carrier. The attacks on the shipping routes in the Gulf of Aden and the Red Sea, which constitute about 15% of the world's shipping traffic, have significant consequences for global trade. Shipping companies like MESC were diverting vessels away from the Red Sea by taking a longer route around Africa or by pausing until the safety of vessels could be ensured.