
Artificial Intelligence - Problem Solving by Searching Techniques
Explore problem-solving by searching techniques in artificial intelligence, where agents plan and execute actions to reach goals in defined environments. Understand the formulation of problems, search algorithms, and the process of finding sequential actions to achieve objectives efficiently.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
College of Engineering & Technology Computer Techniques Engineering Department Artificial Intelligence Stage 3 Artificial Intelligence Artificial Intelligence Lecture 4 Solving Problems by Searching
Solving Problems by Searching Solving Problems by Searching The solution to any problem is a fixed sequence of actions. For example , an agent might plan to drive from Baghdad to Basrah. If the agent know the initial state And the environment is know and deterministic. Then the solution can specify only one possible second action
Solving Problems by Searching Solving Problems by Searching The process for looking for a sequence of actions that reaches the goal is called search. The search algorithm takes problem as input and returns a solution in the form of action sequence. Once the solution is found, the actins it recommended can be carried out. This is called execution phase. formulate, search , execute
Defined problems and Solutions (Formulate) Defined problems and Solutions (Formulate) 1. The initial state the agent starts in. 2. A description of the possible actions available to the agent. 3. A description of what each action does (Transition model), specified by a function RESULT(s,a). Initial state and transition model define the state space. The state space forms a network or graph in which nodes are states and the links between nodes are actions. A path is a sequence of states connected by sequence of actions. 4. Goal test, determines whether a given state is a goal state. 5. Cost function that assigns a numeric cost to each path.
Example Problem (Vacuum world) Example Problem (Vacuum world)
Example Problem 1 (Vacuum world) Example Problem 1 (Vacuum world) 1. States: the state is determined by both the agent location and the dirt locations. Agent is in one of two locations, each of which might or might not contain dirt. Thus, there are 2 X 22 = 8 possible world states. 2. Initial state: any state can be designated as the initial state. 3. Action: in this simple environment, each state has just three actions: Left, Right, and Suck. 4. Transition model: the actions have their expected effects, except that moving left in the leftmost square, moving right in the right most square, and sucking in a clean square have no effect. 5. Goal test: this checks whether all squares are clean. 6. Path cost: each step cost 1, so the path cost is the number of steps in the path.
Example Problem 2 (8 Example Problem 2 (8- -puzzle) puzzle)
Example Problem 2 (8 Example Problem 2 (8- -puzzle) puzzle) 1. States: a state description specifies the location of each eight tiles and the blank in one of the nine squares. 2. Initial state: any state can be designated as the initial state. 3. Actions: the simplest formulation defines the actions as movements of the blank space: Left, Right, Up, or Down. 4. Transition model: given a state and action, this returns the resulting state, for example if we apply Left to the start state in the above figure, the resulting state has the 5 and the blank switched. 5. Goal test: this checks whether the state matches the goal configuration. 6. Path cost: each step costs 1, so the path cost is the number of steps in the path.
Real World Problems Real World Problems 1. Route-finding: is defined in terms of specified locations and transition along links between them. 1. Car navigation 2. Routing video streams in computer networks 3. Military operations planning 4. Airline travel planning
Other Real World Problems Other Real World Problems 1. Touring Problems 2. Traveling salesperson problem (TSP) 3. A VLSI layout problem (positioning components and connections on a chip) 4. Robot navigation 5. Assembly sequencing of complex objects.
Searching for Solutions Searching for Solutions 1. A solution is an action sequence. 2. Search algorithms work by considering various possible action sequence. 3. Start from the initial state form a search tree with the initial state a the root 4. The branches are actions and the nodes correspond to the states in the state space
Searching for Solutions Searching for Solutions
Measuring problem Measuring problem- -solving performance solving performance 1. Completeness : the algorithm guaranteed to find solution when there is one. 2. Optimality: does the strategy find the optimal solution. 3. Time complexity: how long does it take to find a solution 4. Space complexity: how much memory is needed to perform the search
Uninformed Search Strategies (Blind Search) Uninformed Search Strategies (Blind Search) The term blind means that the strategies have no additional information about states beyond that provided in the problem detention. All they can do is generate successors and distinguish a goal stat from non-goal state. All Search Strategies are Distinguished by the order in with nodes are expanded
Uninformed Search Strategies (Blind Search) Uninformed Search Strategies (Blind Search) 1. Breadth-First Search 2. Uniform Cost Search 3. Depth-First Search 4. Depth limited search 5. Iterative deepening depth first search. 6. Biodirectional search
Breadth Breadth- -First Search First Search It is simple strategy in which root node is expanded first. Successors of the root are expanded next. Then their successors, and so on. All the nodes are expanded at a given depth in the search tree before and nodes at the next level are expanded.
Breadth Breadth- -First Search First Search
Breadth Breadth- -First Search First Search In breadth-first search algorithm the shallowest node is chosen for expansion. This is achieved very simply by using FIFO queue New nodes which are always deeper than their parent go to the back of the queue.
Breadth Breadth- -First Search Performance First Search Performance Breadth-first search is complete Breadth-first is optimal if the path cost is a nondecreasing function. TIME and MEMORY
Breadth Breadth- -First Search Performance First Search Performance TIME and MEMORY
Thanks for Your Attention Thanks for Your Attention