 Today, we are going to discuss the A star algorithm. At the end of this session, student will be able to demonstrate the work of A star algorithm and its interesting observations. The basic functions used for developing the A star algorithms are f dash, which is a heuristic function that estimates the merits of each node we generate. As we recollect, a heuristic is a technique to make the search efficient. f dash is equal to g plus h dash, where g is a measure of cost of getting from the initial state to the current node. h dash is an estimate of the additional cost of getting from the current node to the goal state. And f dash represents an estimate of the cost of getting from initial state to the goal state along the path that is generating the current node. We use two basic lists to generate our particular search properly. One is open, where the nodes which have been generated and have had the heuristic function applied to them, but which have not yet been examined. It is approximately q in which elements with highest priority and promising values of heuristic function are being developed. The closed is a list of nodes that have already been examined. Those nodes are to be kept in memory. Whenever a new node is generated, we need to check if it was generated before. After understanding breadth-first search and depth-first search, we introduce the idea of best-first search. Now, what is expected from the A star algorithm? The A star algorithm uses heuristics as we have seen. And we start with the first step, which is start with the open containing the initial node. Set the node value to zero. It's h-value to whatever it is and if it's f-value, now becomes h-plus zero or h-alone. Now set closed to the empty list. In the step two, until the goal node is found, repeat the following procedure. If no nodes are there on open, report a failure because there are no nodes and hence we cannot do any search. Advise pick a node on open with the lowest f-value and call it the best node. Remove it from open, place it on to closed if the best node is a goal node. If so, exit report that a solution has been achieved. Advise generate the successor of best node but do not set best node to the point to them yet. For each successor that we have encountered, do the following. Set the successor to the point back to the best node. These backward links will make it possible to recover the path once a solution is found. Compute now g of successor is equal to g of best node plus the cost of getting from the best node to the successor. Now see if the successor is same as any node on open, which is already visited nodes. If so, call the node old, since its node already exists in the graph. We can throw successor away and add old to the list of best node successor. Now we decide whether old's parent's link should be reset to the point of the best node. It should if the path found to successor is cheaper than the current best path to goal. See whether it is cheaper to get old via its current parent or to the successor via the best node by comparing the g-values. If older is cheaper, do nothing. If successor is cheaper, then the reset old's parent link to point to the best node. Record the new cheaper path in g old and update f-old. If successor was not on open, check whether it is on closed. If so, call the node on closed as old and add old to the list of best node successors. Follow the point to see once again and set parent's link and the g and f-values appropriately. Thus heuristic functions g and f-dash are calculated. If we have found a better path to old, we must propagate the improvement of old successors. Continue this till each branch terminates with a node that is either still on open or has no successors. If successor was not on open, then put it on open and add it to the list of best node successors. Compute now f-successor is equal to g-successor plus h-successor. We have some interesting observations from this particular algorithm. First is the role of the g function. Let us choose which node to expand next on the basis of how good the node itself looks and how good the path to the node was by incorporating g into f-dash. We not always choose our next node to expand the node that appears closest to the goal. If we take care to get a solution somehow, then you just define g to be always 0. If we want to find a minimum path, which is a step path, set the cost of going from the node to the successor constant. If we want to find the cheapest path and some operators cost more than others, we set the cost of going from one node to another to reflect these costs. The second interesting observation is the role of h-dash. If h-dash is perfect estimate of h, then a star algorithm will converge immediately to the goal with no search. The better h-dash is, the closer we will get to the direct approach. If the value of h-dash is 0, the search will be controlled now by g. If the value of g is also 0, the search strategy will be random. If g is 1, search strategy will be a breadth first. If we can guarantee h-dash, never overestimates h, a-dash will find an optimal path to the goal. An interesting observation also is the relationship between trees and graphs. The algorithm applies to graphs. It can be also used to trees because every tree is a curtailed graph. By incorporating on trees, not bothering to check whether a new node is already on open or closed. It is faster to generate nodes but results is same. The search continues to produce now duplicate nodes. What a preview of the A star algorithm which we studied so far. Let us take some MCQs. The first MCQ is, A star algorithm is based on A breadth first search, B depth first search, C best first search, D hill climbing and E bulk word problem. And the answer is best first search. We reason here because best first search is giving the idea of optimization and quick choose of path and all these characteristics lie in the A star algorithm studied so far. The second MCQ is, a heuristic is a way of trying A to discover something or an idea embedded in a program, B to search and measure how far a node in a search tree seems to be from a goal, C to compare to nodes in a search tree and to see if one is better than the other. D only A and B, E only A, B and C and the answer is E only A, B and C. The reasoning behind it is in the heuristic approach we discover certain ideas and use heuristic function to search for a goal and predicates to compare the nodes given in our graph. For our references we have used. Thank you.