You are on page 1of 20

REPRESENTATION OF AI PROBLEMS

Lexical part
Structural part
Procedural part
Semantic part

<date/time> <footer> 1
REPRESENTATION OF AI PROBLEMS
● A lexical part: that determines which symbols are allowed in the
representations of the problem. Like the normal meaning of the lexicon,
this part abstracts all fundamental features of the problem.
● A structural part: that describes constraints on how the symbols can
be arranged. This corresponds to finding out possibilities required for
joining these symbols and generating higher structural unit.
● A procedural part: that specifies access procedures that enable to
create descriptions, to modify them, and to answer questions using
them.
● A semantic part: that establishes a way of associating meaning with
the descriptions.
21/12/2023 2
PRODUCTION SYSTEM
● An AI system developed for solution of any problem is called
production system.
● Once the problem is defined, analyzed and represented in a
suitable formalism, the production system is used for application
of rules and obtaining the solution.
● A production system consists of following components:

21/12/2023 3
PRODUCTION SYSTEM
● A set of production rules, which are of the form P → Q. Each rule
consists of a left hand side constituent that represents the current
problem state and a right hand side that represents a result or
generated output state. A rule is applicable if its left hand side matches
with the current problem state.
● One or more knowledge/databases, that contains all the appropriate
information for a particular task.
● A control Strategy specifies order in which the rules will be compared to
the database of rules and ways of resolving conflicts.
● A rule applier, which checks the applicability of rule by matching the
current state with LHS of the rule and finds the appropriate rule from the
database of rules.
21/12/2023 4
Salient Features of Production rules
● Expressiveness and intuitiveness: The production rules tells
us what to do in a given situation. This type of situation can be
coded in If-Then form.
● Examples: Expert systems and rule-based systems.
● Simplicity: The uniform structure of IF-THEN-ELSE coding
structure of rule-based system provides simplicity in knowledge
representation.
● Modularity and Modifiability: Modularity means , production
rules code the knowledge available in discrete pieces.
Modifiability stands for facility of modifying the rule.
21/12/2023 5
Salient Features of Production rules
● Knowledge intensive: The knowledge base of production system
stores extensive and pure knowledge. This part contains no control or
programming information. The problem of semantics is resolved by
representing the knowledge in proper structure.
● Opacity: Along with the advantages, there are certain disadvantages
also associated with production systems. Opacity is the problem
generated by combination of production rules. Though, the individual
production rules may be models of clarity, the combined operation and
effects of control program may be opaque.
● The opacity is generated because of less prioritization of rules.

21/12/2023 6
Salient Features of Production rules
● Inefficiency: Sometimes, several of the rules become active
during execution. A well devised control strategy reduces this
problem.
● As the rules of production system are large in number and they
are hardly written in hierarchical manner, it requires exhaustive
search through all the production rules for each cycle of control
program. It makes the functioning inefficient.
● Absence of learning: The simple rule based production system
does not store the results of computations for later use. Hence, it
does not exhibit any type of learning capabilities.
21/12/2023 7
Salient Features of Production rules
● Conflict Resolution: The rules in ideal production system should not
have any type of conflict. The new rule whenever added in the database
should ensure that it does not have any conflict with the existing rules.
● If conflict is found, it should be resolved in following ways:
● (i) Assign priority to the rules and fire the rule with the highest priority.
This method is used in many expert systems.
● (ii) Use a longest matching strategy. This means that fire a rule having
largest number of matching constraints. A rule with more constraints
provides more knowledge.
● (iii) Choose most recently used rule for firing. Its advantage is that it
represents a depth first search, which follows the path of greatest
activity
21/12/2023 8
Characteristics of Production System

● The production systems can be of various types, but the most


popular production system is monotonic system.
● A monotonic production system is a production system in which
the application of one rule never prevents the later application of
another rule.

21/12/2023 9
Characteristics of Production System
● 1) Data Structure: After defining the problem, it must be
presented in a suitable data structure. Data structures best suited
for AI is graphs and trees.
● 2) Control Strategies/search strategies:
● A good control strategy should cause motion. Whenever we apply a
rule, the movement of the problem should be in the direction of
obtaining the solution.
● It must be systematic.

21/12/2023 10
ALGORITHM OF PROBLEM SOLVING
● Algorithm: “problem name”
● 1. Choose data about start state, goal state and production rules from
initial database.
● 2. Until the goal state is achieved (or solution can not be achieved and
operators are exhausted), do the following:
● 3. Begin
● 4. Select some rule from the set of rules that can be applied to data.
● 5. Note new state generated after the application of the rule. Make this
as current state.
● 6. End
21/12/2023 11
Tic-Tac-Toe

21/12/2023 12
21/12/2023 13
Tower of Hanoi
● On one post there is set of ‘n’ disks each with hole in the center
and of different radius.
● Rules:
○ Only one disk can be moved at a time.
○ Large disk can not be placed on smaller disk.

21/12/2023 14
Tower of Hanoi

Final State

Initial State

21/12/2023 15
Tower of Hanoi

21/12/2023 16
Tower of Hanoi
● Steps:
○ Move disk 3 on post C.
○ Move disk 2 on post B.
○ Move disk 3 on top of disk 2 on post B.
○ Move disk 1 on post C.
○ Move disk 3 on post A.
○ Move disk 2 on top of disk 1 on post C.
○ Move disk 3 on top of disk 2 on post C. -GOAL STATE

21/12/2023 17
Travelling Salesperson Problem
● This problem falls in the category of path finding problems. The
problem is defined as follows:
● "Given 'n' cities connected by roads, and distances between
each pair of cities. A salesperson is required to travel each of the
cities exactly once.
● We are required to find the route of salesperson so that by
covering minimum distance, he can travel all the cities and come
back to the city from where the journey was started".

21/12/2023 18
21/12/2023 19
● A→C→D→B→A
○ 15 + 30 + 25 + 10 = 80
● A→D→C→B→A
● A→D→B→C→A
● A→C→B→D→A
● A→B→C→D→A
● A→B→D→C→A

21/12/2023 20

You might also like