Chap 4 Searching Techniques Artificial Intelligence 605451 Dr





































- Slides: 37

Chap 4: Searching Techniques Artificial Intelligence 605451 Dr. Hassan Al-Tarawneh

Motivation Attempt the end, and never stand to doubt, nothing’s so hard, but search will find it out “Robert Herrick”

What we will cover ? Ideas in searching ¢ Searching tree representation ¢ Uninformed and informed search ¢ Game playing search ¢

Problem as a State Space Search ¢ To build as system to solve a particular problem, we need: l Define the problem: must include precise specifications ~ initial solution & final solution. l Analyze the problem: select the most important features that can have an immense impact. l Isolate and represent : convert these important features into knowledge representation. l Problem solving technique(s): choose the best technique and apply it to particular problem.

The Quest ¢ Typical questions that need to be answered: l Is the problem solver guaranteed to find a solution? l Will the system always terminate or caught in a infinite loop? l If the solution is found, it is optimal? l What is the complexity of searching process? l How the system be able to reduce searching complexity? l How it can effectively utilize the representation paradigm?

Important Terms ¢ ¢ ¢ Search space possible conditions and solutions. Initial state where the searching process started. Goal state the ultimate aim of searching process. Problem space “what to solve” Searching strategy for controlling the search. Search tree representation of search space, showing possible solutions from initial state.

Example: The Bridges of Konigsberg Problem • Classical graph applications. • Introduced by Leonhard Euler. • Problem: Can a person walk around the city crosses each bridge exactly once?

Example: The Bridges of Konigsberg Problem (cont) A b 6 b 1 b 3 b 5 B b 4 b 2 C b 7 D Predicates: Connect (B, C, b 5)

Example: Traveling Salesperson Problem • Suppose a salesperson has five cities to visit and them must return home. Goal find the shortest path to travel. A B 75 125 75 100 50 E 125 C 50 D 100

Searching for Solution • Search through state space (explicitly using searching tree). • Node expansion : - generating new node related to previous nodes. • Concepts: • State : - conditions in which the node corresponds. • Parent node : - the superior node • Path cost : - the cost, from initial to goal state. • Depth: - number of steps along the path from initial state

Node expansion

Node expansion (initial)

Node expansion (expanding Arad)

Node expansion (expanding Sibiu)

Measuring Searching Performance • The output from problem-solving (searching) algorithm is either FAILURE or SOLUTION. • Four ways: • Completeness : is guaranteed to find a solution? • Optimality: does it find optimal solution ? • Time complexity: how long? • Space complexity: how much memory? • Complexity : branching factor (b), depth (d), and max. depth (m)

Searching Strategies • Blind search traversing the search space until the goal nodes is found (might be doing exhaustive search). • Techniques : Breadth First Uniform Cost , Depth first, Interactive Deepening search. • Guarantees solution. • Heuristic search process takes place by traversing search space with applied rules (information). • Techniques: Greedy Best First Search, A* Algorithm • There is no guarantee that solution is found.

Blind Search : Breadth First Search (BFS) • Strategy ~ search all the nodes expanded at given depth before any node at next level. • Concept : First In First Out (FIFO) queue. • Complete ? : Yes with finite b (branch). • Complexity: • Space : similar to complexity – keep nodes in every memory • Optimal ? = Yes (if cost =1)

Blind Search : Breadth First Search 1 2 3 4

Blind Search : Depth First Search (DFS) • Strategy ~ search all the nodes expanded in deepest path. • Last In First Out concept. • Complete ? : No • Complexity: • Space : O(bm) – b ; branching factor, m ; max. depth • Optimality ? : No

Blind Search : Depth First Search (DFS) 1 4 3 2 5 N+1 …….

Blind Search : Iterative Deepening DFS (ID-DFS) • Strategy ~ combines DFS with best depth limits. • Gradually increase the limit; L=0, L=1… and so on. • Complete ? : Yes (if b is finite) • Complexity: • Space : • Optimality ? : yes (if path costs are all identical)

