Expert Systems Unit III&IV
Expert Systems Unit III&IV
1. User Interface
With the help of a user interface, the expert system interacts with the user, takes queries as an input in a
readable format, and passes it to the inference engine. After getting the response from the inference engine, it
displays the output to the user. In other words, it is an interface that helps a non-expert user to communicate
with the expert system to find a solution.
3. Knowledge Base
The knowledgebase is a type of storage that stores knowledge acquired from the different experts of
the particular domain. It is considered as big storage of knowledge. The more the knowledge base, the
more precise will be the Expert System.
It is similar to a database that contains information and rules of a particular domain or subject.
One can also view the knowledge base as collections of objects and their attributes. Such as a Lion is
an object and its attributes are it is a mammal, it is not a domestic animal, etc.
The above diagram is showing how an AI system can interact with the real world and what components help
it to show intelligence. AI system has Perception component by which it retrieves information from its
environment. It can be visual, audio or another form of sensory input. The learning component is responsible
for learning from data captured by Perception comportment. In the complete cycle, the main components are
knowledge representation and Reasoning. These two components are involved in showing the intelligence in
machine-like humans. These two components are independent with each other but also coupled together. The
planning and execution depend on analysis of Knowledge representation and reasoning.
2. Inheritable knowledge:
In the inheritable knowledge approach, all data must be stored into a hierarchy of classes.
All classes should be arranged in a generalized form or a hierarchal manner.
In this approach, we apply inheritance property.
Elements inherit values from other members of a class.
This approach contains inheritable knowledge which shows a relation between instance and class, and
it is called instance relation.
Every individual frame can represent the collection of attributes and its value.
In this approach, objects and values are represented in Boxed nodes.
We use Arrows which point from objects to their values.
Example:
3. Inferential knowledge:
Inferential knowledge approach represents knowledge in the form of formal logics.
This approach can be used to derive more facts.
It guaranteed correctness.
Example: Let's suppose there are two statements:
1. Marcus is a man
2. All men are mortal
Then it can represent as;
man(Marcus)
∀x = man (x) ----------> mortal (x)s
4. Procedural knowledge:
Procedural knowledge approach uses small programs and codes which describes how to do specific
things, and how to proceed.
In this approach, one important rule is used which is If-Then rule.
In this knowledge, we can use various coding languages such as LISP language and Prolog language.
We can easily represent heuristic or domain-specific knowledge using this approach.
But it is not necessary that we can represent all cases in this approach.
Requirements for knowledge Representation system:
A good knowledge representation system must possess the following properties.
1. Representational Accuracy: KR system should have the ability to represent all kind of required
knowledge.
2. Inferential Adequacy: KR system should have ability to manipulate the representational structures to
produce new knowledge corresponding to existing structure.
3. Inferential Efficiency: The ability to direct the inferential knowledge mechanism into the most
productive directions by storing appropriate guides.
4. Acquisitional efficiency- The ability to acquire the new knowledge easily using automatic methods.
1. Logical Representation
Logical representation is a language with some concrete rules which deals with propositions and has no
ambiguity in representation. Logical representation means drawing a conclusion based on various conditions.
This representation lays down some important communication rules. It consists of precisely defined syntax
and semantics which supports the sound inference. Each sentence can be translated into logics using syntax
and semantics.
Syntax:
Syntaxes are the rules which decide how we can construct legal sentences in the logic.
It determines which symbol we can use in knowledge representation.
How to write those symbols.
Semantics:
Semantics are the rules by which we can interpret the sentence in the logic.
Semantic also involves assigning a meaning to each sentence.
Example: Following are some statements which we need to represent in the form of nodes and arcs.
Statements:
1. Jerry is a cat.
2. Jerry is a mammal
3. Jerry is owned by Priya.
4. Jerry is brown coloured.
5. All Mammals are animal.
In the above diagram, we have represented the different type of knowledge in the form of nodes and arcs.
Each object is connected with another object by some relation.
3. Frame Representation
A frame is a record like structure which consists of a collection of attributes and its values to describe an entity
in the world. Frames are the AI data structure which divides knowledge into substructures by representing
stereotypes situations. It consists of a collection of slots and slot values. These slots may be of any type and
sizes. Slots have names and values which are called facets.
Facets: The various aspects of a slot is known as Facets. Facets are features of frames which enable us to put
constraints on the frames. Example: IF-NEEDED facts are called when data of any particular slot is needed.
A frame may consist of any number of slots, and a slot may include any number of facets and facets may have
any number of values. A frame is also known as slot-filter knowledge representation in artificial
intelligence.
Frames are derived from semantic networks and later evolved into our modern-day classes and objects. A
single frame is not much useful. Frames system consist of a collection of frames which are connected. In the
frame, knowledge about an object or event can be stored together in the knowledge base. The frame is a type
of technology which is widely used in various applications including Natural language processing and
machine visions.
Example: 1
Let's take an example of a frame for a book
Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152
4. Production Rules
Production rules system consist of (condition, action) pairs which mean, "If condition then action". It has
mainly three parts:
The set of production rules
Working Memory
The recognize-act-cycle
In production rules agent checks for the condition and if the condition exists then production rule fires and
corresponding action is carried out. The condition part of the rule determines which rule may be applied to a
problem. And the action part carries out the associated problem-solving steps. This complete process is called
a recognize-act cycle.
The working memory contains the description of the current state of problems-solving and rule can write
knowledge to the working memory. This knowledge match and may fire other rules.
If there is a new situation (state) generates, then multiple production rules will be fired together, this is called
conflict set. In this situation, the agent needs to select a rule from these sets, and it is called a conflict resolution.
Example:
IF (at bus stop AND bus arrives) THEN action (get into the bus)
IF (on the bus AND paid AND empty seat) THEN action (sit down).
IF (on bus AND unpaid) THEN action (pay charges).
IF (bus arrives at destination) THEN action (get down from the bus).
The amount of collateral knowledge can be very large depending on the task. A number of advances in
technology and technology standards have assisted in integrating data and making it accessible. These include
the semantic web (an extension of the current web in which information is given a well-defined meaning),
cloud computing (enables access to large amounts of computational resources), and open datasets (freely
available datasets for anyone to use and republish). These advances are crucial to knowledge engineering as
they expedite data integration and evaluation.
Support facilities
It includes a number of tools for aiding the programming. These tools generally should be considered in the
knowledge engineering language. There are four major kinds of support facilities as follows:
I/O facilities
Explanation facilities
Knowledge-base creation
Debugging tools
Hardware support – refers to the computer on which the tools run. Naturally, the size of a tool plays major
role in choosing the appropriate machine. A very vital aspect of selecting the relevant machine is its cost. The
type of computers that a tool can be run on are for example: PC Workstations, Mainframes and others.
Capabilities of expert system building tools vary from one tool to another. Therefore, it is very job to select
an appropriate tool. There is no agreement about how one chooses a shell to use for a given application. The
successful use of expert systems building tool lies in choosing the right tool for a problem. The field also
needs further research. It requires a practical search of different tools in use and analysis of both tools
characteristics and problem domain features.
Stage # 1. Identification:
Before we can begin to develop an expert system, it is important to describe, with as much precision as
possible, the problem which the system is intended to solve. It is not enough simply to feel that an expert
system would be helpful in a certain situation; we must determine the exact nature of the problem and state
the precise goals which indicate exactly how the expert system is expected to contribute to the solution.
Stage # 2. Conceptualisation:
Once it has been identified for the problem an expert system is to solve, the next stage involves analysing the
problem further to ensure that its specifics, as well as generalities, are understood.
In the conceptualisation stage, the knowledge engineer frequently creates a diagram of the problem to depict
graphically the relationships between the objects and processes in the problem domain. It is often helpful at
this stage to divide the problem into a series of sub-problems and to diagram both the relationships among the
pieces of each sub-problem and the relationships among the various sub-problems.
Stage # 4. Implementation:
During the implementation stage the formalised concepts are programmed into the computer which has been
chosen for system development, using the predetermined techniques and tools to implement a ‘first-pass’
(prototype) of the expert system.
Theoretically, if the methods of the previous stages have been followed with diligence and care, the
implementation of the prototype should proceed smoothly.