 Hello everyone, this is Alice Gao. In this video, I'm going to talk about A star search. As suggested by the name, this algorithm is a star of this lecture. You will get to implement it in the assignment. In the previous video, I talked about greedy best first search. Greedy best first search relies on the heuristic function to make decisions. There are lots of bad news with this greedy approach. It has exponential space and time complexity. It's not guaranteed to find the solution, and it's not guaranteed to find the optimal solution. A star will do much better than greedy best first search, since A star will take advantage of the cost information as well. A star search implements the frontier as a priority queue, ordered by the value f of n. n is a current node, and f of n is the sum of the cost value of n and the heuristic value of n. Here's a picture to illustrate f of n. You can think of f of n as an estimate of the cost of the cheapest path from the star state to a gold state through the current state n. A star makes use of both the cost and the heuristic information. Intuitively, A star combines the idea of lowest cost first search and greedy best first search. Let's trace A star on this search problem. We will use the same tie-breaking rule, removing the node from the frontier in alphabetical order. Pause the video, do this yourself, and then keep watching for the answer. Here's a search tree when A star search terminates. I will describe the tracing process in a separate video. Let's look at some properties of A star search. For complexity, A star search doesn't do better than the other heuristic search algorithms. Space and time complexity are both exponential. Why does using the heuristic function not improve the space and time complexities? Think about it for a minute, and then keep watching. Using the heuristic function does not improve theoretical guarantees, since the guarantees only consider the worst case. The worst case often occurs when the heuristic is uninformative. For example, the heuristic function assigns the same value to every state. In practice, if the heuristic value is accurate, A star performs much better than other heuristic search algorithms. Here are some good news. A star search is complete and optimal, as long as the heuristic function satisfies a mild condition. The heuristic function must be admissible. Let's look at this condition in more detail. The heuristic function is admissible if and only if for any node n, h of n does not overestimate the cost of the cheapest path from the node n to a gold node. Suppose that we let h star of n be the cost of the cheapest path from n to a gold node, then we must have that zero is less than or equal to h of n, which is less than or equal to h star of n. We can think of an admissible heuristic in several ways. An admissible heuristic value for any node n is a lower bound on the cost of the cheapest path from the node n to a gold node. Intuitively, you can think of an admissible heuristic as an optimistic person. The person is optimistic because they think that the goal is always closer than it actually is. Whenever you ask this person to estimate how far is this node n to the nearest goal, the person will always tell you a value which is smaller than the actual cost of the cheapest path. In fact, we can say something stronger about a star search. In a sense, given a heuristic function, no search algorithm could do better than a star. Formally, this means that a star search is optimally efficient. Among all the optimal algorithms that start from the same start node and use the same heuristic function, a star search expands the minimum number of paths. That's everything for a star search. After watching this video, you should be able to do the following. Describe a star search at a high level. Trace the execution of a star search on a problem. Explain why a star search is optimal and optimally efficient. Explain the definition of an admissible heuristic and explain why it is important for the heuristic function to be admissible. Thank you very much for watching. I will see you in the next video. Bye for now.