Artificial Intelligence

Size: px
Start display at page:

Download "Artificial Intelligence"

Transcription

1 Artificial Intelligence COMP-241, Level-6 Course Coordinator-Mohammad Fahim Akhtar Faculty Members- Dr. Mohammad Hassan, Adel AlQahtani Department of Computer Science Jazan University, KSA Chapter 3: Search Strategy In which we see how an agent can find a sequence of actions that achieves its goals, when no single action will do. It s not that I m so smart, it s just that I stay with problems linger. ---Albert Einstein Simple reflex agents are limited because they cannot plan ahead. They also have no knowledge of what their actions do or of what they are trying to achieve. Now we investigate one type of goal-based agent called a problem-solving agent. This type of agent decides what to do by finding sequences of actions that lead to desirable states. Problem-Solving-Agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance measure. Goal: Aim to satisfy. Goal Formulation: This is based on the current situation and the agent s performance measure. Problem Formulation: This is the process of deciding what actions and states to consider. Example: Suppose that the agent is driving a car in Jazan city and wishes to go in Medina city. There are a number of factors to consider e.g. Cost, speed and comfortable of journey. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 1 of 27

2 The agent don t not know which of its possible actions is best, because it does not know enough about the state that results from taking each action. If the agent has no additional knowledge, then it is stuck. The best it can do is choosing one of the actions at random. For now let us assume that the agent will consider actions at the level of driving from one city to another. The agent has now adopted the goal of getting to Medina, so unless it is already there, it must transform the current state into the desired state. Suppose that there are three roads leaving Jazan but that none of them lead directly to Medina. What should the agent do? If it does not know the geography it cannot do better than to pick one of the roads at random. However, suppose the agent has a map of the area. The purpose of a map is to provide the agent with information about the states it might get itself into and the actions it can take. The agent can use the map to consider subsequent steps of a hypothetical journey that will eventually reach its goal. An agent with several immediate options of unknown value can decide what to do by first examining different possible sequences of actions that lead to states of known value, and then choosing the best sequence. Measuring problem-solving performance: The effectiveness of a search can be measured in at least three ways: Does it find a solution? Is it a good solution (low cost)? What is the time and memory required to find a solution (search cost)? The total cost of a search is the sum of the path cost and search cost. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 2 of 27

3 Well-defined problems and solutions We have seen that the basic elements of a problem definition are the states and actions. To capture these ideas more precisely, we need the following: The initial state : From where the agent starts journey. For example, the initial state for our agent s location is Jazan. The set of possible actions available to the agent. The most common formulation (operator) uses a successor function. For example, a particular state x, SUCCESSOR- FN(x) returns a set of (action, successor). The initial state and successor function implicitly define the state space of the problem. The Saudi Arabia road map given below shows the desired distance between different cities. Q. How does an agent maximize the performance to travel from Jazan domestic airport to Medina International airport solve using intelligent technique with a suitable example. A path in the state space is simply any sequence of actions leading from one state to another. The goal test, which the agent can apply to a single state to determine if it is a goal state. Sometimes there is an explicit set of goal states is Medina. A path cost function is a function that assigns a cost to a path. We will consider the cost of a path is the sum of the cost of each step. Together the initial state, action/successor function (operator set), goal test, and path cost function define a problem. Q. How does an agent maximize the performance to travel from Arad airport to Bucharest airport of Romania solve using intelligent technique with a suitable example. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 3 of 27

4 The following are the steps required to solve problem: States: To maximize the performance to travel from Arad to Bucharest. Initial states : In (Arad) //To start from Arad Successor Function: {<Go(Sibiu, In (Sibiu)>, <Go(Rimnicu Vilcea), In (Rimnicu Vilcea), <Go (Pitesti), In (Pitesti)>} // Sequence of actions (cities) // i.e., Sibiu Rimnicu Vilcea - Pitesti Goal Test : {In (Bucharest)} Path Cost: 418 Km. //The sum of the costs of the individual actions along the path, //The length in Kilometer, //Total distance traveled by the agent. Real World Problem Vacuum Cleaner Agent Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 4 of 27

5 States : The agent is in one of two locations, each of which might or might not contain dirt. Initial State: Any state can be designated as the initial state. Successor Function : This generates the legal states that result from trying the three actions (Left, Right and Suck). Goal Test: This checks whether all the squares are clean. Path Cost: for instance, each step costs 1, so the path cost is the number of steps in the path. 8 Puzzles Problem by Intelligent Technique An instance of which is consists of a 3 x 3 boards with eight numbered tiles and a blank space. A tile adjacent to the blank space can slide into the space. Solving an 8-puzzle involves moving the puzzle from a starting state to a solution state with many options in between The eight queen s puzzle is the problem of placing eight chess queens on an 8 8 chessboard so that none of them can capture any other using the standard chess queen's moves. The queens must be placed in such a way that no two queens attack each other. Thus, a solution requires that no two queens share the same row, column, or diagonal. The eight queens puzzle is an example of the more general n-queens problem of placing n queens on an n n chessboard. The following are the steps required to solve problem, States : 8-Puzzle/Toy Problem/8-Queens Problem/Sliding-block Puzzle: To arrange sequentially. Initial State: Any state can be designated as the initial state. Or, we can start from any where that is up, down, right and left, if there will be space to move. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 5 of 27

