Artificial Intelligence Module-V
Artificial Intelligence Module-V
o Searches in which two or more players with conflicting goals are trying to explore the
same search space for the solution, are called adversarial searches, often known as
Games.
o Games are modeled as a Search problem and heuristic evaluation function, and these are the
two main factors which help to model and solve games in AI.
o Perfect information: A game with the perfect information is that in which agents can look
into the complete board. Agents have all the information about the game, and they can see
each other moves also. Examples are Chess, Checkers, Go, etc.
o Imperfect information: If in a game agents do not have all information about the game and
not aware with what's going on, such type of games is called the game with imperfect
information, such as tic-tac-toe, Battleship, blind, Bridge, etc.
o Deterministic games: Deterministic games are those games which follow a strict pattern and
set of rules for the games, and there is no randomness associated with them. Examples are
chess, Checkers, Go, tic-tac-toe, etc.
o Non-deterministic games: Non-deterministic are those games which have various
unpredictable events and has a factor of chance or luck. This factor of chance or luck is
introduced by either dice or cards. These are random, and each action response is not fixed.
Such games are also called as stochastic games.
Example: Backgammon, Monopoly, Poker, etc.
Zero-Sum Game
o Zero-sum games are adversarial search which involves pure competition.
o In Zero-sum game each agent's gain or loss of utility is exactly balanced by the losses or
gains of utility of another agent.
o One player of the game try to maximize one single value, while other player tries to minimize
it.
o Each move by one player in the game is called as ply.
o Chess and tic-tac-toe are examples of a Zero-sum game.
Game tree:
A game tree is a tree where nodes of the tree are the game states and Edges of the tree are the
moves by players. Game tree involves initial state, actions function, and result Function.
The following figure is showing part of the game-tree for tic-tac-toe game. Following are some key
points of the game:
o From the initial state, MAX has 9 possible moves as he starts first. MAX place x and MIN place
o, and both player plays alternatively until we reach a leaf node where one player has three in
a row or all squares are filled.
o Both players will compute each node, minimax, the minimax value which is the best
achievable utility against an optimal adversary.
o Suppose both the players are well aware of the tic-tac-toe and playing the best play. Each
player is doing his best to prevent another one from winning. MIN is acting against Max in
the game.
o So in the game tree, we have a layer of Max, a layer of MIN, and each layer is called as Ply.
Max place x, then MIN puts o to prevent Max from winning, and this game continues until
the terminal node.
o In this either MIN wins, MAX wins, or it's a draw. This game-tree is the whole search space of
possibilities that MIN and MAX are playing tic-tac-toe and taking turns alternately.
Step-1: In the first step, the algorithm generates the entire game-tree and apply the utility function
to get the utility values for the terminal states. In the below tree diagram, let's take A is the initial
state of the tree. Suppose maximizer takes first turn which has worst-case initial value =- infinity,
and minimizer will take next turn which has worst-case initial value = +infinity.
Step 2: Now, first we find the utilities value for the Maximizer, its initial value is -∞, so we will
compare each value in terminal state with initial value of Maximizer and determines the higher
nodes values. It will find the maximum among the all.
Step 3: In the next step, it's a turn for minimizer, so it will compare all nodes value with +∞, and will
find the 3rd layer node values.
Step 4: Now it's a turn for Maximizer, and it will again choose the maximum of all nodes value and
find the maximum value for the root node. In this game tree, there are only 4 layers, hence we reach
immediately to the root node, but in real games, there will be more than 4 layers.
o Complete- Min-Max algorithm is Complete. It will definitely find a solution (if exist), in the
finite search tree.
o Optimal- Min-Max algorithm is optimal if both opponents are playing optimally.
o Time complexity- As it performs DFS for the game-tree, so the time complexity of Min-Max
algorithm is O(bm), where b is branching factor of the game-tree, and m is the maximum
depth of the tree.
o Space Complexity- Space complexity of Mini-max algorithm is also similar to DFS which
is O(bm).
Alpha-Beta Pruning
o Alpha-beta pruning is a modified version of the minimax algorithm. It is an optimization
technique for the minimax algorithm.
o As we have seen in the minimax search algorithm that the number of game states it has to
examine are exponential in depth of the tree. Since we cannot eliminate the exponent, but we
can cut it to half. Hence there is a technique by which without checking each node of the
game tree we can compute the correct minimax decision, and this technique is
called pruning. This involves two threshold parameter Alpha and beta for future expansion,
so it is called alpha-beta pruning. It is also called as Alpha-Beta Algorithm.
o Alpha-beta pruning can be applied at any depth of a tree, and sometimes it not only prune
the tree leaves but also entire sub-tree.
o The two-parameter can be defined as:
a. Alpha: The best (highest-value) choice we have found so far at any point along the
path of Maximizer. The initial value of alpha is -∞.
b. Beta: The best (lowest-value) choice we have found so far at any point along the path
of Minimizer. The initial value of beta is +∞.
o The Alpha-beta pruning to a standard minimax algorithm returns the same move as the
standard algorithm does, but it removes all the nodes which are not really affecting the final
decision but making algorithm slow. Hence by pruning these nodes, it makes the algorithm
fast.
o α>=β is the main Condition for Alpha-Bata Pruning.
Step 1: At the first step the, Max player will start first move from node A where α= -∞ and β= +∞,
these value of alpha and beta passed down to node B where again α= -∞ and β= +∞, and Node B
passes the same value to its child D.
Step 2: At Node D, the value of α will be calculated as its turn for Max. The value of α is compared
with firstly 2 and then 3, and the max (2, 3) = 3 will be the value of α at node D and node value will
also 3.
Step 3: Now algorithm backtrack to node B, where the value of β will change as this is a turn of Min,
Now β= +∞, will compare with the available subsequent nodes value, i.e. min (∞, 3) = 3, hence at
node B now α= -∞, and β= 3.
Step 4: At node E, Max will take its turn, and the value of alpha will change. The current value of alpha will be
compared with 5, so max (-∞, 5) = 5, hence at node E α= 5 and β= 3, where α>=β, so the right successor of E
will be pruned, and algorithm will not traverse it, and the value at node E will be 5.
Step 5: At next step, algorithm again backtrack the tree, from node B to node A. At node A, the
value of alpha will be changed the maximum available value is 3 as max (-∞, 3)= 3, and β= +∞,
these two values now passes to right successor of A which is Node C.
At node C, α=3 and β= +∞, and the same values will be passed on to node F.
Step 6: At node F, again the value of α will be compared with left child which is 0, and max(3,0)= 3,
and then compared with right child which is 1, and max(3,1)= 3 still α remains 3, but the node value
of F will become 1.
Step 7: Node F returns the node value 1 to node C, at C α= 3 and β= +∞, here the value of beta will be
changed, it will compare with 1 so min (∞, 1) = 1. Now at C, α=3 and β= 1, and again it satisfies the condition
α>=β, so the next child of C which is G will be pruned, and the algorithm will not compute the entire sub-tree
G.
Step 8: C now returns the value of 1 to A here the best value for A is max (3, 1) = 3. Following is the final
game tree which is the showing the nodes which are computed and nodes which has never computed. Hence
the optimal value for the maximizer is 3 for this example.
Expert System
An expert system is a computer program that is designed to solve complex problems and to provide decision-
making ability like a human expert. It performs this by extracting knowledge from its knowledge base using
the reasoning and inference rules according to the user queries.
The expert system is a part of AI, and the first ES was developed in the year 1970, which was the first
successful approach of artificial intelligence. It solves the most complex issue as an expert by extracting the
knowledge stored in its knowledge base. The system helps in decision making for complex problems
using both facts and heuristics like a human expert. It is called so because it contains the expert knowledge
of a specific domain and can solve any complex problem of that particular domain. These systems are
designed for a specific domain, such as medicine, science, etc.
The performance of an expert system is based on the expert's knowledge stored in its knowledge base. The
more knowledge stored in the KB, the more that system improves its performance. One of the common
examples of an ES is a suggestion of spelling errors while typing in the Google search box.
o DENDRAL: It was an artificial intelligence project that was made as a chemical analysis expert
system. It was used in organic chemistry to detect unknown organic molecules with the help of their
mass spectra and knowledge base of chemistry.
o MYCIN: It was one of the earliest backward chaining expert systems that was designed to find the
bacteria causing infections like bacteremia and meningitis. It was also used for the recommendation of
antibiotics and the diagnosis of blood clotting diseases.
o 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.
o CaDeT: The CaDet expert system is a diagnostic support system that can detect cancer at early stages.
Characteristics of Expert System
o High Performance: The expert system provides high performance for solving any type of complex
problem of a specific domain with high efficiency and accuracy.
o 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.
o Reliable: It is much reliable for generating an efficient and accurate output.
o Highly responsive: ES provides the result for any complex query within a very short period of time.
o User Interface
o Inference Engine
o 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 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.
2. Inference Engine(Rules of Engine)
o The inference engine is known as the brain of the expert system as it is the main processing unit of the
system. It applies inference rules to the knowledge base to derive a conclusion or deduce new
information. It helps in deriving an error-free solution of queries asked by the user.
o With the help of an inference engine, the system extracts the knowledge from the knowledge base.
o There are two types of inference engine:
o Deterministic Inference engine: The conclusions drawn from this type of inference engine are
assumed to be true. It is based on facts and rules.
o Probabilistic Inference engine: This type of inference engine contains uncertainty in conclusions,
and based on the probability.
o Forward Chaining: It starts from the known facts and rules, and applies the inference rules to add
their conclusion to the known facts.
o Backward Chaining: It is a backward reasoning method that starts from the goal and works backward
to prove the known facts.
3. Knowledge Base
o 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.
o It is similar to a database that contains information and rules of a particular domain or subject.
o 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.
o Factual Knowledge: The knowledge which is based on facts and accepted by knowledge engineers
comes under factual knowledge.
o Heuristic Knowledge: This knowledge is based on practice, the ability to guess, evaluation, and
experiences.
Knowledge Representation: It is used to formalize the knowledge stored in the knowledge base using the If-
else rules.
Knowledge Acquisitions: It is the process of extracting, organizing, and structuring the domain knowledge,
specifying the rules to acquire the knowledge from various experts, and store that knowledge into the
knowledge base.
Development of Expert System
An expert system is a computer program that simulates the thought process of a human expert to solve
complex decision problems in a specific domain. The expert system’s knowledge is obtained from expert
sources which are coded into most suitable form. The process of building an expert system is called
knowledge engineering and is done by a knowledge engineer. The knowledge engineer is a human with a
background in computer science and AI and he knows how to build expert systems. A knowledge engineer
also decides how to represent the knowledge in an expert system and helps the programmers to write the code.
Knowledge engineering is the acquisition of knowledge from a human expert or any other source. The
different stages in the development of an expert system are illustrated in figure.
The knowledge engineer uses sample cases to test the prototype for any deficiencies in performance.
End users test the prototypes of the ES.
Test and ensure the interaction of the ES with all elements of its environment, including end users,
databases, and other information systems.
Document the ES project well.
Train the user to use ES.
Here, we will explain the working of an expert system by taking an example of MYCIN ES. Below are some
steps to build an MYCIN:
o Firstly, ES should be fed with expert knowledge. In the case of MYCIN, human experts specialized in
the medical field of bacterial infection, provide information about the causes, symptoms, and other
knowledge in that domain.
o 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.
o The ES will need a questionnaire to be filled by the patient to know the general information about the
patient, such as gender, age, etc.
o 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.
o In the end, it will provide a response to the patient by using the user interface.
1. Expert: The success of an ES much depends on the knowledge provided by human experts. These
experts are those persons who are specialized in that specific domain.
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.
3. End-User: This is a particular person or a group of people who may not be experts, and working on
the expert system needs the solution or advice for his queries, which are complex.
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:
1. No memory Limitations: It can store as much data as required and can memorize it at the time of its
application. But for human experts, there are some limitations to memorize all things at every time.
2. High Efficiency: If the knowledge base is updated with the correct knowledge, then it provides a
highly efficient output, which may not be possible for a human.
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
4. Not affected by emotions: These systems are not affected by human emotions such as fatigue, anger,
depression, anxiety, etc.. Hence the performance remains constant.
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.
7. Regular updates improve the performance: If there is an issue in the result provided by the expert
systems, we can improve the performance of the system by updating the knowledge base.
o Advising: It is capable of advising the human being for the query of any domain from the particular
ES.
o Provide decision-making capabilities: It provides the capability of decision making in any domain,
such as for making any financial decision, decisions in medical science, etc.
o Demonstrate a device: It is capable of demonstrating any new products such as its features,
specifications, how to use that product, etc.
o Problem-solving: It has problem-solving capabilities.
o Explaining a problem: It is also capable of providing a detailed description of an input problem.
o Interpreting the input: It is capable of interpreting the input given by the user.
o Predicting results: It can be used for the prediction of a result.
o Diagnosis: An ES designed for the medical field is capable of diagnosing a disease without using
multiple components as it already contains various inbuilt medical tools.
There are many different methods of knowledge acquisition, including rule-based systems, decision trees,
artificial neural networks, and fuzzy logic systems. The most appropriate method for a given application
depends on the nature of the problem and the type of data available.
Rule-based systems are the simplest form of knowledge-based system. They use a set of rules, or heuristics, to
make decisions. Decision trees are another common method, which use a series of if-then-else statements to
arrive at a decision.
Artificial neural networks are a more complex form of knowledge-based system, which mimic the way the
human brain learns. They are able to learn from data and make predictions based on that data. Fuzzy logic
systems are another type of complex knowledge-based system, which use fuzzy set theory to make decisions.
The most important part of knowledge acquisition is the interpretation of information. This is where human
expertise is required. Machines are not able to interpret information in the same way humans can. They can
only make sense of data if it is presented in a certain way.
Humans need to select the right data and experiences to create knowledge. They also need to interpret that
data correctly. This is where artificial intelligence can help. AI systems can automate the process of
knowledge acquisition, making it faster and more accurate.
One of the challenges in knowledge acquisition is that it is often difficult to know what information is relevant
to the problem at hand. Another challenge is that the process of acquiring knowledge can be time-consuming
and expensive.
Despite these challenges, knowledge acquisition is an essential part of artificial intelligence. By gathering and
interpreting information, artificial intelligence can identify patterns and relationships that would be difficult
for humans to find. This allows artificial intelligence to solve problems more efficiently and effectively.
1. Expert systems: In this method, experts in a particular field provide rules and knowledge to a computer
system, which can then be used to make decisions or solve problems in that domain.
2. Learning from examples: This is a common method used in machine learning, where a system is presented
with a set of training data, and it “learns” from these examples to generalize to new data.
3. Natural language processing: This is a method of extracting knowledge from text data, using techniques
like text mining and information extraction.
4. Semantic web: The semantic web is a way of representing knowledge on the internet using standards like
RDF and OWL, which can be processed by computers.
5. Knowledge representation and reasoning: This is a method of representing knowledge in a formal way,
using logic or other formalisms, which can then be used for automated reasoning.
One of the key challenges in AI is knowledge acquisition – that is, acquiring the right data and information to
train AI models to be effective. This can be a challenge for a number of reasons.
First, data can be expensive to acquire. In some cases, it may be necessary to purchase data from third-party
providers. This can be a significant cost, especially for small businesses or startups.
Second, data can be difficult to obtain. In some cases, it may be necessary to collect data manually. This can
be time-consuming and expensive.
Third, data can be noisy. That is, it can contain errors or be incomplete. This can make it difficult to train AI
models effectively.
Fourth, data can be biased. That is, it can be skewed to favor certain outcomes. This can lead to AI models
that are not effective or that produce results that are unfair.
Finally, data can be dynamic. That is, it can change over time. This can make it difficult to keep AI models
up-to-date.
A skeletal knowledge engineering language is simply a stripped down expert system-that is, an expert
system with its domain-specific knowledge removed (shell), leaving only the inference engine and
support facilities. The general-purpose knowledge engineering language can handle many different
problem areas such as knowledge extraction, giving inference or making user interface though its use is
rather tedious. These languages have a range of generality and flexibility.
The MYCIN system for diagnosing and treating bacterial infections became the skeletal system EMYCIN,
and the CASNET consultation system for glaucoma became the skeletal system EXPERT.
Skeletal systems provide structure and built in facilities which make system development easy and fast.
But they lack generality and flexibility; they only apply to a restricted class of problems and greatly
reduce the expert- system builder’s design options.
a. EMYCIN: This skeletal knowledge engineering language is essentially MYCIN with the domain
knowledge removed.
EMYCIN uses a rule-based knowledge representation scheme with a rigid backward chaining control
mechanism which limits its application to diagnosis and classification-type problems. However, the
system provides sophisticated explanation and knowledge acquisition facilities which clearly speed
expert system development.
Emycin is useful K.E. language for diagnostic properties so it has been used to build expert systems in
medicine, geology, engineering, agriculture, and other areas.
An EMYCIN rule has the form IF antecedent THEN consequent. A context tree organises EMYCIN objects
in a simple hierarchy and provides some of the inheritance characteristics of a frame system. EMYCIN
associates a certainty value ranging from -1 (false) to +1 (true) with every expression in an antecedent.
The IF portion of a rule is considered to be true if its certainty is greater than some threshold (say 0.2)
and false if below some other threshold (say – 0.2). EMYCIN uses special evidence- combining formulas
to decide how to combine the certainties in the antecedent and update the certainty of the consequent.
b. EXPERT:
This skeletal knowledge engineering language uses a rule based knowledge representation scheme and
has a limited forward chaining control mechanism which makes it suitable for diagnosis and classification
type problems. EXPERT has built-in explanation, knowledge acquisition, and consistency
checking facilities to speed system development.
The consistency checking module works by storing a data base of representative examples with known
conclusions and using it to test the expert system after the knowledge engineer adds new rules. If a case
(example) does not produce correct conclusion EXPERT displays the reasoning for that case so that the
knowledge engineer can understand how the new rules led to the unexpected results.
EXPERT has been used to build diagnostic programs in medicine, geology, and other areas.
Since EXPERT was designed to handle consultation problems in medicine, it structures knowledge to
facilitate medical interpretation. Rules in EXPERT distinguish between findings and hypotheses. Findings are
observations like a patient’s age or blood pressure, while hypotheses are conclusions inferred from findings or
other hypotheses. In EXPERT, findings have the form if finding-name, truth-value), while hypotheses have
the form h(hypothesis-name, certainty-interval).
The truth value is t if the finding is true and f if false. The certainty interval represents the confidence
the expert has in the hypothesis, for example, h (mtrl, 0.2:1) means conclude hypothesis matrl with a
confidence of 0.2 to 1. Confidence values range from -1 (complete denial) to 1 (complete confirmation).
c. OPS5:
This general-purpose knowledge engineering language uses a rule-based representation scheme which
works via forward chaining. The system generality supports diverse data representation and control
structures within a single program. OPS5 has a powerful pattern-matcher and an efficient interpreter for
matching rules against the data but lacks a sophisticated support environment.
It has no built-in explanation or acquisition mechanisms and has only minimal facilities for program
editing and debugging. OPS5 is the latest in a succession of similar rule-based languages (for examples,
OPS, OPS4) which evolved from work at Carnegie-Mellon University in developing programming
languages for modeling human cognition and memory.
OPS5 and the earlier languages in the OPS series have been used for many cognitive psychology, AI, and
expert system applications. Figure 12.18 shows some of these applications.
An OPS5 rule has the form antecedent consequent, where the antecedent describes data elements and
the consequent specifies the actions to take if the antecedent matches the data base. Data elements in
OPS5 are objects described by a set of attribute-value pairs.
d. ROISE:
This general-purpose knowledge engineering language combines a rule-based representation scheme
with a procedure-oriented language design. Thus ROSIE programs are typically nested procedures and
functions, each defined as a set of rules.
ROSIE has a English-like syntax which makes its code quite readable, powerful pattern-matching routines for
matching the rule premises against the data, and control over remote jobs via an interface to the local
operating system. ROSIE’s support environment includes editing and debugging tools but no built in
explanation or acquisition facilities.
ROSIE has been used to build expert systems in a variety of problem domains, including law, crisis
management, and the military.
ROSIE programs take the form of rule sets, each defined to be either a procedure, a generator, or a
predicate. A procedure is like a subroutine: It performs some task and then returns control to the
portion of the program which called it. A generator is like a function: It returns a value or set of values.
For example, a generator for determining medical costs would return a specific amount in rupees when
given the name of an injured party. A predicate is a function which always returns either true or false,
with which we have already become very familiar.
ROSIE’s efficient expressive power and lucid readability speed up the development of expert systems
which use complex and detailed rules.
Type # 3. System-Building Aids:
The system-building aids consist of programs which help acquire and represent the domain expert’s
knowledge and programs which help design the expert system under construction. These programs
address very difficult tasks; many are research tools just beginning to evolve into practical and useful
aids, although a few are offered as full-blown commercial systems.
Compared with programming and knowledge engineering languages, relatively few system-building aids
have been developed. Those which exist fall into two major categories; design aids and knowledge
acquisition aids. The AGE system exemplifies design aids, while TEIRSIAS, MOLE and SALT exemplify
knowledge acquisition, TIMM system construction and SEEK knowledge refinement aids.
a. AGE:
This software tool helps the knowledge engineer design and build an expert system. AGE provides the
user with a set of components which, like building blocks, can be assembled to form portions of an
expert system. Each component, a collection of INTERLISP functions, supports an expert system
framework, such as forward chaining, backward chaining, or a blackboard architecture.
b. MOLE:
This is a knowledge acquisition system for heuristic classification problem, such as diagnosing diseases.
In particular, it is used in conjunction with the cover-and- differentiate problem solving method. The
expert-system-produced by MOLE accepts input data, comes up with a set of candidate explanations or
classifications which cover the data, then uses differentiating knowledge to determine which one is best.
The process is iterative, since explanations must themselves be justified, until ultimate causes are
ascertained.
c. TEIRESIAS:
TEIRESIAS was developed by Davis in the mid-1970s as a vehicle for exploring new ideas in knowledge
acquisition and data base maintenance rather than as a tool for building expert systems, at the
university of Stanford (USA).
TEIRESIAS acquires knowledge interactively from an expert. If a wrong diagnosis has been made by
MYCIN, then TEIRESIAS will lead the expert back through the chain of incorrect reasoning until the
expert states where the incorrect reasoning started. While going back through the reasoning chain,
TEIRESIAS will also interact with the expert to modify incorrect rules or acquire new rules.
Type # 4. Tool Support Environment Facilities
a. Debugging Aids:
Most programming and knowledge engineering languages contain tracing facilities and break packages.
Tracing provides the user with a trace or display of system operation usual by listing the names (or
numbers) of all rules fired or showing the names of all subroutines called. A break package lets the user
tell the program, in advance, where to stop so the User can stop program execution just before some
recurring error and examine the current values in the data base. All expert system tools should have
these basic aids.
b. Knowledge Base Editors:
Most expert system tools provide a mechanism for editing the knowledge base. In the simplest case, this
is just a standard text editor for modifying rules and data by hand. But many tools include other facilities
in their support environment. For example, EMYCIN uses automatic book-keeping.
The EMYCIN editor monitors the changes made by the user and records pertinent information about the
event. If the user adds or changes a rule, the editor automatically stores the modification date and user
name with the rule for later reference. Knowledge engineers find this particularly useful when a number
of different experts modify or refine the knowledge base.
c. I/O Facilities:
Different tools deal with input/output in different ways. Some provide run-time knowledge acquisition
where mechanisms in the tool itself let the user converse with the running expert system. For example,
EMYCIN programs ask the user for needed information whenever they cannot find it in the knowledge
base. EXPERT programs not only ask for such information, but also provide menus for the user to select
from when inputting the requested information.
They also allow the user to input volunteered information as the expert system runs. Since a knowledge
engineer building a system in EMYCIN or EXPERT does not have to write code for runtime knowledge
acquisition, system development is easier, but flexibility is reduced. I/O must be handled the way the
tool designer decrees. Expert system tools may also handle I/O by providing a set of powerful
commands or procedures which make writing I/O routines easy.
d. Explanation Facilities:
Almost all expert systems can explain to users how they reach particular conclusions, though not all
provide the same degree of software support for explanation. Some, like EMYCIN, have a complete
explanation mechanism built into the tool itself, so that any expert system written in that language can
automatically access the mechanism. Others have no built-in explanation mechanism, thus forcing the
knowledge engineer to write one when building the expert system.
The most common type of explanation mechanism deals with retrospective reasoning; it explains how
the system reached a particular state. For example, the user may wish to know why the system needed
the answer to the question it just asked or how the system arrived at a certain conclusion.