 going to discuss the topic problem as a state space search. In AI we have seen that we will represent a problem to be solved in the form of a state space search. So at the end of the session you will be able to define a real world problem as a state space search. What are the components to build a system to solve problems? Here we see we define a problem precisely looking into all the micro level aspects of the problem. We analyze the problem, we isolate and represent the necessary tasks of the knowledge and not the total knowledge which is available with us. So we choose the best problem solving technique then and we apply it so that we get a solution to our particular problem. Knowing the components to solve a problem we now try to find out the structure that will support us to solve it easily. As we define a problem as a state space search we go through three criteria that have to be fulfilled. We have to define and identify a starting position then we have to define rules that are legal moves that take us from this starting position through intermediate states and finally we have to define a goal. When doing all these things we also make explicit previously implicit goals of not only legal moves but sometimes to a win. Let us consider the two jug problem. The problem is given a four gallon bucket and three gallon bucket which are jugs. How can we measure exactly two gallons into one bucket? There are no markings on the bucket and you must fill each bucket completely. For the two jug problem we see that the first criteria to be solved is to identify initial states. These initial states are the bucket is empty which is represented by a tuple zero zero the first zero for the first bucket and the second zero for the second bucket. Then we identify the goal state one of the bucket has two gallons of water in it which is represented by either if the second bucket has two gallons then x2 if the first bucket has two gallons then two x and the path cost have to be found out which is considered here to be one per unit step. For a two jug problem there are various actions that are intermediate steps that might happen so the action and successor functions or intermediate steps is filling the bucket where x is for the first bucket and y is for the second bucket it may be three where x has a value three that first bucket has three gallons and y may have a value four in the second case where the second bucket has four gallons. You may empty the bucket so the first bucket if it is empty you will have x equal to zero and y is equal to zero if the second bucket is empty you pour the contents of one bucket into the other by adding and subtracting from the values of x's and y's. Then we represent all these different states into which the system was from the start state where both the buckets were empty zero till the goal state where either one of the bucket is if the first bucket is having two gallons in it then it is two zero and the second bucket is having two gallons in it it is zero two so we could draw such a graph that traverses right from the start node through intermediate nodes to the goal node. The second problem we would like to see is the eight puzzle problem where we have states descriptions of the eight tiles and the location of the blank tile. We have successor functions or intermediate states wherein we generate all the legal states from trying the four functions left right up and down movement of the various tiles. Then we go for a goals test which checks whether the state machines and the goal configurations are satisfied as per our requirement and we set the path cost to be one. The next problem we deal with is the eight queen problem. Here we place eight queens on the chess board such that no queen can attack one another. So the queens should be apart from each other and we should also see that no path cost because only a final state count is of importance here. We have incremental formulations that have to be done and we have a complete state formulations so that we achieve our particular goal. So here we see that we can define the states which are arrangement of zero to eight queens on the board. Zero indicating there are no queens on the board and eight indicating all the eight queens are on the board. The initial state no queens are on the board then we have successor functions where we add a queen to the empty square and then finally we see the goal states that are existing which are eight queens on the board and none are attacked. So you will have 64 into 63 into 5th dot dot dot dot up to 57 for all the eight queens that is 1.8 into 10 raised to 14 possible sequences and one of them or a few of them might be the goals that we want to achieve. Ouch! This would be too much and probably you might consider to be a combinatorial explosion. So you would have the arrangement of n queens instead of eight queens now and generalize the particular problem. One per column in the left most n columns with no queens attacking each other in their states and the successor function to add a queen to any square in the left most empty column such that it is not attacked by any other queen. So you have 2057 total sequences to investigate. We go for another problem that is planning for touring cities using a map. Here we see the different cities are connected with the help of weights that are leading from one city to the other. These weights may be distances between the cities or costs to reach the different other city. So the methodology is I want to have an initial state so I set it up to be at error and a successor function that takes me from there ahead to my goal which is a set of action state pairs going from error to zerind and going from zerind and reaching there itself. But my goal test was at butcherist. So I would try to find out going across this particular path with a dot dot dot till I reach butcherist which is some of the distances traveled. Now I have given you some time to think about having formulated some problems. How do we solve them? Now you know already you have to search through a state space. You have to use a search tree that is generated with the initial state the successor functions and we define the state space. So take some time to think now. So we have a state which is representation of a physical configuration a node which is a data structure constituting the part of the search tree that includes in the children depth path cost and the states do not have children or depth or the path cost and we expand the functions to create new nodes now and this is done by filling the various fields such as the successor function expand the successor to go to the next node and you create the corresponding states. So the methodology is to identify the states and to point to its parent and to the next state keeping an account of the depth and keeping an account of where we are at present. So you might define different functions like a function which is using a strategy and returns a solution or a failure looping on till you get your particular output or your goal has been reached and then returning the state which is your goal state. You would require a function that returns a solution or a failure and you would improve on it inserting all with an expansion of the nodes at various levels. You would also modify to find out and returning the nodes of a particular solution further. So having this particular methodologies we now have a state space search and looking through the states and going across with the help of the arcs we are going from the start state through intermediate states to the goal state representing our search as a state space for our references we have used the textbooks. Thank you.