Lesson 04 - Module 2 Problem Solving using Search- (Single...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Module 2 Problem Solving using Search- (Single agent search) Version 1 CSE IIT, Kharagpur Lesson 4 Uninformed Search Version 1 CSE IIT, Kharagpur 2.4 Search Searching through a state space involves the following: A set of states Operators and their costs Start state A test to check for goal state We will now outline the basic search algorithm, and then consider various variations of this algorithm. 2.4.1 The basic search algorithm Let L be a list containing the initial state (L= the fringe) Loop if L is empty return failure Node select (L) if Node is a goal then return Node (the path from initial state to Node) else generate all successors of Node, and merge the newly generated states into L End Loop We need to denote the states that have been generated. We will call these as nodes. The data structure for a node will keep track of not only the state, but also the parent state or the operator that was applied to get this state. In addition the search algorithm maintains a list of nodes called the fringe. The fringe keeps track of the nodes that have been generated but are yet to be explored. The fringe represents the frontier of the search tree generated. The basic search algorithm has been described above. Initially, the fringe contains a single node corresponding to the start state. In this version we use only the OPEN list or fringe. The algorithm always picks the first node from fringe for expansion. If the node contains a goal state, the path to the goal is returned. The path corresponding to a goal node can be found by following the parent pointers. Otherwise all the successor nodes are generated and they are added to the fringe. The successors of the current expanded node are put in fringe. We will soon see that the order in which the successors are put in fringe will determine the property of the search algorithm. Version 1 CSE IIT, Kharagpur 2.4.2 Search algorithm: Key issues Corresponding to a search algorithm, we get a search tree which contains the generated and the explored nodes. The search tree may be unbounded. This may happen if the state space is infinite. This can also happen if there are loops in the search space. How can we handle loops? Corresponding to a search algorithm, should we return a path or a node? The answer to this depends on the problem. For problems like N-queens we are only interested in the goal state. For problems like 15-puzzle, we are interested in the solution path. We see that in the basic search algorithm, we have to select a node for expansion. Which node should we select? Alternatively, how would we place the newly generated nodes in the fringe? We will subsequently explore various search strategies and discuss their properties, Depending on the search problem, we will have different cases. The search graph may be weighted or unweighted. In some cases we may have some knowledge about the quality of intermediate states and this can perhaps be exploited by the search algorithm. Also depending on the problem, our aim may be to find a minimal cost path or any to find path...
View Full Document

Page1 / 28

Lesson 04 - Module 2 Problem Solving using Search- (Single...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online