Blind Search : Iterative Deepening DFS (ID-DFS)

Summary

Heuristic Search : h(n)=67 h(n)=34 • Important aspect: formation of heuristic function (h(n)). • Heuristic function additional knowledge to guide searching strategy (short cut). • Distance: heuristic function can be straight line distance (SLD) E A* D h(n)=12 B h(n)=24 h(n)=9 C* h(n)=0

Heuristic Search : Heuristic Function

Heuristic Search : Greedy. Best Search • Tries to expand the node that is closest to the goal. • Evaluates using only heuristic function : f(n) = h(n) • Possibly lead to the solution very fast. • Problem ? ~ can end up in sub-optimal solutions (doesn’t take notice of the distance it travels). • Complexity and time: • Complete & optimal ? : No (stuck in infinite loop)

Heuristic Search : Greedy. Best Search 1 2

Heuristic Search : Greedy. Best Search 3

Heuristic Search : A* Algorithm • Widely known algorithm – (pronounced as “A star” search). • Evaluates nodes by combining g(n) “cost to reach the node” and h(n) “cost to get to the goal” • f(n) = g(n) + h(n), f(n) estimated cost of the cheapest solution. • Complete and optimal ~ since evaluates all paths. • Time ? ~ a bit time consuming • Space ? ~ lot of it!

Heuristic Search : A* Algorithm Path cost for S-D-G f(S) = g(S) + h(S) = 0 + 10 f(D) = (0+3) + 9 12 f(G) = (0+3+3) + 0 6 S : 10 3 2 D A : 8 5 2 E G’ : 4 : 0 : 9 Total path cost = f(S)+f(D)+f(G) 28 1 3 G : 0 * Path S-A-G is chosen = Lowest cost Path cost for S-A-G’ f(S) = 0 + 10 : 3 f(A) = (0+2) + 8 10 f(G’) = (0+2+2) + 0 4 H Total path cost = f(S)+f(A)+f(G’) 24

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm TIN 5013: Artificial Intelligence

Heuristic Search : A* Algorithm

Heuristic Search : A* Algorithm TIN 5013: Artificial Intelligence

Issues in Heuristic Search • Searching using heuristic function does not solely on directed solution but the best algorithm to find shortest path towards goal. • Admissible attempt to find possible shortest path to a goal whenever it exists. • Informedness question in what sense the heuristic function is better than another. • Monotonicity question if the best state is discovered by heuristic search, is there any guarantee that the same state won’t be found later at lowest searching cost?

References ¢ ¢ Cawsey, A. (1998). The Essence of Artificial Intelligence, Prentice Hall. Russell, S. and Norvig, P. (2003). Artificial Intelligence: A Modern Approach, Prentice. Hall 2 nd Edition.
Best for search
Solving problems by searching artificial intelligence
Problem solving by searching in artificial intelligence
Solving problems by searching artificial intelligence
Searching for solutions in artificial intelligence
Chap chap slide
Internet search techniques
Search strategy google scholar
Bibliographic searching techniques
Knowledge manipulation in artificial intelligence
Rote learning in artificial intelligence
Snapdragon artificial intelligence
Machine learning promotion effectiveness
Differentiate between strips language and adl
Informed and uninformed search
Waltz algorithm in artificial intelligence
Math for artificial intelligence
Uninformed search algorithm
References for artificial intelligence
8 emerging technologies
Hbr artificial intelligence
A programmable electronic device designed to accept data
Int404
R1/xcon expert system
Artificial intelligence thesis proposals
Artificial intelligence applications institute
The number of fuzzy propositions are
Artificial intelligence the next digital frontier
Steps towards artificial intelligence
Fundamentals of artificial intelligence
Types of artificial intelligencel
Artificial intelligence applications institute
Artificial intelligence devices
Artificial intelligence devices
Types of knowledge in artificial intelligence
Chronological backtracking in depth first search involves
Unit 7 artificial intelligence
Strips planning in artificial intelligence