6 Successor Function: This generates the legal states that result from trying the four actions (blank moves Left, Right, Up or Down).Add a queen to any square in the leftmost empty column such that it is not attacked by any other queen. Goal Test: Arrange in sequential order. or, This checks whether the state matches the given goal configuration. Path Cost: Each step costs 1, so the path cost is the number of steps in the path. Route-finding problems This is a very common problem which is found across different domains such as travelling form one city to the other, routing in computer networks, air line travel planning, etc. For example, the general flavor of this problem is that you are at an initial place and you would like to travel to another place given certain constraints such as lowest time, lowest disturbances, etc. In order to do this we can formulate the problem with the problem formulation method introduced before by defining the initial state, state space and successor function, goal test and path cost. The following are the steps required to solve problem: States: Each is represented by a location (e.g., an airport) and the current time. Initial States: Successor Function: This returns the states resulting from taking any scheduled flight (perhaps further specified by the seat class and location), leaving later than the current time plus the within airport transit time, from the current airport to another. Goal Test: Are we at the destination by some pre-specified time? Path Cost: This depends on monetary cost, waiting time, flight time, customs and immigration procedures, seat quality, time of day, type of airplane, frequent-flyer mileage awards and so on. For example if you want to travel from Colombo s Bandaranaike International airport to Tokyo Narita airport, the problem formulation would be as follows. Initial State Bandaranaike International Airport, Colombo, Sri Lanka and the current time Successor function Any flight scheduled to leave the airport in Colombo after the current time plus the airport-transit time headed to Tokyo Narita airport. Goal test There might be stop overs from the flight in between Colombo to Narita at may be Singapore, Malaysia. So the goal test should determine out of the stops of the air plane what is the goal state; which is Tokyo Narita airport. Path cost This depends on the cost that the passenger is willing to incur, His/her preferences with regard to low travel time, non-stop flights, waiting time, airplane carrier, seat availability, etc. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 6 of 27

7 In which we see how information about the state space can prevent algorithms from blundering about in the dark. Failure is the opportunity to begin again more intelligently. ---Moshe Arens Search Strategies Once we have formulated the problem, we have to decide how to find the solutions to those problems. This could be done by searching the state space. When searching for a solution, you have start at the initial state of the search tree/graph and expand each state and visit connected states until the goal state has been reached. There are many ways to determine which state to expand in order to get to the goal state, which are known as Search strategies. These strategies can be mainly divided in to two groups known as Uninformed search and Informed search which are described in detail as follows. 1. Informed Search - This type of search strategy is more advanced than uninformed search. It is also known as heuristic search. This strategy has the ability to determine whether a non-goal state is much better than another non-goal state in arriving at the goal state effectively and efficiently, thus it uses heuristics based information on top of the information provided by the problem definition about the states in the state space. 2. Uninformed Search - This is also known as Blind Search. This type of search means that they have no additional information about the states other than the information provided by the problem definition. This type of search can generate successor states and also make a distinction between a goal state and a non-goal state. Types of Informed Search 1. Best-First Search This is a general graph search algorithm. At each node of the graph it should evaluate which node to be expanded next in order to arrive at the optimal solution efficiently. This is achieved by the introduction of an evaluation function which evaluates at each point, which node to be expanded next based on the lowest evaluation function result. Usually, the evaluation function mentioned above measures the distance from the node in concern to the goal, so a lower evaluation function is preferred over a higher evaluation function. Another key factor in this search algorithm is called the heuristic function which is a part of the evaluation function, which is defined as the cheapest cost of the cheapest path from a node to a goal node. Therefore, this algorithm chooses the lowest cost paths from the selected best nodes of the graph to arrive at the goal node, leading to the best solution and the heuristic function value would be zero at the goal node, which acts as a stopping condition for the algorithm to terminate when it reaches the goal. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 7 of 27

8 Best First Algorithm Let fringe be a priority queue containing the initial state Loop if fringe is empty return failure Node remove-first (fringe) if Node is a goal then return the path from initial state to Node else generate all successors of Node, and put the newly generated nodes into fringe according to their f values End Loop Greedy Best-First Search This search method expands the node that is closest to the goal node which is likely to lead to a solution in a quick manner. In this case, the heuristic function (h(n)) and the evaluation function (f(n)) are the same. One can come up with different heuristic functions based on the problem domain in concern and apply it. Here:- f(n) = h(n) Let s first consider a small example which consists of distances between cities and where a tourist wants to find the path that he should travel in order to minimize the distance he travels from city A to city N. The following table shows the distances in kilometers (approximate road distance) from the destination city N to each respective city. From City Road distance (km) From City Road distance (km) A 450 H 300 B 345 I 320 C 420 J 50 D 350 K 220 E 175 L 75 F 250 M 200 G 280 N 0 Let s also assume that the existing roads connecting the above cities are as follows. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 8 of 27

9 Now let s try to see how to perform greedy best-first search to go from city A to city N. So starting from city A, one can go to either city B, H or D according to the above road map. Since the heuristic is based on expanding the node with the lowest distance, in the above first step, the algorithm would select to go to city H from cist A since it has the lowest road distance. Then it would see which city to move from H. Since the lowest distance is to city K, it would move to that city next as shown above. Based on the heuristic function of expanding the nodes based on the lowest distance to goal node, this algorithm would move on until it reaches the destination city N as shown below. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 9 of 27

10 A* Search Strategy This is another best-first search strategy which has a different relationship with the evaluation function and the heuristic function when compared to afore explained greedy best-first search. Here the evaluation function (f(n)) is defined as the combination of cost to reach the node (g(n)) and the cost to each node from the goal node (h(n)). Idea: avoid expanding paths that are already expensive Evaluation function f(n) = g(n) + h(n) g(n) = cost so far to reach n Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 10 of 27

11 h(n) = estimated cost from n to goal f(n) = estimated total cost of path through n to goal Therefore, this search strategy not only uses the heuristic function which consists of distances to each node from the goal node (h(n)) but also uses the path cost (so far travelled cost) from start node to the node in concern (g(n)) in the evaluation. This appears to be a better heuristic which uses the cue that the distance travelled should be minimized along each possible path. Another Way: Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 11 of 27

