Module 1 : Problem Solving & Scope of AI
1
Topics to be covered
• Production System.
• Classes of Production System.
• Production system.
• Control Strategies.
• Search Strategies.
-Uninformed search
-Informed Search
• Depth First Search Technique
• Breadth First Search Technique
2
Amity School of Engineering and Technology
Production System
Since search forms the core of many intelligent processes, it is useful to structure AI programs in a way that facilitates
describing and performing the search process. Production systems provide such structures.
A production system consist of:-
• A set of rules, each consisting of a left side (pattern) that determines the applicability of the rule and a right side
describing the operation to be performed.
• One or more knowledge/databases that contain whatever information is appropriate for the particular task.
• A control strategy that specifies the order in which the rules will be compared to the database and a way of
resolving the conflicts that arise when several rules match at once.
• A rule applier which is the computational system that implements the control strategy and applies the rules.
3
Amity School of Engineering and Technology
Classes of Production System
•Monotonic production system: the application of a rule never prevents the later application of
another rule that could also have been applied at the time the first rule was selected.
•Non-monotonic production system: Is one in which this is not true.
•Partially commutative production system: the application of a particular sequence of rules
transforms state x into state y, then any permutation of those rules that is allowable also transforms
state x into state y.
•Commutative production system: system that is both monotonic and partially commutative.
4
Amity School of Engineering and Technology
Control strategies
•A control strategy that specifies the order in which the rules will be applied.
•Control strategies help us to overcome the abnormal situations, when there are more than one
rules or fewer than one rule will have its left sides match the current state.
•Requirement for control strategy
i. A good control strategy causes motion.
ii. A good control strategy is systematic.
5
Amity School of Engineering and Technology
6
Amity School of Engineering and Technology
Search Strategies
1.Uninformed search (blind search)(Exhaustive search)(Brute force)
Having no information about the number of steps from the current state to the goal.
2.Informed search (heuristic search)
More efficient than uninformed search.
7
Amity School of Engineering and Technology
Brute Force or Uninformed Search Strategies
• These are commonly used search procedure which explore all the alternatives during the
search process.
• They do not have any domain specific knowledge.
• They need the initial state, the goal state and a set of legal operators.
• The strategy gives the order in which the search space is searched
• The followings are example of uninformed search
–Depth First Search (DFS)
–Breadth First Search (BFS)
8
Amity School of Engineering and Technology
Search Strategies: Blind Search
• Breadth-first search
Expand all the nodes of one level first.
• Depth-first search
Expand one of the nodes at the deepest level.
9
10
11
12
13
14
15
16
17
Amity School of Engineering and Technology
Breadth-First Search Applications
18
Amity School of Engineering and Technology
DFS Vs BFS
DFS BFS
It require less memory because only the It require more memory because all the tree
nodes on the current path are stored. that has so far been generated must be
stored.
It is one in which by luck solution can be While in BFS all parts of the tree must be
found without examining much of the examined to level n before any nodes on
search space at all. level n+1 can be examined.
It does not give optimal solution. It gives optimal solution.
DFS may find a long path to a solution in BFS guarantees to find a solution if it
one part of the tree, when a shorter path exists. Furthermore if there are multiple
exists in some other, unexplored part of the solutions, then a minimal solution will be
tree. found.
Time complexity: O(bd ) Time complexity: O(bd )
where b : branching factor, d: depth where b : branching factor, d: depth
Space complexity: O(d) , d: depth Space complexity: O(bd)
where b : branching factor, d: depth
19
Amity School of Engineering and Technology
Thank You
20