1. AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and
Data Science
Session 6
by
Asst.Prof.M.Gokilavani
NIET
11/14/2023 Department of AI & DS 1
2. TEXTBOOK:
• Artificial Intelligence A modern Approach, Third
Edition, Stuart Russell and Peter Norvig, Pearson
Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight
(TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny
Winston, Pearson Education.
• Artificial Intelligence, Shivani Goel, Pearson
Education.
• Artificial Intelligence and Expert Systems- Patterson,
Pearson Education.
11/14/2023 Department of CSE (AI/ML) 2
3. Topics covered in session 6
11/14/2023 Department of CSE (AI/ML) 3
Unit I: Intelligent Agent
• Introduction to AI
• Agents and Environments
• Concept of Rationality
• Nature of environment
• Structure of Agents
• Problem solving agents
• Search Algorithm
• Uniform search Algorithm
4. Search Tree
• The essence of searching
– in case the first choice is not correct
– choosing one option and keep others for later inspection
• Hence we have the search strategy
– which determines the choice of which state to expand
– good choice fewer work faster
• Important:
– state space ≠ search tree
• State space
– has unique states {A, B}
– while a search tree may have cyclic paths: A-B-A-B-A-B- …
• A good search strategy should avoid such paths
11/14/2023 Department of CSE (AI/ML) 4
5. Search tree
11/14/2023 Department of CSE (AI/ML) 5
• A node is having five
components:
– STATE: which state it is in the state
space
– PARENT-NODE: from which node it is
generated
– ACTION: which action applied to its
parent-node to generate it
– PATH-COST: the cost, g(n), from
initial state to the node n itself
– DEPTH: number of steps along the
path from the initial state
6. Measuring problem-solving performance
The evaluation of a search strategy
– Completeness:
• is the strategy guaranteed to find a solution when there is one?
– Optimality:
• does the strategy find the highest-quality solution when there are
several different solutions?
– Time complexity:
• how long does it take to find a solution?
– Space complexity:
• how much memory is needed to perform the search?
11/14/2023 Department of CSE (AI/ML) 6
7. Measuring problem-solving performance
• In AI, complexity is expressed in
– b, branching factor, maximum number of successors of any node
– d, the depth of the shallowest goal node. (depth of the least-cost solution)
– m, the maximum length of any path in the state space
• Time and Space is measured in
– number of nodes generated during the search
– maximum number of nodes stored in memory
• For effectiveness of a search algorithm
– we can just consider the total cost
– The total cost = path cost (g) of the solution found + search cost
• search cost = time necessary to find the solution
• Tradeoff:
– (long time, optimal solution with least g)
– vs. (shorter time, solution with slightly larger path cost g)
11/14/2023 Department of CSE (AI/ML) 7
8. Properties of Search Algorithms
• Following are the four essential properties of search algorithms to compare
the efficiency of these algorithms:
• Completeness: A search algorithm is said to be complete if it guarantees to
return a solution if at least any solution exists for any random input.
• Optimality: If a solution found for an algorithm is guaranteed to be the
best solution (lowest path cost) among all other solutions, then such a
solution for is said to be an optimal solution.
• Time Complexity: Time complexity is a measure of time for an algorithm
to complete its task.
• Space Complexity: It is the maximum storage space required at any point
during the search, as the complexity of the problem.
11/14/2023 8
Department of CSE (AI/ML)
9. Types of search algorithms
Based on the search problems we can classify the
search algorithms into
– uninformed (Blind search) search and
– informed search (Heuristic search) algorithms.
11/14/2023 9
Department of CSE (AI/ML)
11. Uninformed/Blind Search
•Uninformed search applies a way in which search tree is
searched without any information about the search space like
initial state operators and test for the goal, so it is also called
blind search.
•Don’t have any domain knowledge .
•It examines each node of the tree until it achieves the goal node.
It can be divided into five main types:
– Breadth-first search
– Uniform cost search
– Depth-first search
– Iterative deepening depth-first search
– Bidirectional Search
11/14/2023 11
Department of CSE (AI/ML)
12. Informed Search
• Informed search algorithms use domain knowledge. In an
informed search, problem information is available which
can guide the search.
• Informed search strategies can find a solution more
efficiently than an uninformed search strategy. Informed
search is also called a Heuristic search.
• A heuristic is a way which might not always be
guaranteed for best solutions but guaranteed to find a
good solution in reasonable time.
• An example of informed search algorithms is a traveling
salesman problem.
• Greedy Search
• A* Search
11/14/2023 12
Department of CSE (AI/ML)
13. Topics to be covered in next session 7
• Uniformed search strategies
11/14/2023 Department of CSE (AI/ML) 13
Thank you!!!