12 The algorithm A* is outlined below: OPEN = nodes on frontier. CLOSED = expanded nodes. OPEN = {<s, nil>} While OPEN is not empty remove from OPEN the node <n,p> with minimum f(n) place<n,p> on CLOSED if n is a goal node, return success(path p) for each edge connecting n& m with cost c if <m, q> is on CLOSED and {p e} is cheaper than q then remove n from C LOSED, put <m,{p e}> on OPEN else if <m,q> is on OPEN and {p e} is is cheaper than then replace q with {p e} else if m is not on OPEN then put <m,{p e}> on OPEN Example of creating global database and set of rules: Applied to the M-C problem and 8-puzzle problem. Missioners and Cannibals problem(m-c problem): In this problem, there are 3 missioners and three cannibals in the left bank of a river also there is a bout with them which can carry maximum 2 objects in the journey. The problem is that: how can we travel all of them to the right bank without left number of cannibals more than the missioners in any on the two sides of the river. That is because the cannibals will eat the missioners if they are more than them. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 12 of 27

13 Figure : M-C problem The Solution: Global database: If we focus on the left bank of the river we will not need to represent the right bank that is because the right bank can be guessed from the left bank because any bank complements the other so the main frame of the states S=(ML, CL, BL). (no need to say S=(Ml, CL,BL, MR, CR, BR )). S= state, ML= number of Missioners in the Left bank. CL = number of Cannibals in the Left bank. BL = the existence of the boat in the left bank. 0 ML, CL 3 BL = 1 if the boat exist in the left bank 0 otherwise (3 3 1) ----> (0 0 0) Initial state goal state Set of rules: Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 13 of 27

14 Rule ID Rule Meaning P01 ML= ML, CL= CL-1, BL=0 The number of Missioners in the left bank does not changed but the number of cannibals in the left bank decreased by 1 and the boat is not exist in the left bank P10 ML= ML-1, CL= CL, BL=0 The number of Missioners in the left bank decreased by 1 but the number of cannibals in the left bank does not change and the boat does not exist in the left bank. P11 ML= ML-1, CL= CL-1, BL=0 The number of Missioners in the left bank decreased by 1 and the number of cannibals in the left bank decreased by 1 and the boat does not exist in the left bank. P02 ML= ML, CL= CL-2, BL=0 The number of Missioners in the left bank does not change but the number of cannibals in the left bank decreased by 2 and the boat does not exist in the left bank. P20 ML= ML-2, CL= CL, BL=0 The number of Missioners in the left bank decreased by 2 but the number of cannibals in the left bank does not change and the boat does not exist in the left bank. q01 ML= ML, CL= CL+1, BL=0 The number of Missioners in the left bank does not changed but the number of cannibals in the left bank increased by 1 and the boat is not exist in the left bank q10 ML= ML+1, CL= CL, BL=0 The number of Missioners in the left bank increased by 1 but the number of cannibals in the left bank does not change and the boat does not exist in the left bank. q11 ML=ML+1, CL= CL+1, BL=0 The number of Missioners in the left bank increased by 1 and the number of cannibals in Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 14 of 27

15 the left bank increased by 1 and the boat does not exist in the left bank. q02 ML= ML, CL= CL+2, BL=0 The number of Missioners in the left bank does not change but the number of cannibals in the left bank increased by 2 and the boat does not exist in the left bank. q20 ML= ML+2, CL= CL, BL=0 The number of Missioners in the left bank increased by 2 but the number of cannibals in the left bank does not change and the boat does not exist in the left bank. 8 Puzzle Problems: There are many models of puzzles some of them are for restructure the pieces of cut picture other are for reorganize the movable blocks to find the desired order. Here the block can be slide in the empty space if it is near. Any block labeled with a unique number or alphabetical character (see figure no.3-2). Initial state Goal state Figure : 8-Puzzle problem Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 15 of 27

16 The global database: S state 0 sij 3 i, j є {1, 2, 3} siojo empty state siojo= > Initial state Goal state Total of states = 9! Set of rules: U (up): if io > 1 then siojo= sio-1jo sio-1jo=0 L(left): if jo > 1 then siojo= siojo-1 siojo-1=0 D(down): if io < 3 then siojo= sio+1jo sio+1jo=0 R(right): if jo < 3 then siojo= siojo+1 siojo+1=0 Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 16 of 27

17 States Space Graph (SSG): It is a graphical description for the problem states. In the SSG we represent all problem states in a big tree. Although, this tree includes the initial state which may not necessary to be only one state. That means there may be more than one initial state in the same SSG. Also the same issue can be describes the goal state. Simmarily, in some problems there maybe more than one initial state or more than one goal state. Example : In the M-C problem we will try to find the SSG Initial state (3 3 1) the goal state(0 0 0) (3 3 1) P01 p11 p02 (3 2 0) (2 2 0) (3 1 0), q10 q01 (3 2 1) P02 (3 0 0) q01 (3 1 1) P20 (1 1 0) q11 (2 2 1) P20 (0 2 0) q01 (0 3 1) P02 (0 1 0).q01 q10 (0 2 1) (1 1 1), p02 p11 (0 0 0) q01 (0 1 1) Figure : The SSG of M-C problem Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 17 of 27

18 Breadth First Search (Control) Strategy This strategy is suitable when there is a goal in a near level (near to the initial state). The Algorithm of Breadth First Strategy Let fringe be a list containing the initial state Loop if fringe is empty return failure Node remove-first (fringe) if Node is a goal then return the path from initial state to Node else generate all successors of Node, and (merge the newly generated nodes into fringe) add generated nodes to the back of fringe End Loop Breadth algorithm always generates one node and test if it is the goal or not. So it does not generate all the SSG from the beginning. Because when it find the goal then no need to general another node. If the new node is not the goal here the algorithm generates a new node in the same level. After that breadth first generates the first node in the second level and so on. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 18 of 27

