Artificial Intelligence (CS 370D)

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Uninformed search strategies
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
Lets remember about Goal formulation, Problem formulation and Types of Problem. OBJECTIVE OF TODAY’S LECTURE Today we will discus how to find a solution.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence (CS 461D)
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Review: Search problem formulation
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
Solving problems by searching A I C h a p t e r 3.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3 Problem Solving through search Uninformed Search
Lecture 3: Uninformed Search
Uninformed (also called blind) search algorithms)
Breadth First and Depth First
Problem Solving Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
Uninformed Search Chapter 3.4.
Problem Solving by Searching
Uninformed Search Strategies
Problem Solving as Search
Artificial Intelligence Problem solving by searching CSC 361
Uninformed Search Introduction to Artificial Intelligence
Artificial Intelligence
Solving problems by searching
CS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Fall 2008
Lecture 1B: Search.
SOLVING PROBLEMS BY SEARCHING
Problem Solving and Searching
What to do when you don’t know anything know nothing
EA C461 – Artificial Intelligence
Artificial Intelligence
Artificial Intelligence
Searching for Solutions
Problem Solving and Searching
Principles of Computing – UFCFA3-30-1
Tree Searching.
Problem Spaces & Search
Tree Searching.
Tree Searching.
Tree Searching.
Problem Spaces & Search
UNINFORMED SEARCH -BFS -DFS -DFIS - Bidirectional
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
CS 416 Artificial Intelligence
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Solving Problems by Searching
Artificial Intelligence: Theory and Practice Ch. 3. Search
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

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

(Chapter-3-Part2) Problem Solving and Search Dr. Abeer Mahmoud (Course coordinator)

Searching algorithm Uninformed Search Algorithms( Blind Search) 3.1 Breadth first Search 3.2 Depth First Search 3.3 Depth limited Search 3.4 Iterative Deeping Search 3. 5 Bidirectional Search Informed Search (Heuristic Search) Best First Search Greedy Search Perfect Information Search A* Search Iterative Deepening A* Search A* with PathMax

Uninformed Search Algorithms( Blind Search) Breadth first Search Uniform Cost Search (UCS) Depth First Search Depth limited Search Iterative Deeping Search Bidirectional Search

Blind Searches - Characteristics Simply searches the State Space Can only distinguish between a goal state and a non- goal state Blind Searches have no preference as to which state (node) that is expanded next. The different types of blind searches are characterised by the order in which they expand the nodes.

1-Breadth first Search Use a queuing function that adds nodes to the end of the queue (FIFO) Expand Root Node First Expand all nodes at level 1 before expanding level 2 OR Expand all nodes at level d before expanding nodes at level d+1 Assuming all nodes that are visited first will be expanded first

1-Breadth-first searching A breadth-first search (BFS) explores nodes nearest the root before exploring nodes further away For example, after searching A, then B, then C, the search proceeds with D, E, F, G Node are explored in the order A B C D E F G H I J K L M N O P Q J will be found before N L M N O P G Q H J I K F E D B C A

Evaluating Breadth First Search Observations Very systematic If there is a solution breadth first search is guaranteed to find it If there are several solutions then breadth first search will always find the shallowest (having little depth) goal state first and if the cost of a solution is a non-decreasing function of the depth then it will always find the cheapest solution

Evaluating Breadth First Search 𝒃 𝟐 at level d Space Complexity : 1 + b + b2 + b3 + ... + bd i.e O(bd) Time Complexity : 1 + b + b2 + b3 + ... + bd i.e. O(bd) Where b is the branching factor and d is the depth of the search tree Note : The space/time complexity could be less as the solution could be found anywhere on the dth level.

Evaluating Breadth First Search Every node that is generated must remain in memory so space complexity is therefore as time complexity Memory requirements are a bigger problem for breadth first search than is the execution

2-Uniform Cost Search (UCS) Expand the cheapest node. Main idea: Expand the cheapest node. Where the cost is the path cost g(n). Implementation: Enqueue nodes in order of cost g(n) in the queue frontier(insert in order of increasing path cost). If a node n already exists in Frontier and a new path to n is found with a smaller cost, remove the node n from Frontier and insert the new node n with the new cost into Frontier

Uniform Cost Search (UCS)

Uniform Cost Search (UCS)

Uniform Cost Search (UCS)

Uniform Cost Search (UCS)

Uniform Cost Search (UCS)

Uniform Cost Search (UCS)

Uniform Cost Search (UCS) UCS is an extension of BFS to the weighted-graph case (UCS = BFS if all edges have the same cost). Complete? Yes Time? O(bd) Space? : O(bd), note that every node in the fringe keep in the queue. Optimal? Yes

3-Depth-first searching A depth-first search (DFS) explores a path all the way to a leaf before backtracking and exploring another path For example, after searching A, then B, then D, the search backtracks and tries another path from B Node are explored in the order A B D B E H L H M H N H E I O I P I E B A C F C G J G K Q N will be found before J L M N O P G Q H J I K F E D B C A

Always expands the deepest node in the current fringe The search proceeds immediately to deepest level of search tree , where nodes have no successors As those nodes are expanded they are dropped from fringe Can be implemented by LIFO queue (stack) For memory , this algorithm need only to store one path

4-Depth-limited search solution The depth first search disadvantage is that the algorithm go deep and deep while solution may be near root It is depth-first search with an imposed limit on the depth of exploration, to guarantee that the algorithm ends.

Depth-limited search = depth-first search with depth limit l, i.e., nodes at depth l have no successors Recursive implementation:

5-Iterative Deeping Search The algorithm consists of iterative, depth-first searches, with a maximum depth that increases at each iteration. Maximum depth at the beginning is 1. Only the actual path is kept in memory; nodes are regenerated at each iteration. DFS problems related to infinite branches are avoided. To guarantee that the algorithm ends if there is no solution, a general maximum depth of exploration can be defined.

5-Iterative Deeping Search Depth-limited search, with depth = 0 then again with depth = 1 then again with depth = 2 ... until you find a solution

5-Iterative Deeping Search Depth = 0 Depth Limit = 0

5-Iterative Deeping Search Depth = 0 Depth Limit = 1

5-Iterative Deeping Search Depth = 0 Depth Limit = 2 Depth = 1 Depth = 2

5-Iterative Deeping Search Depth = 0 Depth Limit = 3 Depth = 1 Depth = 2 Depth = 3

6-Bidirectional Search Start searching forward from initial state and backwards from goal, and try to meet in the middle

Thank you End of Chapter 3-Part2