Professional Documents
Culture Documents
CT017-3-1
Learning outcomes
At the end of the session, you should be able to:
Explain problem characteristics Explain the cost of doing search Traverse a search tree using depth-first search Explain iterative deepening search Discuss how to evaluate blind searches in relation to cost
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Slide 2 of 16
Problem characteristics
Issues to consider: is the problem decomposable? can solution steps be ignored or undone? is the universe predictable? is a good solution absolute or relative? is the solution a state or a path? what is the role of knowledge?
Basic Concept of AI
Slide 3 of 16
Basic Concept of AI
Slide 4 of 16
Other considerations
Completeness - can find solution?
Can the algorithm guarantee the solution
Search performance
The factors to determine:
Branching factor - how many branches can be applied at any time? Depth level - how long is the path to the closest solution?
Slide 6 of 16
Search cost
Sometimes referred to as path cost based on previous example:
The path cost from node A to node B is 6, from node B to node D is 3 and so on.
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Slide 7 of 16
Implementation
Using breadth-first search for this search tree, The path is A-B-C-D-ED-G The path cost is 6+4+3+2+2+14 = 31
Basic Concept of AI
Slide 8 of 16
Objective of search
To find the shortest path (least cost) from the initial state to the goal state
Basic Concept of AI
Slide 9 of 16
Depth-first search
It searches through the tree systematically, exploring each branch in turn to its tip until it finds a goal node.
Basic Concept of AI
Slide 10 of 16
Example
The path traversed is A-B-D-C-G. Stop since G is found. The path cost: 6+3+2+14=25
Basic Concept of AI
Slide 11 of 16
Basic Concept of AI
Slide 12 of 16
Implementation
1st iteration: Starts with A node
Queue content
A Visit A Empty
Slide 13 of 16
Implementation
2nd iteration:
Start with A Queue content A
B,C C empty
Basic Concept of AI
Slide 14 of 16
Implementation
3rd iteration: Starts with node A Queue content
A
A visited & Expanded B,C B visited, expand B D,E,C Visit D E,C Visit E C C visited, expand C D,G Visit D G Visit G empty Goal found. Stop searching.
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Slide 15 of 16
16
Slide 16 of 16
Basic Concept of AI
17
Slide 17 of 16
Basic Concept of AI
18
Slide 18 of 16
Basic Concept of AI
Fig 4.15
19
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Luger: Artificial Intelligence, 6th edition. Pearson Education Limited, 2009 Slide 19 of 16
20
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Luger: Artificial Intelligence, 6th edition. Pearson Education Limited, 2009 Slide 20 of 16
B = Branching factor
D = Depth of solution (shallowest goal solution) M = Maximum depth of the search tree
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Slide 21 of 16
Research
Go to the library and research the at least 2 additional search techniques (besides the ones covered in the lecture). Your answer should also state when will the search techniques be applied.
Basic Concept of AI
Slide 22 of 16
Tutorial 4
1) Find more information about the optimum and completeness criteria in relation to depth first search.
Basic Concept of AI
Slide 23 of 16
Optimal
In depth first search, algorithm works by traversing to left most branch to the deepest level to find goal state. If the goal state is not found in that left most branch, traversing need be continued to the right branch.
Basic Concept of AI
Slide 24 of 16
Completeness
In general DFS is not complete because it doesnt find any solution that lies beyond the given search depth (infinite depth level)
Basic Concept of AI
Slide 25 of 16
Any questions?
Basic Concept of AI
Slide 26 of 16
Next topic
Define knowledge Types of knowledge Knowledge representation Introduction to AIML
Basic Concept of AI
Slide 27 of 16
Types of search
Blind search (uninformed search) Without any specific domain knowledge Search without any additional knowledge Breadth-first search Depth-first search Iterative deepening search Bidirectional search Uniform cost search Beam search Branch and bound search Informed search (heuristics) Has some functions to guide the search A* search Best first search Hill climbing search Least cost search
CT017-3-1 Introduction to Artificial Intelligence Basic Concept of AI Slide 28 of 16
Basic Concept of AI
Slide 29 of 16
Basic Concept of AI
Slide 30 of 16
Best-First Search
Combines the advantages of Breadth-First and Depth-First searchs.
DFS: follows a single path, dont need to generate all competing paths. BFS: doesnt get caught in loops or dead-endpaths.
Best First Search: explore the most promising path seen so far.
Basic Concept of AI
Slide 31 of 16
Basic Concept of AI
Slide 32 of 16
Basic Concept of AI
Slide 33 of 16