19 Example: In the following general example the SSG includes two goals G1 and G2, and there is only one initial state A. Figure : SSG contains 2 goal states and one node for initial state. The implementing breadth first: Figure: example of breadth first algorithm implementation Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 19 of 27

20 The Depth First Search (Control) Strategy Depth first is a suitable algorithm when there is a goal in left depth. So, in this case it will find the goal faster than breadth first algorithm. The algorithm of the Depth First Strategy: Let fringe be a list containing the initial state Loop if fringe is empty return failure Node remove-first (fringe) if Node is a goal then return the path from initial state to Node else generate all successors of Node, and merge the newly generated nodes into fringe add generated nodes to the front of fringe End Loop The algorithm always goes deeply into one branch of the original node. That is by generating one node and test if it is the goal or not and then go to its branch if it is not the goal and so on. If the current branch does not include the goal then the depth first will check another branch. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 20 of 27

21 Example: If we ably the depth first algorithm to the same example in figure number 4-1we will reach the goal G2 in three steps and the algorithm will never show all the state those included in the SSG. Figure: depth first example Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 21 of 27

22 The Backtracking Search (Control) Strategy Backtracking idea comes from the depth first. By another words it is an enhancement of the depth first strategy. Backtracking means that, cancelling the path of searching and research using new path. Really, this can be done by going back to the previous node and try to find the goal in a different path. There are 4 reasons for backtracking: 1- If there is a duplicated node or states. 2- If there is an unacceptable node or states. 3- If there is no way to ably any rule to the node. 4- If the state level pass the boundary. The algorithm of the backtracking strategy: Let fringe be a list containing the initial state Loop if fringe is empty return failure Node remove-first (fringe) if Node is a goal then return the path from initial state to Node else if depth of Node = limit return cutoff End Loop else add generated nodes to the front of fringe Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 22 of 27

23 Example of 4-Qweens problem: In this problem, there are 4 Queens want to butted in a board that contains 16 cells (4X4). But every queen must be butted in a unique line. That means not more than one queen butted in the same row or column or diagonal. The solution: Figure: solution for 4-Queens using Backtracking. The goal path drown by wide lines. Game Trees The above category of games can be represented as a tree where the nodes represent the current state of the game and the arcs represent the moves. The game tree consists of all possible moves for the current players starting at the root and all possible moves for the next player as the children of these nodes, and so forth, as far into the future of the game as desired. Each individual move by one player is called a "ply". The leaves of the game tree represent terminal positions as one where the outcome of the game is clear (a win, a loss, a draw, a payoff). Each terminal position has a score. High scores are good for one of the player, called the MAX player. The other player, called Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 23 of 27

24 MIN player, tries to minimize the score. For example, we may associate 1 with a win, 0 with a draw and -1 with a loss for MAX. Example : Game of Tic-Tac-Toe Figure MIN-MAX strategy applied to tic tac toe game Above is a section of a game tree for tic tac toe. Each node represents a board position, and the children of each node are the legal moves from that position. To score each position, we will give each position which is favorable for player 1 a positive number (the more positive, the more favorable). Similarly, we will give each position which is favorable for player 2 a negative number (the more negative, the more favorable). In our tic tac toe example, player 1 is 'X', player 2 is 'O', and the only three scores we will have are +1 for a win by 'X', -1 for a win by 'O', and 0 for a draw. Note here that the blue scores are the only ones that can be computed by looking at the current position. Text Book: Artificial Intelligence A modern Approach, Second edition, Stuart Russell & Peter Norvig Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 24 of 27

25 Exercises: Q1. Define with an example: Informed Search (Heuristic Search), Uninformed Search (Blind Search), Problem Solving Agent, Best First Search, State Space Graph Q2. Write an algorithm of simple problem solving agent. Q3. How does an agent maximize the performance to travel from Jazan domestic airport to Medina International airport solve using intelligent technique with a suitable example. Q4. How does an agent maximize the performance to travel from Arad airport to Bucharest airport of Romania solve using intelligent technique with a suitable example. Q5. Solve the following problems using intelligent technique: a) Vacuum cleaner agent b) 8 Puzzle Problem c) Toy Problem d) Route finding problem Q6. Write an algorithm of Best First Search technique. Q7. An agent want to travel from node A to N solve using Greedy Best-First Search technique. From City Road distance (km) From City Road distance (km) A 450 H 300 B 345 I 320 C 420 J 50 D 350 K 220 E 175 L 75 F 250 M 200 G 280 N 0 Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 25 of 27

26 Q8. How does an agent maximize the performance to travel from Arad airport to Bucharest airport of Romania solve by using A* technique with a given diagram. Q9. Write an algorithm of A* search technique. Q10. Solve three missioners and three cannibals problem with given diagram. Figure : M-C problem Q11. Write an algorithm of breadth first search technique. Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 26 of 27

27 Q12. Write breadth first search strategy for the following graph where start node is A and Goal is G1. Q13. Write depth first search strategy for the following graph where start node is A and Goal is G2. Q14. Write an algorithm of depth first search technique. Q15. Write an algorithm of backtracking search strategy. Q16. Solve 4 queens problem using backtracking technique. Q17. Explain game trees with a suitable example. ************************************************************************************** Mohammad Fahim Akhtar Artificial Intelligence, COMP-241 version 1.5 Page 27 of 27

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING BY SEARCH Gabriela Ochoa http://www.cs.stir.ac.uk/~goc/ OUTLINE Problem solving by searching Problem formulation Example problems Search

