Exploring Knowledge-Based Systems: Architecture, Rules, and Validation

Verified

Added on  2020/01/23

|17
|2401
|304
Homework Assignment
AI Summary
This assignment provides a comprehensive overview of knowledge-based systems, starting with their definition and evolution from rule-based expert systems. It details the architecture, including the knowledge base and inference engine, and explains the advantages of rule-based knowledge representation. The document explores data rules, their application, and execution strategies, with examples. It also covers Prolog programming, data validation, error handling, exception handling, and the implementation of a test strategy. The assignment concludes by highlighting the applications and structural design of knowledge-based systems, emphasizing their role in augmenting problem-solving capabilities through hierarchies. The provided solution is a student assignment available on Desklib, a platform offering AI-based study tools.
Document Page
1
Running Head: KNOWLEDGE BASED SYSTEM
KNOWLEDGE BASED SYSTEM
NAME:
INSTITUTION:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2
Running Head: KNOWLEDGE BASED SYSTEM
Knowledge-based system is a program or computer software that was first developed by
artificial intelligence researchers which use the knowledge base to solve complicated problems.
It is a broad field of study and is generally used to refer to various kinds of systems. The unifying
factor for all the knowledge based system is the fact that it seeks to represent knowledge
comprehensively through tools such as ontology and set of rules rather than through the use of
coded language. The knowledge-based system comprises of two subsystems; these are; the
knowledge base and the inference engine. The knowledge base depicts facts about the
environment, usually in the form of subsumption ontology while the inference engine depicts
logical assertions of the environment (Batra, & Wishart. 2006). It is hence usually presented
through the use of IF-THEN rule. For instance; Command (false/;true); execute
Knowledge-based system is also normally referred to as the expert system, and both
terms are normally used synonymously, However, all expert systems are knowledge-based
systems but not all knowledge based systems are expert systems (White, 2008). Initially,
knowledge-based systems were rule-based expert systems with the most famous program being
the Mycin, a computer program used form medical diagnosis. This early expert system depicted
facts about the environment as simple assertions in a data base which utilized rules to reason.
Presenting knowledge comprehensively through the use of rules has several advantages. This
are;
Maintenance; using rules allowed the domain experts to maintain and define rules
themselves as opposed to using program developers.
Document Page
KNOWLEDGE BASED SYSTEMS
Explanation; comprehensive representation of knowledge enabled the systems to reason
on how they came up with certain conclusions and thus used this information to showcase the
Document Page
4
Running Head: KNOWLEDGE BASED SYSTEM
results to the users. For instance, the Mycin program followed a chain of inferences that led to
the diagnosis and therefore used these facts to explain the diagnosis (Batra, & Wishart. 2006).
Reasoning; detaching the knowledge from the process of that knowledge allowed the
general purpose inference engines to be developed. It enabled the system to develop conclusions
derived from the data set that the programmers may not have been aware of.
The knowledge base and inference engine are clearly distinct because of the following
reasons.
(a). the reasoning mechanism must be as stable as possible;
(b). While knowledge is added, the knowledge-based system must be in a position to
grow and change as well
(c). The arrangement enables the system to be built from, or converted to another
application.
As knowledge-based systems became more complex sophisticated techniques on how to
represent the knowledge base emerged (Batra, & Wishart. 2006). It became more structured,
representing information using similar techniques to object-oriented programmings such as
hierarchies of classes and subclasses, relations between classes, and behavior of objects as
opposed to the initial way of representing facts as assertions about data. This, therefore, means
that reasoning could occur through the interactions within the knowledge base itself and
independent rules. Moreover, critical advancement also emerged in that there was the
development of automated reasoning system referred to as the classifiers. These classifiers
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
5
Running Head: KNOWLEDGE BASED SYSTEM
enabled the program developers to declare facts about the environment and allowed the
classifiers to come up with the relationships of the objects or items. This was a significant
advancement from the previous version where the system statically declared the subsumption
relations in a knowledge-base
Recently, the important improvement of knowledge-based systems has been to adopt the
technologies for the development of systems that use the Internet (White, 2008). The Internet
often has to deal with complex, unstructured data that can't be relied on to fit a specific data
model. Knowledge-based systems technology and its ability to classify objects on demand are
fundamental for such systems. These models of knowledge-based Internet systems called the
Semantic Web.
Data rules and structures
Data rules are input variables that the system should adhere to come up with a
conclusion. Data rules follow hierarchical structures.
Application of data rule
A data rule example would be
if (BooleanExpression(input)) then a series of actions is executed; which is the next step.
This is a series of actions which might be, moving the input variable to a different series
of rules, gathering extra data, or coming up with a conclusion hence providing a set of rules
Document Page
KNOWLEDGE BASED SYSTEMS
referred to as the rule-set, the corresponding data structure is, therefore, clear (Friedman-Hill,
2003)
Document Page
7
Running Head: KNOWLEDGE BASED SYSTEM
The most interesting part of rule engines is the execution strategy and the process of rule
selection because of the many variables that are involved in the process (White, 2008).
Typically, most knowledge-based systems are clear and precise. It commands that if this
happens, then there is a clear operational procedure of the way the system should respond
(Hentea, 2007). Therefore most system rules do not contain the ‘or else” condition
The following is a more precise example of how an engine rule should look like.
Input (_,true, false):-Execute action 1
In put (_,true, true):- Execute action 2
Clearly the implementation of this program can abuse the fact that these rules are only
applicable to the user’s input or signal and only in case of the second condition being true. It is,
therefore, possible to improve the rule-set with a dedicated lookup table for the inputs. Besides
the rules, there is one very significant aspect, namely the input. The input is the data on to which
the rules are supposed to act on (Friedman-Hill, 2003). In most engines rules, it is possible to
modify this data by the application of rules by starting with a condition; then the rules add new
information to the data. In this particular scenario, the input needs to be stored so that a
developer can easily determine if there is data input. Therefore, the handling of inputs requires a
set of rules and the actions derived from the rules will depend on the inputs. This means that the
inputs should be passable into actions. The following is a basic example.
Input (X, false, false):- print(X)
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
8
Running Head: KNOWLEDGE BASED SYSTEM
Execution strategy of rules
Most engines use top-to-bottom strategy where the textually first rule in the rules file that
matches the input is applied. The following are few examples of possible strategies.
The prolog algorithms include backtracking to the rule of execution strategy. This
means that a failure in execution will lead to another rule.
The priority annotations directed to the rules can also be used to another priority from
the execution order.
There are simple possible strategies such as simply executing the first rule that is
found to be applicable.
Prolog; programming logic
Prolog is a computer programming language for non-numeric and symbolic
computations. It is well suited for solving problems that involve objects and the relationship
between objects. For example, a family relation, animals objects among others. Prolog is
commonly referred to as logical programming (White, 2008). Prolog programming language is
based on logic because it derives the use of logic to come up with a conclusion. Prolog is used to
facilitate programming solutions of complicated knowledge. Therefore, it is a declarative
language, unlike other programming languages. This, therefore, means that it specifies the end
goal to be achieved, and it finds out how to achieve the end goal. It is a powerful programming
language which combines the best features of functional, object-oriented and logical paradigms
(Antony, & Santhanam, 2007).
Document Page
9
Running Head: KNOWLEDGE BASED SYSTEM
Some applications of Prolog are: the Prolog programming language is applicable in
various fields which includes, data base intelligent retrieval, expert system, machine learning,
automated reasoning, robot planning and artificial intelligence among others areas (Friedman-
Hill, 2003).
Prolog programming
Task 1.
a). Lion, tiger, cow
Animal(lion, tiger, cow,)
Mammals(lion, tiger, cow)
Domestic animal(cow)
Wild animals(lion, tiger)
b). query whether there is a tiger
animal(tiger, cow, lion)
mammal (tiger, cow, lion)
stripes (tiger)
Document Page
10
Running Head: KNOWLEDGE BASED SYSTEM
c). query whether there is such thing as a lion or cow
animal(lion, tiger, cow)
wild(lion, tiger)
domestic(cow)
d). for carnivorous
animal (tiger, cow, lion)
mammals(tiger, cow, lion)
herbivorous(cow)
carnivorous (tiger, lion)
TASK 2
a). Animal(mammal, tiger, carnivorous, stripes)
Animal(tiger)
Mammal(tiger)
Carnivorous(tiger)
Stripes(tiger)
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
11
Running Head: KNOWLEDGE BASED SYSTEM
b). animal(bird, eagle, carnivore, large)
animal(eagle)
bird(eagle)
carnivore(eagle)
large(eagle)
c). animal(mammal, hyena, carnivore, ugly)
animal(hyena)
mammal(hyena)
carnivore(hyena)
ugly(hyena)
e). animal(sparrow, bird, scavenger, small)
animal(sparrow)
bird(sparrow)
scavenger(sparrow)
small(sparrow)
Document Page
12
Running Head: KNOWLEDGE BASED SYSTEM
Data validation
In data validation is the process of ensuring that a program operates correctly. It uses
routines or rules often referred to as validation rules; this validation rules the validity and
correctness and meaningfulness of the data that is n put to the system.
Error handling
Error handling refers to the detection, anticipation and providing solutions for the
programming applications. It also involves communicating the errors in the applications. In some
applications, there are specialized programs for handling the errors that might occur in the
application; these programs are called error handlers.
Exception handling
There are structured exceptions handling processes which are straightforward. The same
concepts apply to VB.NET or C#. VB.NET. This enables the application to have backward
compatibility. These exceptions are used to handle conditions of error in some applications such
as Visual Studio.NET. It provides information about the condition of the error. In dealing with
errors, the construct enables the user to catch errors that are brought to the application (Antony,
& Santhanam, 2007).
Implementing a test strategy
chevron_up_icon
1 out of 17
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]