Lecture 4 - Problem Solving in AI
Lecture 4 - Problem Solving in AI
Lecture no: 4
Problem-Solving
Problem solving is an important aspect of Artificial Intelligence.
Early applications included automating expert knowledge in specific domains mainly in medical
diagnosis and fraud detection.
What is Searching in AI?
• Search tree: A tree representation of search problem is called Search tree. The root
of the search tree is the root node which is corresponding to the initial state.
• Actions: It gives the description of all the available actions to the agent.
• Transition model: A description of what each action do, can be represented as a
transition model.
• Path Cost: It is a function which assigns a numeric cost to each path.
• Solution: It is an action sequence which leads from the start node to the goal node.
• Optimal Solution: If a solution has the lowest cost among all solutions.
Properties of Search Algorithms
Following are the four essential properties of search algorithms to compare the efficiency
of these algorithms:
• Space Complexity: It is the maximum storage space required at any point during the
search, as the complexity of the problem.
Data-Driven vs Goal-Driven Search
Data-Driven vs Goal-Driven Search
Generate and Test Approach
Simplest approach to search – also called blind search or brute-force search
Involves generating each node in the search space and testing it to see if it is a goal node.
It is an uninformed search.
Types Of Searching in AI
Uninformed Search
It uses knowledge for the searching process. It doesn’t use knowledge for searching process.
It finds solution more quickly. It finds solution slow as compared to informed search.
It provides the direction regarding the solution. No suggestion is given regarding the solution in it.
Greedy Search, A* Search, Graph Search Depth First Search, Breadth First Search
Problem Abstraction
• Real world is complex and has more details.
• Irrelevant details should be removed from state space and actions, which
is called abstraction.
• What’s the appropriate level of abstraction?
• the abstraction is valid, if we can expand it into a solution in the more
detailed world.
• the abstraction is useful, if carrying out the actions in the solution is
easier than the original problem.
• remove as much detail as possible while retaining validity and usefulness.
Example: Vacuum-Cleaner
States: 8 states
Initial state: any state
Actions: Left, Right, and Suck
Transition model: complete state space, see next page
Goal test: whether both squares are clean
Path cost: each step costs 1
Complete State Space
Example: 8-puzzle