More information

CSE 40171: Artificial Intelligence. Uninformed Search: Search Spaces

CSE 40171: Artificial Intelligence. Uninformed Search: Search Spaces CSE 40171: Artificial Intelligence Uninformed Search: Search Spaces 1 Homework #1 has been released. It is due at 11:59PM on 9/10. 2 Course Roadmap Introduction Problem Solving Machine Learning (week 1)

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Berlin Chen 2004 Reference: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 3 1 Introduction Problem-Solving Agents vs. Reflex Agents Problem-solving

More information

Chapter 3 Solving problems by searching

Chapter 3 Solving problems by searching 1 Chapter 3 Solving problems by searching CS 461 Artificial Intelligence Pinar Duygulu Bilkent University, Slides are mostly adapted from AIMA and MIT Open Courseware 2 Introduction Simple-reflex agents

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence CSC348 Unit 3: Problem Solving and Search Syedur Rahman Lecturer, CSE Department North South University syedur.rahman@wolfson.oxon.org Artificial Intelligence: Lecture Notes The

More information

CAP 4630 Artificial Intelligence

CAP 4630 Artificial Intelligence CAP 4630 Artificial Intelligence Instructor: Sam Ganzfried sganzfri@cis.fiu.edu 1 http://www.ultimateaiclass.com/ https://moodle.cis.fiu.edu/ 2 Solving problems by search 3 8-puzzle 4 8-queens 5 Search

More information

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems Uninformed Search Problem-solving agents Tree search algorithms Single-State Problems Breadth-First Search Depth-First Search Limited-Depth Search Iterative Deepening Extensions Graph search algorithms

More information

Artificial Intelligence CS 6364

Artificial Intelligence CS 6364 Artificial Intelligence CS 6364 Professor Dan Moldovan Section 4 Informed Search and Adversarial Search Outline Best-first search Greedy best-first search A* search Heuristics revisited Minimax search

More information

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 19 January, 2018

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 19 January, 2018 DIT411/TIN175, Artificial Intelligence Chapter 3: Classical search algorithms CHAPTER 3: CLASSICAL SEARCH ALGORITHMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 19 January, 2018 1 DEADLINE FOR

More information

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search CS 771 Artificial Intelligence Problem Solving by Searching Uninformed search Complete architectures for intelligence? Search? Solve the problem of what to do. Learning? Learn what to do. Logic and inference?

More information

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department Princess Nora University Faculty of Computer & Information Systems 1 ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department (CHAPTER-3-PART1) PROBLEM SOLVING AND SEARCH (Course coordinator) WHY

More information

Solving Problems: Blind Search

Solving Problems: Blind Search Solving Problems: Blind Search Instructor: B. John Oommen Chancellor s Professor Fellow: IEEE ; Fellow: IAPR School of Computer Science, Carleton University, Canada The primary source of these notes are

More information

Solving problems by searching

Solving problems by searching Solving problems by searching Chapter 3 CS 2710 1 Outline Problem-solving agents Problem formulation Example problems Basic search algorithms CS 2710 - Blind Search 2 1 Goal-based Agents Agents that take

More information

Solving problems by searching

Solving problems by searching Solving problems by searching Chapter 3 Some slide credits to Hwee Tou Ng (Singapore) Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Heuristics

More information

Set 2: State-spaces and Uninformed Search. ICS 271 Fall 2015 Kalev Kask

Set 2: State-spaces and Uninformed Search. ICS 271 Fall 2015 Kalev Kask Set 2: State-spaces and Uninformed Search ICS 271 Fall 2015 Kalev Kask You need to know State-space based problem formulation State space (graph) Search space Nodes vs. states Tree search vs graph search

More information

Problem Solving and Search

Problem Solving and Search Artificial Intelligence Problem Solving and Search Dae-Won Kim School of Computer Science & Engineering Chung-Ang University Outline Problem-solving agents Problem types Problem formulation Example problems

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 Outline Problem-solving agents Problem types Problem formulation Example problems Uninformed search algorithms Informed search algorithms Chapter 3 2 Restricted

More information

Goal-Based Agents Problem solving as search. Outline

Goal-Based Agents Problem solving as search. Outline Goal-Based Agents Problem solving as search Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Search Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Problem formulation & examples Basic search algorithms 2/100 Example:

More information

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

COMP219: Artificial Intelligence. Lecture 7: Search Strategies COMP219: Artificial Intelligence Lecture 7: Search Strategies 1 Overview Last time basic ideas about problem solving; state space; solutions as paths; the notion of solution cost; the importance of using

More information

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3. COMP9414/9814/3411 17s1 Search 1 COMP9414/ 9814/ 3411: Artificial Intelligence Week 3: Path Search Russell & Norvig, Chapter 3. Motivation Reactive and Model-Based Agents choose their actions based only

More information

521495A: Artificial Intelligence

521495A: Artificial Intelligence 521495A: Artificial Intelligence Search Lectured by Abdenour Hadid Associate Professor, CMVS, University of Oulu Slides adopted from http://ai.berkeley.edu Agent An agent is an entity that perceives the

More information

Solving Problem by Searching. Chapter 3

Solving Problem by Searching. Chapter 3 Solving Problem by Searching Chapter 3 Outline Problem-solving agents Problem formulation Example problems Basic search algorithms blind search Heuristic search strategies Heuristic functions Problem-solving

More information

4. Solving Problems by Searching

4. Solving Problems by Searching COMP9414/9814/3411 15s1 Search 1 COMP9414/ 9814/ 3411: Artificial Intelligence 4. Solving Problems by Searching Russell & Norvig, Chapter 3. Motivation Reactive and Model-Based Agents choose their actions

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Informed Search Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

