Professional Documents
Culture Documents
Chapter 2
Today contents and achievements
Achievements:CO1
Early 1960’s problem for AI;
◦ Weak methods; general method to find solution to a
problem (not efficient, weak performance)
◦ Too difficult and broad problem to solve
Rise needs for specialized problem solving
technique → mimicking human expert
behavior and decision
Since 1970’s, the AI is designed to adopt
human expertise as a knowledge-based
system.
Rule-based expert systems:
Contents
◼ Introduction, or what is knowledge?
◼ Rules as a knowledge representation technique
◼ The main players in the development team
◼ Structure of a rule-based expert system
◼ Characteristics of an expert system
◼ Forward chaining and backward chaining
◼ Conflict resolution
◼ Summary
An Expert System (ES) is a computer-based
system (mainly software) that uses
knowledge and facts, and apply an
appropriate reasoning technique
(inferencing) to solve problems in a given
field (domain) that normally require the
services of human experts.
Achievements:CO1
Rule-based expert systems:
Contents
◼ Introduction, or what is knowledge?
◼ Rules as a knowledge representation technique
◼ The main players in the development team
◼ Structure of a rule-based expert system
◼ Characteristics of an expert system
◼ Forward chaining and backward chaining
◼ Conflict resolution
◼ Summary
The process of building ES is called Knowledge
Engineering, consist of three stages :
Expert System
End-user
◼ Domain expert
◼ knowledgeable and skilled person capable of solving
problems in a specific area or domain.
◼ has the greatest expertise in a given domain. This
expertise is to be captured in the expert system.
◼ Knowledge engineer
◼ capable of designing, building and testing an expert
system.
◼ establishes what reasoning methods the expert uses to
handle facts and rules and decides how to represent them
in the expert system.
◼ chooses some development software or an expert system
shell, or looks at programming languages for encoding the
knowledge.
◼ responsible for testing, revising and integrating the expert
system into the workplace.
◼ Programmer
◼ responsible for the actual programming, describing the
domain knowledge in terms that a computer can
understand.
◼ have skills in symbolic programming in such AI languages
and also some experience in the application of different
types of expert system shells.
◼ know conventional programming languages like C, Pascal,
FORTRAN and Basic.
◼ Project manager
◼ leader of the expert system development team, responsible
for keeping the project on track.
◼ makes sure that all deliverables and milestones are met,
interacts with the expert, knowledge engineer, programmer
and end-user.
◼ End-user(User)
◼ uses the expert system when it is developed.
◼ confident in the expert system performance but also feel
comfortable using it.
◼ the user interface of the expert system is vital for the
project’s success; the end-user’s contribution here can be
crucial.
Structure of a rule-based expert
system
◼ In the early seventies, Newell and Simon from
Carnegie-Mellon University proposed a production
system model, the foundation of the modern rule-
based expert systems.
◼ The production model is based on the idea that
humans solve problems by applying their knowledge
(expressed as production rules) to a given problem
represented by problem-specific information.
◼ The production rules are stored in the long-term
memory and the problem-specific information or facts
in the short-term memory.
Production system model
REASONING
Conclusion
Basic structure of a rule-based expert
system
Expert System
Knowledge Base Database
Inference Engine
Explanation Facilities
User
Knowledge Engineer
Expert
Can expert systems make
mistakes?
◼ Even a brilliant expert like a human make mistakes.
This suggests that an expert system built to perform
at a human expert level also should be allowed to
make mistakes.
◼ If human make mistakes,
◼ Then machines are also allowed making mistakes (with
accuracy)
Rule 1
IF the local flight is done by MAS company THEN plan the
international flight with this company
Rule 2
IF the customer is part of the frequent flyer programme of
company MAS and if this company has a flight to the customer's
destination THEN select a flight with this MAS company.
There are various types of industrial robot that have been applied in
industries such as articulated robot, scara robot, gantry and Cartesian robot.
Each of those robots has their own specific and suitable task that others
cannot perform well due to some aspects e.g time consuming, ease to apply
etc. Among them, the articulated robot is the most popular used robot in
manufacturing even though the robot is complex than the other robot types.
The robot usually use it’s gripper to pick up things and perform several
tasks.
◦ You have been appointed as person in-charge to classify products to be packaged. Those products
have two shapes, one has round and the other one has cube shape. Apply the strategy rule to
ensure the gripper can hold firmly those products.
◦ In each rule in (ii), list THREE (3) conditions, and ONE (1) expected experience.
This question is an open-ended question. Answer must consists of the following items.
Given the following fields, select an area that
you are most expert.
◦ Industrial application/manufacturing
◦ Robotics
◦ Oil & gas
◦ Troubleshooting in Electrical & Electronics
Identify your problem domain and objectives.
The expert system must have at least 2 rules.
(At least TWO antecedents and at least ONE
consequence)
More notes:
http://www.tutorialspoint.com/artificial_intelligence/artificial_intelligence_expert_systems.htm
ROBOTIC ARM
Today’s contents and
achievements
2.2 Expert System development team
2.3 Rule-based expert system structure
2.4 Expert system characteristics
Data driven
Data Rule
MATCHING
GOAL!
Inference engine cycles via a match-fire
procedure
Database
Fact: A is x
Fact: B is y
Match Fir e
Knowledge Base
Rule: IF A is x THEN B is y
An example of an inference
chain
Rule 1: IF Y is true
AND D is true
THEN Z is true
A X
Rule 2: IF X is true
AND B is true
B Y
AND E is true
Z
THEN Y is true
E D
Rule 3: IF A is true
THEN X is true
Forward chaining
A B C D E A B C D E A B C D E A B C D E
X X L X L Y X L Y Z
◼ First, the knowledge base is explored to find rules that might have
the desired solution. Such rules must have the goal in their THEN
(action) parts.
AA BC
B C DE E
D AB
A B C
CD D EE A
AB B C
CD D EE
? ?
Z Y X
Knowledge Base Knowledge Base Knowledge Base
Y&D Z Y&D Z Y&D Z
X&B&E Y X & B &
X&B&E→Y EY X & B &
X&B&E→Y EY
A X A X A X
C L C L C L
L&M N L&M N L&M N
Goal:
Goal ZZ Sub-Goal:
Sub-Goal Y Y Sub-Goal:
Sub-Goal X X
AB
A B CD
C D EE AC
A BB C DE
D E AC
A BB C DE
D E
X X Y X Y Z
Determine
facts
Finding if
Finding one
Look into working where conclusion
knowledge/facts information is true when
leads no
information
Conflict resolution
Earlier we considered two simple rules for
crossing a road. Let us now add third rule:
◼ Rule 1:
IF the ‘traffic light’ is green
THEN the action is go
◼ Rule 2:
IF the ‘traffic light’ is red
THEN the action is stop
◼ Rule 3:
IF the ‘traffic light’ is red
THEN the action is go
◼ We have two rules, Rule 2 and Rule 3, with the
same IF part. Thus both of them can be set fired
when the condition part is satisfied. These rules
represent a conflict set. The inference engine
must determine which rule to fire from such a set.
A method for choosing a rule to fire when more
than one rule can be fired in a given cycle is called
conflict resolution.
◼ In forward chaining, BOTH rules would be
fired. Rule 2 is fired first as the topmost
one, and as a result, its THEN part is
executed and linguistic object action
obtains value stop. However, Rule 3 is
also fired because the condition part of
this rule matches the fact ‘traffic light’ is
red, which is still in the database. As a
consequence, object action takes new
value go.
Methods used for conflict resolution
◼ Fire the rule with the highest priority. In simple
applications, the priority can be established by
placing the rules in an appropriate order in the
knowledge base. Usually this strategy works well for
expert systems with around 100 rules.
RULE 2
IF the season is autumn
THEN the advice is “take an umbrella”
RULE 1
IF The forecast is rain [08:16 PM 03/10/13]
THEN the advice is “Take an umbrella“
RULE 2
IF The weather is wet [10:18 AM 03/11/13]
THEN the advice is “stay at home”
Advantages of rule-based expert systems