Overview of Expert Systems
Overview of Expert Systems
Unit-5 1
Note: It is important to remember that an expert system is not
used to replace the human experts; instead, it is used to assist
the human in making a complex decision. These systems do
not have human capabilities of thinking and work on the basis
of the knowledge base of the particular domain.
Below are some popular examples of the Expert System:
MYCIN: It was one of the earliest backward chaining expert systems that
was designed to find the bacteria causing infections like bacteraemia and
meningitis. It was also used for the recommendation of antibiotics and the
diagnosis of blood clotting diseases.
PXDES: It is an expert system that is used to determine the type and level
of lung cancer. To determine the disease, it takes a picture from the upper
body, which looks like the shadow. This shadow identifies the type and
degree of harm.
CaDeT: The CaDet expert system is a diagnostic support system that can
detect cancer at early stages.
Unit-5 2
Understandable: It responds in a way that can be easily understandable by
the user. It can take input in human language and provides the output in the
same way.
Highly responsive: ES provides the result for any complex query within a
very short period of time.
User Interface
Inference Engine
Knowledge Base
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
Unit-5 3
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.
With the help of an inference engine, the system extracts the knowledge
from the knowledge base.
Forward Chaining: It starts from the known facts and rules, and applies the
inference rules to add their conclusion to the known facts.
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.
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.
Unit-5 4
Factual Knowledge: The knowledge which is based on facts and accepted
by knowledge engineers comes under factual knowledge.
The KB of the MYCIN is updated successfully. In order to test it, the doctor
provides a new problem to it. The problem is to identify the presence of the
bacteria by inputting the details of a patient, including the symptoms,
current condition, and medical history.
Now the system has collected all the information, so it will find the solution
for the problem by applying if-then rules using the inference engine and
using the facts stored within the KB.
In the end, it will provide a response to the patient by using the user
interface.
Unit-5 5
2. Knowledge Engineer: Knowledge engineer is the person who gathers the
knowledge from the domain experts and then codifies that knowledge to
the system according to the formalism.
Before using any technology, we must have an idea about why to use that
technology and hence the same for the ES. Although we have human experts in
every field, then what is the need to develop a computer-based system. So
below are the points that are describing the need of the ES:
Unit-5 6
3. Expertise in a domain: There are lots of human experts in each domain,
and they all have different skills, different experiences, and different skills,
so it is not easy to get a final output for the query. But if we put the
knowledge gained from human experts into the expert system, then it
provides an efficient output by mixing all the facts and knowledge
5. High security: These systems provide high security to resolve any query.
6. Considers all the facts: To respond to any query, it checks and considers
all the available facts and provides the result accordingly. But it is possible
that a human expert may not consider some facts due to any reason.
Advising: It is capable of advising the human being for the query of any
domain from the particular ES.
Unit-5 7
inbuilt medical tools.
They can be used for risky places where the human presence is not safe.
For each domain, we require a specific ES, which is one of the big
limitations.
In the finance domainIn the finance industries, it is used to detect any type
of possible fraud, suspicious activity, and advise bankers that if they should
provide loans for business or not.
Unit-5 8
used.
Planning and SchedulingThe expert systems can also be used for planning
and scheduling some particular tasks for achieving the goal of that task.
Working memory is a cognitive system with a limited capacity that can hold
information temporarily.[1] It is important for reasoning and the guidance of
decision-making and behavior.[2][3] Working memory is often used
synonymously with short-term memory, but some theorists consider the two
forms of memory distinct, assuming that working memory allows for the
manipulation of stored information, whereas short-term memory only refers to
the short-term storage of information.[2][4] Working memory is a theoretical
concept central to cognitive psychology, neuropsychology, and neuroscience.
Inference engine:
The inference engine is the component of the intelligent system in artificial
intelligence, which applies logical rules to the knowledge base to infer new
information from known facts. The first inference engine was part of the expert
system. Inference engine commonly proceeds in two modes, which are:
1. Forward chaining
2. Backward chaining
Unit-5 9
Definite clause: A clause which is a disjunction of literals with exactly one
positive literal is known as a definite clause or strict horn clause.
A. Forward Chaining
Forward chaining is also known as a forward deduction or forward reasoning
method when using an inference engine. Forward chaining is a form of
reasoning which start with atomic sentences in the knowledge base and
applies inference rules (Modus Ponens) in the forward direction to extract more
data until a goal is reached.
The Forward-chaining algorithm starts from known facts, triggers all rules
whose premises are satisfied, and add their conclusion to the known facts. This
process repeats until the problem is solved.
Properties of Forward-Chaining:
Consider the following famous example which we will use in both approaches:
Example:
"As per the law, it is a crime for an American to sell weapons to hostile
nations. Country A, an enemy of America, has some missiles, and all the
missiles were sold to it by Robert, who is an American citizen."
Unit-5 10
To solve the above problem, first, we will convert all the above facts into first-
order definite clauses, and then we will use a forward-chaining algorithm to
reach the goal.
Step-2:
At the second step, we will see those facts which infer from available facts and
with satisfied premises.
Rule-(1) does not satisfy premises, so it will not be added in the first iteration.
Unit-5 11
Rule-(2) and (3) are already added.
Rule-(4) satisfy with the substitution {p/T1}, so Sells (Robert, T1, A) is added,
which infers from the conjunction of Rule (2) and (3).
Rule-(6) is satisfied with the substitution(p/A), so Hostile(A) is added and which
infers from Rule-(7).
Step-3:
B. Backward Chaining:
Backward-chaining is also known as a backward deduction or backward
reasoning method when using an inference engine. A backward chaining
Unit-5 12
algorithm is a form of reasoning, which starts with the goal and works
backward, chaining through rules to find known facts that support the goal.
Properties of backward chaining:
Example:
In backward-chaining, we will use the same above example, and will rewrite all
the rules.
Missile(T1)
American(Robert). ..........(8)
Backward-Chaining proof:
In Backward chaining, we will start with our goal predicate, which
is Criminal(Robert), and then infer further rules.
Step-1:
Unit-5 13
At the first step, we will take the goal fact. And from the goal fact, we will infer
other facts, and at last, we will prove those facts true. So our goal fact is
"Robert is Criminal," so following is the predicate of it.
Step-2:
At the second step, we will infer other facts form goal fact which satisfies the
rules. So as we can see in Rule-1, the goal predicate Criminal (Robert) is
present with substitution {Robert/P}. So we will add all the conjunctive facts
below the first level and will replace p with Robert.
Here we can see American (Robert) is a fact, so it is proved here.
Step-3:t At step-3, we will extract further fact Missile(q) which infer from
Weapon(q), as it satisfies Rule-(5). Weapon (q) is also true with the substitution
of a constant T1 at q.
Unit-5 14
Step-4:
At step-4, we can infer facts Missile(T1) and Owns(A, T1) form Sells(Robert, T1,
r) which satisfies the Rule- 4, with the substitution of A in place of r. So these
two statements are proved here.
Step-5:
Unit-5 15
At step-5, we can infer the fact Enemy(A, America) from Hostile(A) which
satisfies Rule- 6. And hence all the statements are proved true using backward
chaining.
Unit-5 16
citations. Hence the study about expert systems and ACSs cannot be thrown
away.
However, the following article is not about the expert system; it is about
building them.
In order to build expert systems easily, it is recommended to employ an expert
system shell that saves both time and effort. Simply an expert system shell (ES
Shell) is a toolkit that consists of built-in essential components of a typical
expert system. Hence, this article aims to describe the structure and
application of ES Shell in building expert systems and the benefits and
limitations of popular shells.
The content of this article is organized as follows:
1. Expert Systems
3. ES Shell structure
4. Popular ES Shells
5. Conclusion
6. References
1. Expert Systems
An intelligent program that can mimic the problem-solving behavior of a human
expert can be identified as an Expert System. Humans knowledge consists of
subject-specific knowledge/ domain knowledge and problem-solving
knowledge. The functionality of an expert system is similar to a human expert
who solves a problem by applying his problem-solving knowledge to his
domain-specific knowledge. Hence, an expert system is a computer program
that symbolizes the knowledge of an expert in a certain domain.
Unit-5 17
Provide reasons for answers
Expert Systems with the above features can be developed from scratch by
using Logic Programming language like ProLog, or can easily be implemented
by using an expert system shell.
Unit-5 18
Figure 02: A tree-based expert system created based on the rules mentioned
above ( Source: Created by Author)
3. as objects (frames) — A data structure with typical knowledge about a
particular object or concept.
ES shell is an ideal option for the rapid development of expert systems. Due to
this reason, it can be considered as one of the most commercially viable
approaches in expert system implementation.
3. A structured skeleton of a knowledge base (in its empty state) with the
suitable knowledge representation facilities
Not only the above components but also some ES Shells provide facilities for
database connectivity through interpreter, web integration, and natural
Unit-5 19
language processing (NLP) features.
Inference engine which is the most important part of an expert system access
the knowledge base and solves the problem by either backward chaining or
forward chaining of facts and rules in the knowledge base. In ES Shells, the
inference engine is also a built-in component that is usually programmed in
ProLog.
Unit-5 20
Most ES shells are composed of another component called ‘Explanation
System’ which provides the user with reasons and explanations to provide a
certain answer, by considering the ‘case specification data’ available.
In an expert system shell, the design of the user interface and other software
components are programmed by the software engineer. Therefore an expert
system is a collaborative design of 03 major parties: expert, knowledge
engineer and software engineer. (Depending on the size these parties may vary
from individuals to large teams)
4.1 ES-Builder
ES Builder stands for Expert System Builder. It is one of the most famous Expert
System Shell. It is a free ES shell that is implemented especially for students
and researchers to develop expert system shells. The shell consists of an
improved web interface built using the AJAX framework. The ES-Builder stores
the facts and rules of the knowledge base in an online MySQL database. There
is a built-in inference engine (written in Prolog)and user interfaces are
developed using simple HTML and CSS. The database connectivity is
maintained to access the knowledge base using PHP.
The rule base knowledge base can also be developed using a decision tree that
consists of attributes, values and conclusions.
Conclusion: The final decision made based on the attributes and values is
the conclusion.
Benefits of ES Builder:
Unit-5 21
Ability to create backup files of the knowledge base and easy integration
with MYSQL database.
Limitations of ES-Builder:
Only forward chaining rules are supported backward chaining rules are not
supported.
4.2 CLIPS
CLIPS stands for C-Language Integrated Production System. As the meaning
suggests the CLIPS expert system shell is written in the procedural langue C.
CLIPS was developed in 1985 at NASA’s Johnson Space Center. It is a rule-
based programming language that is used for creating an expert system. CLIPS
are used in systems where the heuristic solution is easier to implement and
maintain than a traditional algorithmic approach.
CLIPS provides 03 different tools for knowledge representation in the form of
programming methodologies/ programming paradigms. The 03 methods are:
Procedural
Object-oriented
Rule-based programming
Limitations of CLIPS:
Support only forward chaining rules but does not support backward
chaining rules.
Unit-5 22
4.3 JESS
JESS stands for Java Expert System Shell. JESS is another expert system shell
and a scripting language that is completely written by Java programming
language. JESS is heavily used to build rule-based expert systems which is
tightly linked to systems that are written on Java. The expert systems built by
using JESS can be either run on command-line interface or can be used as an
Applet.
JESS based expert systems are widely used as intelligent agents, in enterprise
resource planning systems, and in order validation of eCommerce platforms.
Benefits of JESS:
Faster than the expert systems developed using expert system shells
written on C language.
Contains some commands which allow less memory usage when executing
the system.
Limitations of JESS:
4.4 PyKE
PyKE stands for Python Knowledge Engine. PyKE uses logic programming that
is inspired by Prolog, but PyKE is entirely written in the programming language
Python. The python functions, PyKE rules, and PyKE pattern variables, graph
plans are the major features of PyKE knowledge base. This is an inference
engine that uses rules and facts to create additional facts using forward
chaining of rules to prove goals.
High performance.
Unit-5 23
Code reusability.
Limitations of PyKE:
5. Conclusion
It is obvious that ES Shells is a far better option rather than developing an
expert system from the scratch. There are many ES Shells that support different
programming languages that have been developed which open gates for
developers who are familiar with various programming languages. The ES
Shells should be properly selected mainly considering the requirements and the
scale/size/complexity of the expert system to be developed.
Unit-5 24
What is Artificial Neural Network?
The term "Artificial Neural Network" is derived from Biological neural
networks that develop the structure of a human brain. Similar to the human
brain that has neurons interconnected to one another, artificial neural networks
also have neurons that are interconnected to one another in various layers of
the networks. These neurons are known as nodes.
The given figure illustrates the typical diagram of Biological Neural Network.
The typical Artificial Neural Network looks something like the given figure.
Unit-5 25
Relationship between Biological neural network and artificial neural network:
Dendrites Inputs
Synapse Weights
Axon Output
Unit-5 26
Input Layer:
Unit-5 27
Advantages of Artificial Neural Network
(ANN)
Parallel processing capability:
ADVERTISEMENT
Artificial neural networks have a numerical value that can perform more than
one task simultaneously.
Unit-5 28
It is the most significant issue of ANN. When ANN produces a testing solution,
it does not provide insight concerning why and how. It decreases trust in the
network.
Hardware dependence:
Artificial neural networks need processors with parallel processing power, as
per their structure. Therefore, the realization of the equipment is dependent.
Difficulty of showing the issue to the network:
ANNs can work with numerical data. Problems must be converted into
numerical values before being introduced to ANN. The presentation mechanism
to be resolved here will directly impact the performance of the network. It relies
on the user's abilities.
The duration of the network is unknown:
The network is reduced to a specific value of the error, and this value does not
give us optimum results.
Unit-5 29
An output function of the sum.
Perceptron:
Perceptron was created in 1958, at Cornell University by Frank Rosenblatt.
The perceptron was an endeavor to use neural network procedures for
character recognition. Perceptron was a linear system and was valuable for
solving issues where the input classes were linearly separable in the input
space. In 1960, Rosenblatt published the book principles of neurodynamics,
containing a bit of his research and ideas about modeling the brain.
Despite the early accomplishment of the perceptron and artificial neural
network research, there were many individuals who felt that there was a
constrained guarantee in these methods. Among these were Marvin Minsky
and Seymour Papert, whose 1969 book perceptrons were used to dishonor
ANN research and focus attention on the apparent constraints of ANN work.
One of the limitations that Minsky and Papert's highlight was the fact that the
Perceptron was not capable of distinguishing patterns that are not linearly
separable in input space with a linear classification problem. Regardless of the
disappointment of Perceptron to deal with non-linearly separable data, it was
not an inherent failure of the technology, but a matter of scale. Hecht-Nielsen
showed a two-layer perceptron (Mark) in 1990 that is a three-layer machine
that was equipped for tackling non-linear separation problems. Perceptrons
introduced what some call the "quiet years," where ANN research was at a
minimum of interest.
The backpropagation algorithm, initially found by Werbos in 1974, was
rediscovered in 1986 with the book Learning Internal Representation by Error
Unit-5 30
Propagation by Rumelhart, Hinton, and Williams. Backpropagation is a type of
gradient descent algorithm used with artificial neural networks for reduction
and curve-fitting.
In 1987, the IEEE annual international ANN conference was begun for ANN
scientists. In 1987, the International Neural Network Society(INNS) was
formed, along with INNS neural Networking journal in 1988.
Unit-5 31
strength of the interconnection between neurons inside the artificial neural
network. All the weighted inputs are summarized inside the computing unit.
If the weighted sum is equal to zero, then bias is added to make the output non-
zero or something else to scale up to the system's response. Bias has the same
input, and weight equals to 1. Here the total of weighted inputs can be in the
range of 0 to positive infinity. Here, to keep the response in the limits of the
desired value, a certain maximum value is benchmarked, and the total of
weighted inputs is passed through the activation function.
The activation function refers to the set of transfer functions used to achieve
the desired output. There is a different kind of the activation function, but
primarily either linear or non-linear sets of functions. Some of the commonly
used sets of activation functions are the Binary, linear, and Tan hyperbolic
sigmoidal activation functions. Let us take a look at each of them in details:
Binary:
In binary activation function, the output is either a one or a 0. Here, to
accomplish this, there is a threshold value set up. If the net weighted input of
neurons is more than 1, then the final output of the activation function is
returned as one or else the output is returned as 0.
Sigmoidal Hyperbolic:
The Sigmoidal Hyperbola function is generally seen as an "S" shaped curve.
Here the tan hyperbolic function is used to approximate output from the actual
net input. The function is defined as:
F(x) = (1/1 + exp(-????x))
Feedback ANN:
Unit-5 32
In this type of ANN, the output returns into the network to accomplish the best-
evolved results internally. As per the University of Massachusetts, Lowell
Centre for Atmospheric Research. The feedback networks feed information
back into itself and are well suited to solve optimization issues. The Internal
system error corrections utilize feedback ANNs.
Feed-Forward ANN:
A feed-forward network is a basic neural network comprising of an input layer,
an output layer, and at least one layer of a neuron. Through assessment of its
output by reviewing its input, the intensity of the network can be noticed based
on group behavior of the associated neurons, and the output is decided. The
primary advantage of this network is that it figures out how to evaluate and
recognize input patterns.
Unit-5 33
8 Applications of Neural Networks
Have you ever wondered what forms the basis of May I know you page that
facebook directed you when you were busy scrolling through or how your
online signatures are verified ?
Deep Learning
Neural networks are a part of deep learning, which comes under the
comprehensive term, artificial intelligence. Neural networks are a set of
algorithms that are modelled after the human brain. These networks are also
known as artificial neural networks (ANN).
Sensory neurons, motor neurons and interneurons form the human
brain. Artificial neurons, form the replica of the human brain (i.e. a neural
network).
Unit-5 34
human brain. They can be used for image recognition, character recognition
and stock market predictions. Let’s understand the diverse applications of
neural networks
1. Facial Recognition
Facial Recognition Systems are serving as robust systems of surveillance.
Recognition Systems matches the human face and compares it with the digital
images. They are used in offices for selective entries. The systems thus
authenticate a human face and match it up with the list of IDs that are present
in its database.
(Must Check: Facial Recognition Work in Deep Learning?)
Convolutional Neural Networks (CNN) are used for facial recognition and
image processing. Large number of pictures are fed into the database for
training a neural network. The collected images are further processed for
training.
Sampling layers in CNN are used for proper evaluations. Models are optimized
for accurate recognition results.
3. Social Media
No matter how cliche it may sound, social media has altered the normal boring
course of life. Artificial Neural Networks are used to study the behaviours of
social media users. Data shared everyday via virtual conversations is tacked up
and analyzed for competitive analysis.
Unit-5 35
Neural networks duplicate the behaviours of social media users. Post analysis
of individuals' behaviours via social media networks the data can be linked to
people’s spending habits. Multilayer Perceptron ANN is used to mine data from
social media applications.
MLP forecasts social media trends, it uses different training methods like Mean
Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Squared
Error (MSE). MLP takes into consideration several factors like user’s favourite
instagram pages, bookmarked choices etc. These factors are considered as
inputs for training the MLP model.
In the ever changing dynamics of social media applications, artificial neural
networks can definitely work as the best fit model for user data analysis.
4. Aerospace
Aerospace Engineering is an expansive term that covers developments in
spacecraft and aircraft. Fault diagnosis, high performance auto piloting,
securing the aircraft control systems, and modeling key dynamic simulations
are some of the key areas that neural networks have taken over. Time delay
Neural networks can be employed for modelling non linear time dynamic
systems.
Time Delay Neural Networks are used for position independent feature
recognition. The algorithm thus built based on time delay neural networks can
recognize patterns. (Recognizing patterns are automatically built by neural
networks by copying the original data from feature units).
Other than this TNN are also used to provide stronger dynamics to the NN
models. As passenger safety is of utmost importance inside an aircraft,
algorithms built using the neural network systems ensures the accuracy in the
autopilot system. As most of the autopilot functions are automated, it is
important to ensure a way that maximizes the security.
5. Defence
Defence is the backbone of every country. Every country’s state in the
international domain is assessed by its military operations. Neural Networks
also shape the defence operations of technologically advanced countries. The
United States of America, Britain, and Japan are some countries that use
artificial neural networks for developing an active defence strategy.
Unit-5 36
Neural networks are used in logistics, armed attack analysis, and for object
location. They are also used in air patrols, maritime patrol, and for controlling
automated drones. The defence sector is getting the much needed kick of
artificial intelligence to scale up its technologies.
Convolutional Neural Networks(CNN), are employed for determining the
presence of underwater mines. Underwater mines are the underpass that serve
as an illegal commute route between two countries. Unmanned Airborne
Vehicle (UAV), and Unmanned Undersea Vehicle (UUV) these autonomous
sea vehicles use convolutional neural networks for the image processing.
Convolutional layers form the basis of Convolutional Neural Networks. These
layers use different filters for differentiating between images. Layers also have
bigger filters that filter channels for image extraction.
6. Healthcare
The age old saying goes like “Health is Wealth”. Modern day individuals are
leveraging the advantages of technology in the healthcare
sector. Convolutional Neural Networks are actively employed in the healthcare
industry for X ray detection, CT Scan and ultrasound.
As CNN is used in image processing, the medical imaging data retrieved from
aforementioned tests is analyzed and assessed based on neural network
models. Recurrent Neural Network (RNN) is also being employed for the
development of voice recognition systems.
(Must Check: Learning Recurrent Neural Network and applications)
Voice recognition systems are used these days to keep track of the patient’s
data. Researchers are also employing Generative Neural Networks for drug
discovery. Matching different categories of drugs is a hefty task, but generative
neural networks have broken down the hefty task of drug discovery. They can
be used for combining different elements which forms the basis of drug
discovery.
Signature Verification , as the self explanatory term goes, is used for verifying
an individual’s signature. Banks, and other financial institutions use signature
verification to cross check the identity of an individual.
Usually a signature verification software is used to examine the signatures. As
cases of forgery are pretty common in financial institutions, signature
Unit-5 37
verification is an important factor that seeks to closely examine the authenticity
of signed documents.
Artificial Neural Networks are used for verifying the signatures. ANN are
trained to recognize the difference between real and forged signatures. ANNs
can be used for the verification of both offline and online signatures.
For training an ANN model, varied datasets are fed in the database. The data
thus fed help the ANN model to differentiate. ANN model employs image
processing for extraction of features.
(Related Blog: Hand Gesture Classification using Deep Learning with Keras)
Handwriting analysis plays an integral role in forensics. The analysis is further
used to evaluate the variations in two handwritten documents. The process of
spilling words on a blank sheet is also used for behavioural
analysis. Convolutional Neural Networks (CNN) are used for handwriting
analysis and handwriting verification.
8. Weather Forecasting
The forecasts done by the meteorological department were never accurate
before artificial intelligence came into force. Weather Forecasting is primarily
undertaken to anticipate the upcoming weather conditions beforehand. In the
modern era, weather forecasts are even used to predict the possibilities of
natural disasters.
Unit-5 38
What is a Genetic Algorithm?
Before understanding the Genetic algorithm, let's first understand basic
terminologies to better understand this algorithm:
Selection
Event selection
Unit-5 39
The genetic algorithm works on the evolutionary generational cycle to generate
high-quality solutions. These algorithms use different operations that either
enhance or replace the population to give an improved fit solution.
It basically involves five phases to solve the complex optimization problems,
which are given as below:
Initialization
Fitness Assignment
Selection
Reproduction
Termination
1. Initialization
The process of a genetic algorithm starts by generating the set of individuals,
which is called population. Here each individual is the solution for the given
problem. An individual contains or is characterized by a set of parameters
called Genes. Genes are combined into a string and generate chromosomes,
which is the solution to the problem. One of the most popular techniques for
initialization is the use of random binary strings.
2. Fitness Assignment
Unit-5 40
Fitness function is used to determine how fit an individual is? It means the
ability of an individual to compete with other individuals. In every iteration,
individuals are evaluated based on their fitness function. The fitness function
provides a fitness score to each individual. This score further determines the
probability of being selected for reproduction. The high the fitness score, the
more chances of getting selected for reproduction.
3. Selection
The selection phase involves the selection of individuals for the reproduction of
offspring. All the selected individuals are then arranged in a pair of two to
increase reproduction. Then these individuals transfer their genes to the next
generation.
There are three types of Selection methods available, which are:
Tournament selection
Rank-based selection
4. Reproduction
After the selection process, the creation of a child occurs in the reproduction
step. In this step, the genetic algorithm uses two variation operators that are
applied to the parent population. The two operators involved in the
reproduction phase are given below:
Unit-5 41
One point crossover
Two-point crossover
Livery crossover
Gaussian mutation
Exchange/Swap mutation
5. Termination
After the reproduction phase, a stopping criterion is applied as a base for
termination. The algorithm terminates after the threshold fitness solution is
reached. It will identify the final solution as the best solution in the population.
Unit-5 42
General Workflow of a Simple Genetic
Algorithm
Unit-5 43
It provides a solution for a problem that improves over time.
Traditional Algorithms can only generate one result in the end, whereas
Genetic Algorithms can generate multiple optimal results from different
generations.
Unit-5 44
Traditional algorithms are deterministic in nature, whereas Genetic
algorithms are probabilistic and stochastic in nature.
Method for measuring the quality of any proposed solution, using a fitness
function.
Basic principles :
An individual is characterized by a set of parameters: Genes
Fitness is measured in the real world (‘Struggle for life’) of the phenotype.
Algorithmic Phases :
Unit-5 45
Simple_Genetic_Algorithm()
{
Initialize the population;
Calculate Fitness Function;
Unit-5 46
Binary Encoding: Most common methods of encoding. Chromosomes are
string of 1s and 0s and each position in the chromosome represents a
particular characteristics of the solution.
Unit-5 47
Genetic Algorithms
Genetic Algorithms(GAs) are adaptive heuristic search algorithms that belong
to the larger part of evolutionary algorithms. Genetic algorithms are based on
the ideas of natural selection and genetics. These are intelligent exploitation of
random searches provided with historical data to direct the search into the
region of better performance in solution space. They are commonly used to
generate high-quality solutions for optimization problems and search
problems.
Genetic algorithms simulate the process of natural selection which means
those species that can adapt to changes in their environment can survive and
reproduce and go to the next generation. In simple words, they simulate
“survival of the fittest” among individuals of consecutive generations to solve a
problem. Each generation consists of a population of individuals and each
individual represents a point in search space and possible solution. Each
individual is represented as a string of character/integer/float/bits. This string is
analogous to the Chromosome.
2. Those individuals who are successful (fittest) then mate to create more
offspring than others
3. Genes from the “fittest” parent propagate throughout the generation, that is
sometimes parents create offspring which is better than either parent.
Unit-5 48
4. Thus each successive generation is more suited for their environment.
Search space
The population of individuals are maintained within search space. Each
individual represents a solution in search space for given problem. Each
individual is coded as a finite length vector (analogous to chromosome) of
components. These variable components are analogous to Genes. Thus a
chromosome (individual) is composed of several genes (variable components).
Fitness Score
A Fitness Score is given to each individual which shows the ability of an
individual to “compete”. The individual having optimal fitness score (or near
optimal) are sought.
The GAs maintains the population of n individuals (chromosome/solutions)
along with their fitness [Link] individuals having better fitness scores are
given more chance to reproduce than others. The individuals with better fitness
scores are selected who mate and produce better offspring by combining
chromosomes of parents. The population size is static so the room has to be
created for new arrivals. So, some individuals die and get replaced by new
arrivals eventually creating new generation when all the mating opportunity of
the old population is exhausted. It is hoped that over successive generations
better solutions will arrive while least fit die.
Each new generation has on average more “better genes” than the individual
(solution) of previous generations. Thus each new generations have
better “partial solutions” than previous generations. Once the offspring
produced having no significant difference from offspring produced by previous
populations, the population is converged. The algorithm is said to be converged
to a set of solutions for the problem.
Unit-5 49
Once the initial generation is created, the algorithm evolves the generation
using following operators –
1) Selection Operator: The idea is to give preference to the individuals with
good fitness scores and allow them to pass their genes to successive
generations.
2) Crossover Operator: This represents mating between individuals. Two
individuals are selected using selection operator and crossover sites are
chosen randomly. Then the genes at these crossover sites are exchanged thus
creating a completely new individual (offspring). For example –
Unit-5 50
Example problem and solution using Genetic Algorithms
Given a target string, the goal is to produce target string starting from a random
string of the same length. In the following implementation, following analogies
are made –
Characters A-Z, a-z, 0-9, and other special symbols are considered as
genes
Unlike traditional AI, they do not break on slight change in input or presence
of noise
Mutation testing
Code breaking
Unit-5 51
Expert system shells streamline the development of expert systems by providing a pre-configured environment with key components such as a user interface, inference engine, and an empty knowledge base. This setup allows easier integration and manipulation of domain-specific knowledge, significantly reducing development time. They also support various knowledge representation methods and can integrate with databases . Compared to developing from scratch, shells offer commercial viability and simplicity in configuring expert systems to specific domain needs .
Expert systems simulate human-like decision-making through domain-specific knowledge bases and inference rules, explicitly codifying expertise to solve specific problems. In contrast, artificial neural networks emulate human cognitive processes through learning from data patterns and self-adjusting weights within a network of nodes, which enables them to identify complex patterns and generalize better across varied inputs. While expert systems are rule-based, ANNs rely on learning through exposure to data, enabling different strengths in domains like structured diagnostic tasks versus unstructured pattern recognition .
The knowledge engineer plays a pivotal role in the development of expert systems by gathering domain-specific knowledge from experts and translating it into a format that the system can process. They ensure that the knowledge base is properly populated with accurate and comprehensive data, which directly influences the system's accuracy and reliability. The knowledge engineer collaborates with software engineers to integrate this into the pre-designed system structure, ultimately determining the expert system's effectiveness in real-world applications .
The main disadvantages of artificial neural networks include the lack of a straightforward methodology for determining network structure, unrecognized behavior during operation, hardware dependency for parallel processing capabilities, the necessity for transforming problems into numerical data, and an unknown exact training duration. These limitations impact their implementation by making design and deployment more complex and resource-intensive. Moreover, the ambiguity regarding the reasoning behind network outputs can hinder trust in critical applications .
Backpropagation and multilayer networks enhance the functionality of artificial neural networks by allowing more complex pattern recognition and learning from data. Unlike single-layer networks, which are limited in processing and extracting features due to their simple architecture, multilayer networks can model complex interactions through multiple interconnected neurons across layers. Backpropagation facilitates error correction across these layers, improving the network's learning efficiency and accuracy in tasks such as image or speech recognition .
The inference engine within an expert system is crucial as it applies logical rules to the knowledge base to deduce new information or solve problems. It can operate using either forward chaining, where it applies rules beginning with known facts, or backward chaining, which starts with a conclusion and works backwards to find supporting facts. This engine retrieves and applies relevant rules to the data in the knowledge base, effectively simulating human reasoning .
High performance and reliability are critical characteristics of expert systems because they ensure accurate and timely decision-making akin to human experts. In specialized domains such as medical diagnosis or chemical analysis, these traits impact the system's ability to handle complex tasks with precision and offer confidence to human users in its recommendations. The meticulous knowledge representation and rigorous testing contribute significantly to achieving these characteristics, thereby determining the system's effectiveness and adoption in critical applications, like diagnosing diseases with minimal error .
Genetic algorithms differ from traditional algorithmic approaches by using a population-based search and evolutionary techniques inspired by natural selection to find optimal solutions. They encode potential solutions as strings (chromosomes) and employ operations like selection, crossover, and mutation to evolve better solutions over generations. Unlike traditional algorithms, which typically follow a single-path logical step, genetic algorithms explore multiple paths simultaneously, making them highly effective for complex, multi-modal problems with vast search spaces .
Neural networks maintain fault tolerance through their distributed architecture, where multiple neurons contribute to the final output. This redundancy means that if some neurons fail or are altered, the network can still function reasonably well, albeit with potential reduced accuracy. Fault tolerance is crucial for ensuring robustness and reliability, especially in applications where guaranteed performance is necessary despite unforeseen failures or disruptions .
Learning methods in neural networks, such as supervised, unsupervised, and reinforcement learning, play a crucial role in training the network to discern patterns and extrapolate from acquired data. These methods adjust the synaptic weights and biases within the network to improve its performance and accuracy. The impact on generalization is significant; effective learning methods enable neural networks to better handle unseen data, make predictions, and adapt to new tasks, which is critical for successful deployment in varied and dynamic environments .