AI: Week 2. Tom Henderson. Fall 2014 CS 5300 AI: Week 2 Tom Henderson Fall 2014 What s a Problem? Initial state Actions Transition model Goal Test Path Cost Does this apply to: Problem: Get A in CS5300 Solution: action sequence from initial to goal

More information

Informed Search and Exploration

Informed Search and Exploration Informed Search and Exploration Chapter 4 (4.1-4.3) CS 2710 1 Introduction Ch.3 searches good building blocks for learning about search But vastly inefficient eg: Can we do better? Breadth Depth Uniform

More information

Informed Search and Exploration for Agents

Informed Search and Exploration for Agents Informed Search and Exploration for Agents R&N: 3.5, 3.6 Michael Rovatsos University of Edinburgh 29 th January 2015 Outline Best-first search Greedy best-first search A * search Heuristics Admissibility

More information

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3 ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING Chapter 3 1 PROBLEM SOLVING We want: To automatically solve a problem We need: A representation of the problem Algorithms that use some strategy to

More information

Why Search. Things to consider. Example, a holiday in Jamaica. CSE 3401: Intro to Artificial Intelligence Uninformed Search

Why Search. Things to consider. Example, a holiday in Jamaica. CSE 3401: Intro to Artificial Intelligence Uninformed Search CSE 3401: Intro to Artificial Intelligence Uninformed Search Why Search Required Readings: R & N Chapter 3, Sec. 1-4. Lecture slides adapted from those of Fahiem Bacchus. Successful Success in game playing

More information

Basic Search. Fall Xin Yao. Artificial Intelligence: Basic Search

Basic Search. Fall Xin Yao. Artificial Intelligence: Basic Search Basic Search Xin Yao Fall 2017 Fall 2017 Artificial Intelligence: Basic Search Xin Yao Outline Motivating Examples Problem Formulation From Searching to Search Tree Uninformed Search Methods Breadth-first

More information

Downloaded from ioenotes.edu.np

Downloaded from ioenotes.edu.np Chapter- 3: Searching - Searching the process finding the required states or nodes. - Searching is to be performed through the state space. - Search process is carried out by constructing a search tree.

More information

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search 1 Class Tests Class Test 1 (Prolog): Friday 17th November (Week 8), 15:00-17:00. Class Test 2 (Everything but Prolog) Friday 15th December

More information

Chapters 3-5 Problem Solving using Search

Chapters 3-5 Problem Solving using Search CSEP 573 Chapters 3-5 Problem Solving using Search First, they do an on-line search CSE AI Faculty Example: The 8-puzzle Example: The 8-puzzle 1 2 3 8 4 7 6 5 1 2 3 4 5 6 7 8 2 Example: Route Planning

More information

Route planning / Search Movement Group behavior Decision making

Route planning / Search Movement Group behavior Decision making Game AI Where is the AI Route planning / Search Movement Group behavior Decision making General Search Algorithm Design Keep a pair of set of states: One, the set of states to explore, called the open

More information

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair, COMP9414/ 9814/ 3411: Artificial Intelligence 5. Informed Search Russell & Norvig, Chapter 3. COMP9414/9814/3411 15s1 Informed Search 1 Search Strategies General Search algorithm: add initial state to

More information

Potential Midterm Exam Questions

Potential Midterm Exam Questions Potential Midterm Exam Questions 1. What are the four ways in which AI is usually viewed? Which of the four is the preferred view of the authors of our textbook? 2. What does each of the lettered items

More information

9/7/2015. Outline for today s lecture. Problem Solving Agents & Problem Formulation. Task environments

9/7/2015. Outline for today s lecture. Problem Solving Agents & Problem Formulation. Task environments Problem Solving Agents & Problem Formulation Defining Task Environments (AIMA 2.3) Environment types Formulating Search Problems Search Fundamentals AIMA 2.3, 3.1-3 2 3 Task environments To design a rational

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching CS486/686 University of Waterloo Sept 11, 2008 1 Outline Problem solving agents and search Examples Properties of search algorithms Uninformed search Breadth first Depth first

More information

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search 1 Class Tests Class Test 1 (Prolog): Tuesday 8 th November (Week 7) 13:00-14:00 LIFS-LT2 and LIFS-LT3 Class Test 2 (Everything but Prolog)

More information

Solving Problems by Searching (Blindly)

Solving Problems by Searching (Blindly) Solving Problems by Searching (Blindly) R&N: Chap. 3 (many of these slides borrowed from Stanford s AI Class) Problem Solving Agents Decide what to do by finding a sequence of actions that lead to desirable

More information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic Problem Solving: Uninformed Search Simple reflex agent only transfers the current percept

More information

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search COMP219: Artificial Intelligence Lecture 10: Heuristic Search Overview Last time Depth-limited, iterative deepening and bi-directional search Avoiding repeated states Today Show how applying knowledge

More information

Chapter 3. A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states.

Chapter 3. A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states. Chapter 3 A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states. A problem can be defined by four components : 1. The

More information

Search EECS 395/495 Intro to Artificial Intelligence

Search EECS 395/495 Intro to Artificial Intelligence Search EECS 395/495 Intro to Artificial Intelligence Doug Downey (slides from Oren Etzioni, based on Stuart Russell, Dan Weld, Henry Kautz, and others) What is Search? Search is a class of techniques for

More information

Robot Programming with Lisp

Robot Programming with Lisp 6. Search Algorithms Gayane Kazhoyan (Stuart Russell, Peter Norvig) Institute for University of Bremen Contents Problem Definition Uninformed search strategies BFS Uniform-Cost DFS Depth-Limited Iterative

More information

Search EECS 348 Intro to Artificial Intelligence

