Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence

Similar presentations


Presentation on theme: "Artificial Intelligence"— Presentation transcript:

1 Artificial Intelligence
Solving Problems By Searching Chapter 3 Solving Problems by Searching*

2 Outline of this Chapter
Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms Solving Problems by Searching*

3 Problem-solving agents
Kind of goal-based agent, find sequence of actions that achieve goals. Before an agent starts searching for solutions, it will first formulate its goal, then use the goal to formulate a problem whose solution is a path (sequence of actions) to the goal, and then it will solve the problem using search. Search: The finding of a path from a start state to a goal state. Goal formulation: A goal is a set of desirable world-states, just those states in which the goal is satisfied. The first step in problem-solving Problem formulation: Process of deciding what actions & states to consider and follows goal formulation. Solving Problems by Searching*

4 Solving Problems by Searching*
Example On holiday in KSA; currently in Riyadh. Formulate goal: be in Mecca Formulate problem: states: various cities actions: drive between cities Find solution: sequence of cities, e.g., Riyadh, Taiif, Jeddah, Meccah Solving Problems by Searching*

5 Solving Problems by Searching*
Problem types They are 4 essentially different types of problems: Single state problems: exact state known, & effects of actions known Multiple state problems (sensorless): agent has to consider several possible initial states, & effects of actions known. 3. Contingency problems (need sensing): if actions are uncertain / Env is partially observable  agent’s percept provide new information. Each possible percept defines a contingency that must be planed for. 4. Exploration problems: agent doesn’t know the outcome of its actions, it experiments to discover states of the world and outcomes of actions. Solving Problems by Searching*

6 Example: Single state problems
Let the world be consist of only 2 locations - Left and Right Box Intelligent agent  robot vacuum cleaner Sensors tell which sate it is in Known what each actions does Possible actions: move left, move right, and suck. Goal: we want all the dirt cleaned up. the goal is the state set {7, 8}. If the initial state is Can calculate the action sequence to get to a goal state. [Right, Suck] Solving Problems by Searching*

7 Example: Multiple state problems
Suppose that the robot has no sensor that can tell it which room it is in and it doesn't know where it is initially. Must consider sets of possible states. Initial state is one of the set {1,2,3,4,5,6,7,8} e.g. since it knows what its actions do, it can be calculated that an action of Right will achieve one of the states {2,4,6,8} the agent can discover that the action sequence to reach a goal state. [Right,Suck,Left,Suck] Solving Problems by Searching*

8 Example: Contingency problems
Murphy's Law: Suck can deposits dirt on the clean carpet. [Right,Suck,Left,Suck] NOT a correct plan, as one room might be clean originally, but then become dirty. There is no FIXED plan that always works. Initial state is 5, calculate the the action sequence. [Right; if dirt then Suck] This requires sensing during the execution phase. Exploration problems the robot is ignorant of which rooms are dirty today, but the robot knows how many rooms there are and what the effect of each available action is. Suppose the robot is completely ignorant. Then it must take actions for the purpose of acquiring knowledge about their effects, NOT just for their contribution towards achieving a goal. This is called "exploration" and the agent must do learning about the environment. Solving Problems by Searching*

9 Well-defined problems
Problem: collection of information that the agent will use to decide what to do. A problem consists of 4 parts: Initial state: starting point from which the agent sets out e.g., "at Riyadh" Operator/Actions: describe the set of possible actions that the agent might take, also called as Successor Function e.g. S(Riyadh) = {< Riyadh  Taiif, Taiif >, … } Goal test: determines whether a given state is a goal state e.g., x = "at Mecca" path cost: relevant if more than one path leads to the goal, and we want the shortest path. Sum of the costs of the individual actions along a path from one state to another. e.g., sum of distances, number of actions executed, etc. The environment of the problem is represented by: State space: Set of all states in search set of all states reachable from the initial state by any sequence of actions. Path is any sequence of actions leading from one state to another. Solution: path from the initial state to a goal state Solving Problems by Searching*

10 Solving Problems by Searching*
Example problems We can distinguish between 2 types of problems: Toy problems Illustrate different problem-solving methods. Can be easily used by different researchers to compare the performance of algorithms. Real-world problems More difficult & whose solutions people care about Examples of both problems will be given next. Solving Problems by Searching*

11 Toy Problems: The 8-puzzle
The Object of the puzzle is to slide the tiles horizontally or vertically into the empty space until the configuration matches the goal States: locations of tiles (including blank tile) Actions: move blank left, right, up, down goal test: state matches the goal configuration shown above path cost: each move costs 1, total path cost = No of steps Solving Problems by Searching*

12 Real-World problems examples
Example1: Travelling Salesperson problem (TSP) A salesman has a list of cities, each of which he must visit exactly once (optimisation). There are direct roads between each pair of cities. Find the route the salesman should follow for the shortest possible round trip that starts and finishes at any one of the cities. Goal: Find shortest tour. Example 2:VLSI layout Components (chips, resistors, etc) and interconnections (wires) Find optimal way to place components on a printed circuit board, under the constraint that only a small No of wire layers are available, and do no overlap on a given layer. The problem is too complex to guarantee an optimal solution Example 3: Route Finding (RF) RF algorithm is used in a variety of applications such as: Routing in computer networks Airline travel planning system Goal: the best path between the origin and the destination Solving Problems by Searching*


Download ppt "Artificial Intelligence"

Similar presentations


Ads by Google