 Hello everyone, this is Alice Gao. In this video, I will continue working on constructing a decision network for the male pickup robot. In the previous video, we got to this stage where we have the four nodes in the decision network, and then we made the connection from the decision variables to the random variable accident, and we also came up with the conditional probability distribution associated with accident. In this video, let's focus on figuring out the utility function. So to figure out the utility function, we have to answer two questions. The first one is, which variables will influence the utility of the robot, or the happiness of the robot? And the second question is, how do these variables influence the utility of the robot? Here's the first question. Which variables directly influence the robot's happiness, or the robot's utility? I put the story here again, and your choices are only paths, only short, only accident, or two of the three variables, or all of the three variables. Think about this for a bit, and then keep watching for the answer. The correct answer to this question is E. All three variables will influence the robot's happiness. Why is this? Well, choosing whether the short route or the long route is going to affect how fast the robot can pick up the male, and the robot wants to pick up the male as fast as possible. So the route is definitely going to influence the robot's happiness. Whether to put on paths or not is going to affect the severity of the damage if an accident happens. So if an accident happens, having paths or not will affect the robot's happiness dramatically. So that's... So having paths or not definitely influences the robot's happiness. And then finally, whether there's an accident or not will influence the robot's happiness because an accident causes damage. So this is why all three variables will affect the robot's utility. Let's go to the next slide, which is blank. I have copied the previous network, the partial decision network onto this slide. So to show that all three nodes will influence the robot's happiness, we will connect each node to the utility node. So these three edges indicate that all three nodes will influence the robot's utility in some way. The next question we need to answer is how do these three variables affect the robot's happiness? This is a complicated question to answer. What we're going to do is that I have one clicker question, which will help you to partially figure this out. And then we'll simply look at one example of a utility function. So I'll give you all the numbers and then we'll look at the numbers and make sense of them. So we'll look at the number and say, oh, why is this number smaller than that number? Oh, this makes sense because of this element of the story. Here's a quicker question. When an accident does not happen, which of the following is true? So this question asks you to consider two statements. The first statement is that the robot prefers not wearing pads than wearing pads. And the second statement is the robot prefers the long route over the short route. So if you choose A, that means you think only the first statement is true. If you choose B, if you think only B is true, and then you have both A and B are true or both A and B are false. Think about this yourself and then keep watching for the answer. The correct answer is A. Only the first statement is true. Let's think about this. So the premise of the question is that we assume an accident does not happen. This is given. So in this case, does the robot prefer not wearing pads or wearing pads? Well, if an accident does not happen, then we don't need pads to reduce the severity of the damage. And also, wearing pads will cause the robot to be heavier, so it's going to slow the robot down. So for both of these reasons, not wearing pads is better than wearing pads. So the robot definitely prefers not wearing pads to wearing pads. Now about the second one, which route does the robot prefer? Well, again, we are assuming that an accident does not happen. So even if we're choosing the short route, we're assuming no accident occurs. Given that, the short route is better because we can get to the mail faster. This is one of the goals of the robot. Therefore, only the first statement is true. The robot prefers not wearing pads and the robot prefers the short route. We can do a lot of similar analysis of different states that can be induced by our decisions and also by the random variable accident. Let's now look at an example of the utility function, which has a bunch of numbers in it. And let's try to make sense of it by analyzing it from different perspectives. Here's a utility function. Recall what is a utility function? Well, a utility function maps from a state of the world to a number. And this number represents the agent's happiness in that state of the world. So in our case, depending on the values of the two decision variables and the value of the random variable, all three variables together will determine the state of the world. And given the state of the world, we will have a corresponding number which measures the robot's happiness. And in addition of giving each state of the world a name, so a number, a label, sort of. So I've labeled them using w0 up to w7 so that we can refer to them easily. And I also gave a corresponding description of each state, which sort of summarizes what happens in that state. Let's now do some analysis to try to understand this utility function and see if it makes sense. We'll break down the question into two calories. The first one is what happens if an accident does not happen. And the second said let's consider the case when an accident does happen. We've already discussed this first case as part of the clicker question. So let me just go through the question again and then go back to the table and let's try to make sense of everything using the table. So this is a case when we consider when an accident does not happen. And for either case, we're asking does the robot prefer not wearing pads or wearing pads? And also does the robot prefer the short route or the long route? So now let's go to the table and see which states of the world does this correspond to. So we're considering the cases when no accident happens. This corresponds to W0, W2, W4, and W6. Now not all of these four states are directly comparable, but we can compare some of them. For example, suppose we are assuming that we are not wearing pads. So that's these two states, W0 and W2. So we can compare these two states. The only difference between them is W2 is short route where W0 is long route. According to our analysis, W2 should be better than W0. We prefer the short route because it's faster. And indeed the numbers tell us that's the case. 10 is greater than 6. Let's see another example. So if we consider wearing pads and then same comparison, comparing short route to long route. So W6 should be better than W4. That is also the case here. 8 is greater than 4. So either case, our preference over the route makes sense here. Let's look at our preference over wearing pads or not. Let's fix the case when we are going on the long route. In that case, we're comparing W0 and W4. We prefer not wearing pads because we are lighter. The robot is lighter and indeed W0 is not wearing pads is better than W4 was wearing pads. Similarly, if we compare the two cases when we go on the short route, then not wearing pads is again better than wearing pads. So the purpose of these analysis is to show you that these numbers are not arbitrary. I chose them carefully so that they respect these preferences described in the story. All right, let's look at the second set of questions. So now let's consider the case when an accident does happen. Given that, we asked similar question as before. Which route does the robot prefer and does the robot prefer not wearing pads or wearing pads? Think about this yourself and then keep watching for the answer. Now the first question is a bit of a trick question. I hope you realize that. If you remember the conditional probability distribution for the accident node like this, then you'll remember that on the long route, there is zero probability for an accident to happen. Or on the short route, there's a positive probability for an accident to happen. Therefore, if an accident happens, then it's not possible for the robot to be on the on the long route. It has to be on the short route. So this is a tricky question because the robot doesn't have a preference. Two of the four possible world cannot happen. So the robot must have taken the short route. Therefore, there is no utility for these two worlds because these two worlds are not possible. When an accident does happen, it's not possible for us to be on the long route. So let's see how our utility function handled this case. Well, we basically handled this case by avoiding it. As you can see, we have these two impossible worlds and we simply have no number associated with them. Because if they're impossible, we don't have to specify how happy we are in that world. All right, our final question about the utility function. When an accident occurs, does a robot prefer not wearing pads or wearing pads? Well, the answer to this is that the robot prefers wearing pads because if an accident happens, then wearing pads reduces the severity of the damage. This means the following in terms of utility functions. If we compare two worlds where an accident happens in both worlds and we choose the short route in both worlds, then we prefer the world in which we wear pads to the world in which we don't wear pads. Let's look at the utility function. The last question corresponds to the two states highlighted in green, so W3 and W7. Between these two worlds, we prefer the world in which we wear pads because that reduces the severity of our damage. And as you can see from the numbers, W7 in which we wear pads has a higher utility than W3 when we don't wear pads. So again, this analysis is telling you that we chose these numbers carefully so that they respect the preference of the robot. We're now ready to put everything together. So I've copied the decision network we had from the previous slide. The only new thing we need to add is the utility function. So I've copied the utility function table from one of the previous slides as well. This is the complete decision network for the male pickup robot. So the next question we are going to explore is what should the robot do? Should the robot choose the short route or the long route? And should the robot decide to wear pads or not? Let's answer this question in the next video. That's everything for this video. Thank you for watching. I will see you in the next one. Bye for now.