Search EECS 348 Intro to Artificial Intelligence Search EECS 348 Intro to Artificial Intelligence (slides from Oren Etzioni, based on Stuart Russell, Dan Weld, Henry Kautz, and others) What is Search? Search is a class of techniques for systematically

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Informed Search and Exploration Chapter 4 (4.1 4.2) A General Search algorithm: Chapter 3: Search Strategies Task : Find a sequence of actions leading from the initial state to

More information

Informed search strategies (Section ) Source: Fotolia

Informed search strategies (Section ) Source: Fotolia Informed search strategies (Section 3.5-3.6) Source: Fotolia Review: Tree search Initialize the frontier using the starting state While the frontier is not empty Choose a frontier node to expand according

More information

CS 8520: Artificial Intelligence

CS 8520: Artificial Intelligence CS 8520: Artificial Intelligence Solving Problems by Searching Paula Matuszek Spring, 2013 Slides based on Hwee Tou Ng, aima.eecs.berkeley.edu/slides-ppt, which are in turn based on Russell, aima.eecs.berkeley.edu/slides-pdf.

More information

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang Chapter 3: Informed Search and Exploration Dr. Daisy Tang Informed Search Definition: Use problem-specific knowledge beyond the definition of the problem itself Can find solutions more efficiently Best-first

More information

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search Best-first search Idea: use an evaluation function f(n) for each node

More information

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1 Informed Search Dr. Richard J. Povinelli Copyright Richard J. Povinelli Page 1 rev 1.1, 9/25/2001 Objectives You should be able to explain and contrast uniformed and informed searches. be able to compare,

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 TB Artificial Intelligence Slides from AIMA http://aima.cs.berkeley.edu 1 /1 Outline Problem-solving agents Problem types Problem formulation Example problems Basic

More information

Artificial Intelligence Problem Solving and Uninformed Search

Artificial Intelligence Problem Solving and Uninformed Search Artificial Intelligence Problem Solving and Uninformed Search Maurizio Martelli, Viviana Mascardi {martelli, mascardi}@disi.unige.it University of Genoa Department of Computer and Information Science AI,

More information

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE Artificial Intelligence, Computational Logic PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE Lecture 3 Informed Search Sarah Gaggl Dresden, 22th April 2014 Agenda 1 Introduction 2 Uninformed Search

More information

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search CSE 473 Chapter 4 Informed Search CSE AI Faculty Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search Last Time 2 1 Repeated States Failure to detect repeated states can turn a linear

More information

Chapter3. Problem-Solving Agents. Problem Solving Agents (cont.) Well-defined Problems and Solutions. Example Problems.

Chapter3. Problem-Solving Agents. Problem Solving Agents (cont.) Well-defined Problems and Solutions. Example Problems. Problem-Solving Agents Chapter3 Solving Problems by Searching Reflex agents cannot work well in those environments - state/action mapping too large - take too long to learn Problem-solving agent - is one

More information

CS 380: Artificial Intelligence Lecture #4

CS 380: Artificial Intelligence Lecture #4 CS 380: Artificial Intelligence Lecture #4 William Regli Material Chapter 4 Section 1-3 1 Outline Best-first search Greedy best-first search A * search Heuristics Local search algorithms Hill-climbing

More information

Informed (heuristic) search (cont). Constraint-satisfaction search.

Informed (heuristic) search (cont). Constraint-satisfaction search. CS 1571 Introduction to AI Lecture 5 Informed (heuristic) search (cont). Constraint-satisfaction search. Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Administration PS 1 due today Report before

More information

CS486/686 Lecture Slides (c) 2015 P.Poupart

CS486/686 Lecture Slides (c) 2015 P.Poupart 1 2 Solving Problems by Searching [RN2] Sec 3.1-3.5 [RN3] Sec 3.1-3.4 CS486/686 University of Waterloo Lecture 2: May 7, 2015 3 Outline Problem solving agents and search Examples Properties of search algorithms

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence hapter 1 hapter 1 1 Iterative deepening search function Iterative-Deepening-Search( problem) returns a solution inputs: problem, a problem for depth 0 to do result Depth-Limited-Search(

More information

Artificial Intelligence. Informed search methods

Artificial Intelligence. Informed search methods Artificial Intelligence Informed search methods In which we see how information about the state space can prevent algorithms from blundering about in the dark. 2 Uninformed vs. Informed Search Uninformed

More information

PEAS: Medical diagnosis system

PEAS: Medical diagnosis system PEAS: Medical diagnosis system Performance measure Patient health, cost, reputation Environment Patients, medical staff, insurers, courts Actuators Screen display, email Sensors Keyboard/mouse Environment

More information

Multiagent Systems Problem Solving and Uninformed Search

Multiagent Systems Problem Solving and Uninformed Search Multiagent Systems Problem Solving and Uninformed Search Viviana Mascardi viviana.mascardi@unige.it MAS, University of Genoa, DIBRIS Classical AI 1 / 36 Disclaimer This presentation may contain material

More information

CS486/686 Lecture Slides (c) 2014 P.Poupart

CS486/686 Lecture Slides (c) 2014 P.Poupart 1 2 1 Solving Problems by Searching [RN2] Sec 3.1-3.5 [RN3] Sec 3.1-3.4 CS486/686 University of Waterloo Lecture 2: January 9, 2014 3 Outline Problem solving agents and search Examples Properties of search

More information

Problem Solving and Search. Chapter 3

Problem Solving and Search. Chapter 3 Problem olving and earch hapter 3 Outline Problem-solving agents Problem formulation Example problems asic search algorithms In the simplest case, an agent will: formulate a goal and a problem; Problem-olving

More information

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S LECTURE 2 SEARCHING IN STATE GRAPHS Introduction Idea: Problem Solving as Search Basic formalism as State-Space Graph Graph explored by Tree Search Different algorithms to explore the graph Slides mainly

More information

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria 1 References Skriptum (TU Wien, Institut für Informationssysteme, Thomas Eiter

More information

Informed search algorithms

Informed search algorithms Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic Uninformed (blind) search algorithms can find an (optimal) solution to the problem,

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Agents, Goal-Based Agents, Problem-Solving Agents Search Problems Blind Search Strategies Agents sensors environment percepts actions? agent effectors Definition. An agent

More information

Solving Problems by Searching

Solving Problems by Searching Solving Problems by Searching Agents, Goal-Based Agents, Problem-Solving Agents Search Problems Blind Search Strategies Agents sensors environment percepts actions? agent effectors Definition. An agent

More information

AI: problem solving and search

AI: problem solving and search : problem solving and search Stefano De Luca Slides mainly by Tom Lenaerts Outline Problem-solving agents A kind of goal-based agent Problem types Single state (fully observable) Search with partial information

More information

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search -

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search - Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search - Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria 1 References Skriptum (TU Wien, Institut für Informationssysteme,

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 Problem formulation & examples Basic search algorithms Outline Chapter 3 2 On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest

More information

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

mywbut.com Informed Search Strategies-I

mywbut.com Informed Search Strategies-I Informed Search Strategies-I 1 3.1 Introduction We have outlined the different types of search strategies. In the earlier chapter we have looked at different blind search strategies. Uninformed search

More information

DFS. Depth-limited Search

DFS. Depth-limited Search DFS Completeness? No, fails in infinite depth spaces or spaces with loops Yes, assuming state space finite. Time complexity? O(b m ), terrible if m is much bigger than d. can do well if lots of goals Space

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Academic year 2016/2017 Giorgio Fumera http://pralab.diee.unica.it fumera@diee.unica.it Pattern Recognition and Applications Lab Department of Electrical and Electronic Engineering

More information

Search I. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig

Search I. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig Search I slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig Problem-Solving Agents Intelligent agents can solve problems by searching a state-space State-space Model the agent s model of

More information

Informed search algorithms. Chapter 4, Sections 1 2 1

Informed search algorithms. Chapter 4, Sections 1 2 1 Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Chapter 3: Solving Problems by Searching

Chapter 3: Solving Problems by Searching Chapter 3: Solving Problems by Searching Prepared by: Dr. Ziad Kobti 1 Problem-Solving Agent Reflex agent -> base its actions on a direct mapping from states to actions. Cannot operate well in large environments

More information

Problem solving and search

Problem solving and search Problem solving and search Chapter 3 Chapter 3 1 How to Solve a (Simple) Problem 7 2 4 1 2 5 6 3 4 5 8 3 1 6 7 8 Start State Goal State Chapter 3 2 Introduction Simple goal-based agents can solve problems

More information

Outline. Solving problems by searching. Problem-solving agents. Example: Romania

Outline. Solving problems by searching. Problem-solving agents. Example: Romania Outline Solving problems by searching Chapter 3 Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Systems 1 Systems 2 Problem-solving agents Example: Romania

More information

CS414-Artificial Intelligence

CS414-Artificial Intelligence CS414-Artificial Intelligence Lecture 6: Informed Search Algorithms Waheed Noor Computer Science and Information Technology, University of Balochistan, Quetta, Pakistan Waheed Noor (CS&IT, UoB, Quetta)

More information

Algorithm Design Techniques (III)

Algorithm Design Techniques (III) Algorithm Design Techniques (III) Minimax. Alpha-Beta Pruning. Search Tree Strategies (backtracking revisited, branch and bound). Local Search. DSA - lecture 10 - T.U.Cluj-Napoca - M. Joldos 1 Tic-Tac-Toe

More information

Solving problems by searching

Solving problems by searching Solving problems by searching CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2017 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Problem-solving

More information

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search:

Outline for today s lecture. Informed Search. Informed Search II. Review: Properties of greedy best-first search. Review: Greedy best-first search: Outline for today s lecture Informed Search II Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing 2 Review: Greedy best-first search: f(n): estimated

More information

Solving problems by searching. Chapter 3

Solving problems by searching. Chapter 3 Solving problems by searching Chapter 3 Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms 2 Example: Romania On holiday in Romania; currently in

More information

Solving problems by searching

Solving problems by searching Solving problems by searching CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2014 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Outline Problem-solving

More information

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty) Informed search algorithms Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty) Intuition, like the rays of the sun, acts only in an inflexibly

More information

Informed search algorithms

Informed search algorithms Artificial Intelligence Topic 4 Informed search algorithms Best-first search Greedy search A search Admissible heuristics Memory-bounded search IDA SMA Reading: Russell and Norvig, Chapter 4, Sections

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Dr Ahmed Rafat Abas Computer Science Dept, Faculty of Computers and Informatics, Zagazig University arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Informed search algorithms

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 3, 4/6/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes 4/6/2005 EE562 1 Today: Basic

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Introduction to Artificial Intelligence. Informed Search

Introduction to Artificial Intelligence. Informed Search Introduction to Artificial Intelligence Informed Search Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Best-first search A search Heuristics B. Beckert:

More information

CS 771 Artificial Intelligence. Informed Search

CS 771 Artificial Intelligence. Informed Search CS 771 Artificial Intelligence Informed Search Outline Review limitations of uninformed search methods Informed (or heuristic) search Uses problem-specific heuristics to improve efficiency Best-first,

More information

Search and Optimization

Search and Optimization Search and Optimization Search, Optimization and Game-Playing The goal is to find one or more optimal or sub-optimal solutions in a given search space. We can either be interested in finding any one solution

More information