Category : Miscellaneous Language Source Code
Archive   : ESIE.ZIP
Filename : MANUAL.ESI

Output of file : MANUAL.ESI contained in archive : ESIE.ZIP


The Expert System Inference Engine

Knowledge Engineer's


Lightwave Consultants August 1985
P.O. Box 290539
Tampa, FL 33617

Copyright 1985, All Rights Reserved.

The ESIE distribution diskette, of which this manual is one
file, may be freely copied and distributed. Printed copies
of this manual, or this manual without the rest of the files
on the distribution diskette, may not be copied or reproduced
in any form.

Page 2

Table of Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . 3

What is Shareware? . . . . . . . . . . . . . . . . . . . 4

What is ESIE? . . . . . . . . . . . . . . . . . . . . . . 5

Why ESIE? . . . . . . . . . . . . . . . . . . . . . . . . 6

ESIE Requirements . . . . . . . . . . . . . . . . . . . . 9

The ESIE Distribution Diskette . . . . . . . . . . . . . 11

Starting ESIE . . . . . . . . . . . . . . . . . . . . . . 12

The ESIE Top Level . . . . . . . . . . . . . . . . . . . 13

The ESIE Rule Structure . . . . . . . . . . . . . . . . . 14

Some Example Knowledge Bases . . . . . . . . . . . . . . 18

Building Your Own Knowledge Base . . . . . . . . . . . . 20

What Happens During a Consultation . . . . . . . . . . . 22

Paying For and Obtaining the Next Version of ESIE . . . . 23

Planned Enhancements to ESIE . . . . . . . . . . . . . . 24

Bibliography . . . . . . . . . . . . . . . . . . . . . . 25

Biography . . . . . . . . . . . . . . . . . . . . . . . . 26

For Helen

Page 3


ESIE (pronounced "easy") is the acronym for Expert System
Inference Engine. ESIE is, according to many people working
in Artificial Intelligence, an "expert system shell."

With ESIE you can put some "smarts" into your personal
computer. You can build custom "knowledge bases" (KBs) that
can be used to aid people, like you and me, in doing things
that we would not be capable of doing, or doing as well,
without the system. ESIE knowledge bases can be built to
help us make decisions or make our computers "more human."

This manual is designed for the person who already has some
experience in the field of Artificial Intelligence (AI). If
this applies to you - then hi! - we probably met somewhere.
If not I urge you to print and read the files TUTOR and
HISTORY which will give you: a small history and working
knowledge of AI, help you learn about ESIE, give you enough
information to build your own knowledge bases, and provide
some tips for building better knowledge bases in the future.
If you only intend on using ESIE with a knowledge base
written for you, then you need only print and read the file

For those for whom this manual was intended I expect that you
will have done some work, or at least some reading, in
knowledge based applications. I can only assume that you
know something about rule structures, knowledge
representation, and inferencing. If you need to bone up on
this information, might I suggest that you scan over the file

In any case, welcome to ESIE. ESIE is my own work and I take
full responsibility for its abilities and its shortcomings.

Page 4

What Is Shareware?

Shareware is a software distribution concept. In shareware,
it is believed: that people will pay for something they find
useful, that most software costs too much, that copy
protection schemes can sometimes be frustrating even to the
most honest user, and that software users want to support
software authors while not necessarily supporting the
software middle men.

Shareware is a marketing concept. The term was probably
originally coined by Bob Wallace of Quicksoft, Inc. Mr.
Wallace wrote PC-Write (c), a shareware full-feature text
editor. I personally like PC-Write and prefer it as my own
editor. I believe you will find PC-Write useful and to that
end I will send you a copy of it if you "pay" for ESIE at the
$145 level. Many of the Shareware ideas in ESIE come
directly from PC-Write(c) and I offer my public thanks.

ESIE is distributed under the Shareware concept. You receive
the software first, from whatever source that may be, and pay
only what you think the software is worth. You are free, and
encouraged, to share copies of the distribution diskette with

ESIE is marketed under the shareware concept. I prefer to
think of ESIE as living software: software that continues to
develop and get better, more powerful. I believe ESIE is a
useful tool as it is, but can be improved. However, support
for living software must come from somebody. Even software
authors and AI researchers can't live on discovery and love
alone. In shareware this support comes from you - the user.

If you feel that ESIE is useful to you, send what your
conscience dictates. ESIE is paid for on the honor system.
However, if you send at least $75 you will receive the most
recent version of ESIE, free. If you send at least $145 you
will receive: the most recent version of ESIE, fully
commented source code for ESIE (ESIE was written in Pascal),
my sincere thanks for your support, a copy of PC-Write (c) -
a shareware full-feature text editor fully compatible with
ESIE, and access to a help line, all free.

Your comments towards ESIE are solicited even if you do not
desire support. For this, please print and fill out the file
FORM and send it in. Mail and money for ESIE can be sent to:
Lightwave Consultants; P.O. Box 290539; Tampa, FL 33617.

Page 5

What Is ESIE?

ESIE is the acronym for Expert System Inference Engine, and
that is exactly what it is. ESIE loads in a knowledge base,
and builds inferences out of the rules contained therein, to
act like an Advisor. It is an Artificial Intelligence expert
system shell. An infinite multitude of knowledge bases can
be used by ESIE.

The normal gamut of expert systems (ES) can be built for and
used by ESIE. Tools such as system configurators, medical
experts, oil and gas exploration, etc, can all be done in
ESIE. ESIE is a rule-based backward chaining inference

The acronym was also selected because ESIE is easy to use.
If you are like me, then you've pulled out more than a few
hairs trying to work with the complexity of most ES shells
(ESS) available today. I can vividly remember thinking,
"They've got to be kidding" with at least three different
ESSs. Further, I am sure that if I uncovered one more
"undiscovered" bug in an ESS that I would be a permanent
resident at Bellevue.

ESIE is not like that. It's easy to use and easy to learn.
It's a fairly simple system so that I feel good about the
testing and debugging that went into ESIE. Since ESIE was
written in Pascal, and not a pirated version of something
hard to debug, like Prolog, it should hold you in good stead.

If you were, or are, currently working for a corporation or
university then you are also aware of the difficulty in
getting management approval for a very expensive piece of
equipment. ESIE is built to put some competitiveness into
the ESS market. ESIE is very inexpensive and rivals many
ESSs in power and it beats nearly all in speed. The
shareware distribution concept fits that definition well.
Knowledge based inference engines have a rather small market
at present, but that soon may change. The advent of low cost
and readily available software might help the spread and
acceptance of AI.

Page 6


Why did I build ESIE? Well, there are lots of reasons, and
one of the most important is cost. Since you are a qualified
AI person you are well aware of how much systems can cost.

The best LISP processor in existence today will cost you more
than $100,000.00 per person. Software and development time
to build any expert system can jack the price up
substantially. Now say you have targeted an area that looks
pretty applicable to be "AIed." You know that when the
system is complete you will want to install it in, say, fifty
locations. You take six months to develop the first working
model and spend $450,000.00 doing it. After you install your
fifty stations you realize you have just spent $6,700,000.00.

Your Vice President, in charge of new technology, unhooks his
Thompson Automatic from the showcase wall and commits a most
unnatural form of suicide. You would have to be working in
some very high stakes game in order to recoup 6.7 million
dollars through an expert system. Do you think the fifty
installation points was to small? The numbers only get worse
if you add more stations. The real cost to you comes in the
form of specialized processors and software to run them.

Many AI departments that I know of realize the problems
inherent in a high stakes game of specialized processors,
especially when the field is a new one to the company and the
department. Therefore, many groups are turning towards
existing hardware to meet their processing needs. Wisely,
many are choosing micro computers because cost of
installation is drastically reduced, and in many cases micros
already exist at the target. This makes the cost of
installation equal to development cost plus software cost.

Great. So lets look at personal computer software cost.
Believe it or not, there is quite a bit of AI software out
there for personal computers. I have some kind of problem
with all of it. Cost is still the biggest factor. Let's
pick a popular price for an ESS in the marketplace:
$12,000.00. Now your installation cost is way down, and
because the package is a little more personal and available
to your researchers, you are able to complete initial
development in five months and spend $350,000.00. Now you
install the system in your fifty locations, and you are
lucky: every one of them has a personal computer available.
You step back to admire your handiwork and realize you have
just spent $950,000.00. The head of your department leaves
work early and takes a long swim in the cooling tower of Unit
2 at Three Mile Island.

Page 7
Obviously, cost is one of the great advantages of ESIE - its
free. So lets say you decide to use ESIE on your target
project, and that you take five months and $300,000 to build
Release One. Let's also assume that, for whatever reason,
you decide to pay for support for all fifty+ copies of ESIE
that you need. (That would certainly make my day!) After
your fifty station installation you realize you have only
spent $307,250. The president of your corporation hands you
the highest company award, and you get your picture on the
cover of your company magazine - you are a hero.

In addition to cost, availability is also key to your success
as an AI department. You may freely make as many copies of
the distribution diskette of ESIE as you like. Try that with
another ESS, and, if you get past the copy protection, do it
while staying out of jail. ESIE is instantly available to
everyone in your group as well as everyone in your company.
I personally have waited four months for a diskette to arrive
- AFTER the check had been mailed from our accounting
department. You can use ESIE now and forever with ease.

Some of the other available packages that look really good to
you may be difficult or impossible to obtain. Many colleges
and universities will be more than happy to discuss their
latest and greatest at conventions but ask for a copy?
Forget it. Also, some systems will only run on certain
machines - machines you may not have and certainly do not
want to buy. ESIE will run on any MS/PC DOS computer with
color or monochrome monitor and only 128 KB of RAM.

ESIE is also easy to use and to learn. Of the knowledge
bases distributed with ESIE, both DOCTOR and ANIMAL took less
than eight hours apiece to build. I admit a little bias
here, after all, I did build ESIE. So, it may take you ten
hours, but you probably are better than me at KBs so it may
only take you six.

Another super advantage of ESIE is that you can obtain the
source code. If you want to see the insides of an inference
engine this is one of the best ways to do it. Most other
system vendors get very edgy if you ask them how their system
works. Also, if you decide that there is a feature that you
simply MUST have in an ESS then you can change ESIE to fit
your needs. However, if you print and fill out the file
called FORM, with your requests for additional features, I
might be persuaded to add them for you. I certainly want to
keep improving ESIE.

Last, but not least, is speed. This is one of my own pet
peeves concerning many ESSs today - they are just too slow.
Many departments have switched to more powerful micros, such
as the IBM PC AT (r), to offset slow software. Well, ESIE
will run on those, too, but it doesn't have to. ESIE is
fast, - very fast - compared to most ESSs in existence today.
Page 8
Spend some time to do a benchmark of ESIE against any other
system. I think you will be pleasantly surprised.

All of the above are benefits to be gained from using ESIE:
you drastically cut your costs (a hero maker in many a
department), better availability to your software, easy to
learn and use - cutting training time and costs and
increasing productivity, obtainable source code, and much
improved speed.

Page 9

ESIE Requirements

In order to use ESIE you don't need much at all. For
hardware you will need: an MS-DOS (r) or IBM (r) computer
with at least 128 KB of RAM, and a monitor. ESIE should run
on any MS-DOS (r) computer, (it has been tested on several),
but I just can not guarantee that it will run on your
particular machine. ESIE will run on the IBM PC jr, PC, XT,
and AT (r).

ESIE uses colors to make the whole system more user friendly.
Therefore, a color monitor is recommended, but not required.
Personally, I prefer to work with colors, especially in
something that may be hard to follow - like AI. With a color
monitor, ESIE: works with a blue background, has a top level
with white text, asks questions in light cyan, gathers
responses in light magenta, reports invalid responses in light
red, performs trace functions in yellow, reports a completed
session in yellow, and reports KB errors in light red.

For software you only need DOS version 2.0 or higher,
(including 3.0 and 3.1), and a word processor. Any word
processor will do, but the word processor needs to be capable
of producing flat or ASCII, files. You probably already have
all the software you need. If you are not sure if your word
processor produces flat ASCII files there are two tests: 1)
try to build a short program with your word processor and run
it through any compiler - if the compiler gets an upset
stomach there is a good chance you need a different word
processor, 2) take any text file you created with your
editor, and at the DOS command level enter TYPE , where
is the file you edited. If your file looks like a video
game then you need a different editor. If it TYPEd your file
as you had entered it then you are probably OK.

If your editor does not produce flat files then do not panic.
If you pay for a copy of ESIE at the $145 price I will send
you one. The editor is called PC-Write (c) and it is a
full-screen full-feature text editor. Of all the editors I
have I prefer PC-Write. It just seems to "feel" the best for
me. PC-Write is also a shareware product. I did not create
PC-Write - it is a product of Quicksoft, Incorporated, and
was written in whole or in part by Bob Wallace. If you can
not stand waiting then you might check with your local PC
User's Group - there is a good possibility they have

Many word processors produce flat files as a matter of
course. Nearly any text editor that is designed to be used
by programmers, and therefore produce compilable source code,
Page 10
generally produce flat files. Those word processors that are
designed to be used primarily by office personnel, for the
creation of correspondence, sometimes do not. They use a
compression scheme, and often a coding scheme to control
paging, in order to save disk and RAM space. I think it is a
silly idea, but they never did listen to me.

If you are hell bent on using your current text editor, and
it is one of those that do not produce flat files, then you
still may be in luck. In many of these editors you have an
option of producing a flat file from your edited file through
a process usually labeled exportation. By selecting that
option through a menu you can produce a flat file that
compilers, and ESIE, can read. One word of caution: make a
copy of your file FIRST before attempting exportation. It
seems that many companies did not bother to do much testing
of this function and I have trashed many a file trying to
export. Importing the file, or getting it back into editor
format, is usually much worse. I wouldn't even attempt it if
I were you, but good luck if you do.

In whatever editor you choose, the margins and spacing can be
set to whatever you choose. ESIE reads from the file in free
format. That means that your file can look pretty strange if
you want it to. As long as the syntax is in the correct
order the file will load properly. If it does not then ESIE
will report an error in the knowledge base and return you to

Page 11

The ESIE Distribution Diskette

The first thing you should do is make a backup copy of the
ESIE distribution diskette. This will protect you in case
your working diskette gets damaged and will make it easier
for you to pass along ESIE to your friends and associates.
You can make a backup copy of ESIE using the DOS COPY or
DISKCOPY command.

You are free, and encouraged, to distribute copies of the
distribution diskette to friends and associates. The
definition of the distribution diskette is one that contains
the following ten files in their original condition. You may
not distribute any file without the others.

Everything you need except hardware, DOS and an editor, is on
the ESIE distribution diskette. These are the ten files
found there:

ESIE.COM - the ESIE system.
MANUAL - this manual.
READ.ME - a quick start guide.
FORM - form to use for
correspondence on ESIE.
ANIMAL - an animal KB.
GLASS - a glass KB.
DOCTOR - a doctor KB.
TUTOR - AI tutor.
USER - manual for the end users.
HISTORY - short history of AI.

Page 12

Starting ESIE

Getting ESIE fired up will probably be one of the easiest
things you do today. The only two files you need in the
computer to use ESIE are the ESIE.COM file and the file where
the KB is. Of course, you may have as many files out there
as you wish. For purposes of example, it will be assumed
that you are using the ANIMAL example KB provided with the
distribution diskette. When you start to build your own KBs,
simply substitute that file for ANIMAL. ESIE will run in any
drive and directory, including hard disks, as long as the
ESIE.COM and KB files are present.

When you have at least the above two files where you want
them, simply type in ESIE at the DOS prompt. The ESIE
introductory screen will appear. It contains information
about the Shareware concept and some benefits you will
receive if you pay for your copy of ESIE.

At the top of the introductory screen is a prompt asking you
to supply the file name where the knowledge base may be
found. You may enter any name you please. If the file
exists, then ESIE will attempt to load that file. If no
loading errors are found, then ESIE will take you to the top
level. If there are errors in loading the KB, then ESIE will
list where it found the errors and return you to DOS. If the
file does not exist, then you have the option of trying
again. Just hitting the 'Y' or the 'N' key will answer this
prompt. ESIE loads files faster than most, if not all, other
ESSs, but be patient if you are loading a very large KB,
especially from floppy diskette.

Page 13

The ESIE Top Level

You will know when you have reached the top level by the
distinctive ESIE prompt. It looks like this: "==>". At the
top level you have four different command options: TRACE ON,
TRACE OFF, GO, and EXIT. While you can have as many leading
and trailing blanks as you wish, ESIE is not quite free form
on the command line; you must have one and only one space
between the TRACE and YES/NO options. Other than that, ESIE
is free form.

Importantly, ESIE is case insensitive. Caps look just the
same as smalls to ESIE. This is also true in the KB and in
end user responses. ESIE is case insensitive everywhere. I
like this feature. I hate building rules to take care of the
same idea but duplicated everywhere to take care of case, and
the idea that a variable means something different because
the first letter is capitalized drives me up the wall.

When you first enter the top level, trace is off by default.
You can turn trace on using the TRACE ON command. Use trace
when you are building your own KB and want to follow
execution in order to debug the KB. Turning trace on will
tell the system to constantly keep you informed of what it is
currently looking for and what information it has learned.

You can turn the trace back off again by entering the TRACE
OFF command.

The GO command is the command to tell ESIE to begin a
consultation with the KB that was loaded. ESIE will continue
with this consultation until it is complete or until an error
is found in the logic of the KB. You may not turn trace on
or off once a consultation has begun. If the user types in
TRACE ON, TRACE OFF, GO or EXIT in response to a question,
then ESIE will treat that as the response to the question.

Once ESIE has completed the consultation, or found an error
in the logic of the KB, it will return you to the top level
for additional commands.

Use the EXIT command in order to leave ESIE and return to
DOS. After a consultation is complete, you have the option
of entering ANY of the four commands, including GO, again.

Page 14

The ESIE Rule Structure

There are five types of rules in ESIE. That's all. Two of
the rule types must be included once and only once, one may
be included once or not at all, and the other two may be
included from zero up to the maximum number of times, which,
you will find, is quite large for a system like this.

If you are familiar with IBM (r) manuals, then you will
probably be able to read the following; then again, those
never were my favorite manuals. Below is the syntax for the
five types of rules in ESIE:

[legalanswers is/are []... *]

goal is

[if is/are
[and is/are ]...
then is/are ]...

[question is/are ""]...

answer is/are ""

Let me list some specifics, first, then I'll go into what
each rule does.

First and foremost: BLANKS are the only recognized delimiter
in ESIE. There must be at least one blank between any two
tokens in the KB. End-of-line and end-of-file are treated
like blanks. This may seem a little cumbersome at first,
especially to those of you who are used to special
characters, such as quotation marks, also being considered as
delimiters. ESIE is built this way primarily for speed. If
blanks are the only recognized delimiter, then file loading
can occur at a much greater clip. Anyway, I believe you will
soon get used to tapping the space bar if you are not
currently doing so.

In the syntax above the '/' means "either or" you must
choose between 'is' and 'are' for that one spot. This
capability was added basically to enhance the readability of
your new knowledge bases.

The definition of and might be a little
different to what you are used to. In ESIE a or
can be ANY string of non-blank characters, including
special and extended ASCII characters, up to 40 characters
Page 15
long. Blanks may not appear in a or .
ESIE will treat small and capital letters identically.
Therefore, all the following are valid and





The last two of the above are identical as far as ESIE is
concerned. Although special characters are valid in
and , and may even lead such items, it
would be a good idea to stay away from the mathematical
symbols. Although ESIE does not currently do math, (it
currently is designed for ideas, symbols, and other uses),
that capability will probably be added in the future.
Therefore, if your KB is loaded full of math symbols, it may
not be compatible from one version of ESIE to the next. In
this regard, especially look out for the minus sign - it
habitually gets used in multi-word . A better
alternative would be to use the period.

The symbol "..." in the rule definition above means "repeat
as often as desired", and that is exactly what you may do, as
long as you are not exceeding some maximum.

The brackets mean that the item is optional. You will note
that LEGALANSWERS, IF, and QUESTION type rules may not even
be included in the KB, although a KB without rules isn't
going to be of much use.

The GOAL and ANSWER rules types must be included, and must be
in the KB only once. If the LEGALANSWERS rule type is
included, it can only be included once.

Although the above way of listing rules is the order I prefer
in a KB, there is absolutely no requirement that rules be
placed in the KB in any order. In a fully-structured KB, in
fact, the order of the rules is totally inconsequential, any
rule or any rule type may come before or after any other rule
or rule type. In some KBs the structure is not complete, so
it may be wise to place some rules before others. I'll make
this more clear in the Building Your Own Knowledge Base

The parts of the above rule types may be any of the
256 characters of the extended ASCII character set except for
the quotation mark. The quotation mark terminates .
Spaces are allowed in , but double quotation marks - to
indicate a single - are not. may be up to 80
Page 16
characters long and may include end-of-line characters, page
feeds, or whatever you wish to improve the appearance of your

Enough of the specifics, now I'll try to let you know what
these rules do.

The LEGALANSWERS rule is used to constrict what the end user
of your KB can use as responses. This is very useful to keep
the end user on track, and to correct him in case of typos or
misunderstandings. Using LEGALANSWERS can make testing your
KB much easier and more complete. If LEGALANSWERS is
omitted, then anything the end user types in is a valid
response. The splat, (*), is used to terminate the
LEGALANSWERS rule. Although the splat, by itself, is a
totally valid or I didn't think many of
you would want that as a valid response, so I use it as a
terminator. In the ANIMAL sample KB, for example, I restrict
responses to YES and NO.

The GOAL rule specifies what you are looking for, that is, it
determines what this consultation and KB are all about. The
IF rules and the QUESTION rules are used by ESIE to try and
find out what the of the GOAL should be set to.

The IF rules are the real meat of any KB. Here's how they
work: the right after the IF is evaluated, and
the evaluated value is compared to the if the two are
identical, then any AND parts are compared the same way.
Comparison stops on any rule were an IF part or an AND part
do not compare identically. However, if they are all
identical then the rule succeeds and the
immediately after the THEN is set to the last

specified in the rule. For example:

if age is over.18
and status is alive
then type.person is

Let's assume that age has already been set to 'over.18', that
status has been set to 'alive', and GOAL is TYPE.PERSON.
ESIE begins looking through the KB, starting at the top, for
IF rules that could satisfy the type.person goal. When it
finds the above rule it determines that yes, age is over.18
and status is alive, so the rule succeeds and type.person is
set to At this point evaluation stops and ESIE
makes its report and returns you to the top level.

The QUESTION rules are evoked by ESIE when it has gone
through the entire KB and can find no IF rule that satisfies
what it is currently looking for. It then checks to see if
it has a question that it can ask the end user so that it may
determine what a should be. The part of
Page 17
the question is displayed and whatever the end user types in
is what is set to, if the response is legal. If
LEGALANSWERS has been specified, then the response is checked
to see if it is one of legal ones. If it is not a legal
response, then ESIE will list the possible responses, and ask
the question again. This will continue until the end user has
selected one of the legal answers. If it is legal, then the
specified in the QUESTION rule will be set to the
response. If LEGALANSWERS has not been specified, then
whatever the user types in is legal.

The ANSWER rule is used only when ESIE is done. After ESIE
has found the in the goal statement he will
display the in the answer statement followed by the
evaluated from the in the ANSWER rule.
You will note that you do not have to display the same
as in the GOAL statement, but that you will often
want to.

Now for some limits. Just how much of this can you enter?

Up to 50 for LEGALANSWERS.
1 and only 1 GOAL.
Up to 400 IF rule lines.
Up to 100 QUESTION rules.
1 and only 1 ANSWER.

An IF rule line is a pair. For example:

if age is under.10
then type.person is child

has two rule lines, while:

if age is over.18
and status is alive
then type.person is

has three.

Page 18

Some Sample Knowledge Bases

In order to get you used to the ESIE rule structure, three
sample KBs have been included on the distribution diskette.

ANIMAL is a KB that plays "twenty questions" with you in
order to find out what type of animal you are thinking about.
Before typing in 'GO' to ESIE, after loading the ANIMAL KB,
think of an animal you want ESIE to try and find. Answer the
questions put to you about the animal and ESIE will find out
what animal it is in far less than twenty questions. ANIMAL
is a decision tree KB that is fully structured.

This is what a session with ANIMAL looks like. The splats
indicate output from ESIE:

Does your animal have a backbone? *
Is the animal warm blooded? *
Normally, does the female of your animal nurse *
its young with milk? *
Does your animal eat red meat? *
Does your animal have finger wings? *
Does your animal have an opposing thumb? *
Does your animal have a prehensile tail? *
Is your animal nearly hairless? *
I think you animal is a MAN *
I have completed this analysis. *
==> *

DOCTOR is a KB that is used to diagnose diseases in children.
Do not take DOCTOR too literally, please. I am no physician,
and the information in the KB came out of a single book. The
KB was built in about 8 hours. The DOCTOR KB is there just
to show off ESIE and is not meant to replace your physician.
DOCTOR is a decision tree KB also and is not fully

I coded DOCTOR and ANIMAL in two distinct styles in order to
Page 19
demonstrate ESIE's capabilities. Take a minute to review
them and learn how they operate.

GLASS is rather special for me. First, I didn't write it. I
asked a friend of mine to be one of my beta testers for ESIE
and she came up with GLASS. She has no experience in AI
whatsoever. GLASS demonstrates ESIE's ease of use. GLASS is
used to give an evaluation of antique or depression era
glass, which has gathered quite a following from what I

Page 20

Building Your Own Knowledge Base

Since you are a qualified practitioner of AI I certainly am
not going to try and tell you how to build your own KBs.

I assume that you have done all the necessary front work and
are prepared with all the information you need.

One thing that I can tell you about rule positioning. When
you have a KB that is not fully structured, rule positioning
can be important. You need only worry about rule positioning
if the in the conclusions are identical, and the
comparators are similar. This becomes obvious in the
following two rule example:

if has.fever is yes
then type.disease is roseola

if has.fever is yes
and has.inflamed.ears is yes
then type.disease is serious.ear.infection

As ESIE is searching for 'type.disease' he comes across the
first rule and invokes a QUESTION for has.fever. The end
user specifies yes so ESIE concludes that type.disease is
roseola and terminates this consultation. However, the child
really had a serious ear infection, but ESIE never got that
far. A better way to arrange the rules would be:

if has.fever is yes
and has.inflamed.ears is yes
then type.disease is serious.ear.infection

if has.fever is yes
then type.disease is roseola

Now, when ESIE encounters the first rule he invokes a
question to find has.fever. Since the answer is yes he
invokes the QUESTION to determine if the child has inflamed
ears. Since the answer is yes, ESIE reaches the correct
conclusion that the type.disease is a serious ear infection.

In general, you only need to worry about rule placement in
the IF category, when the in the conclusion are
identical, and the comparators are similar.

To build your own KB simply use your chosen text editor to
edit a file and start filling the file with rules. I might
suggest, dear reader, that you make a couple of "play" KBs
just to get used to ESIE, before you really dig in with the
real world ones. Follow the guidelines for ESIE outlined in
Page 21
The ESIE Rule Structure, and I'm sure you will have no
problem. Although I would love to help everyone out there
who is trying to debug a KB, I will offer telephone support
only to the individuals who have paid the $145 price for

When you have enough rules in a KB to test what you have,
simply start ESIE the way you would ANIMAL. When you get to
the top level I suggest you turn trace on until you have the
KB fully debugged. Then run through it, testing paths, using
the GO command. Good luck! (I know, you are not
superstitious, but it can't hurt, can it?)

Page 22

What Happens During A Consultation

After ESIE has loaded the KB into internal structures, and
the GO command has been issued, ESIE then pushes the GOAL
onto a stack. The stack contains items to be searched for,
currently looking for the one at the top of the stack. Then
ESIE looks through the IF rules for a conclusion that matches
the current stack. When one is found then ESIE looks through
the comparators, one at a time, until one is found to be not
equal to its value, or they are all found to be equal.

ESIE checks each comparator by pushing it on the stack and
continuing in this fashion. When ESIE can not find an IF
rule in the KB with a conclusion identical to what is on the
stack then ESIE turns to the QUESTIONs and LEGALANSWERS to
get information from the end user. Any legal response is
what the is set to.

Often ESIE does not need to push anything on the stack as the
comparator already has a value and it is equal to the value
specified in the KB. In this case the rule succeeds and the
conclusion is set to the . In this way
ESIE continues to get information and pop search items off
the stack until it learns what the GOAL variable is, or until
ESIE has searched the entire KB and found nothing that
determines what the GOAL is. In the later case
ESIE reports an error in the knowledge base and returns you
to top level. In the former, ESIE reports the ANSWER
and and then returns you to top level.

Page 23

Paying For and Obtaining the Next Version of ESIE

Now comes the part we all hate to discuss. What is ESIE
going to cost? Well, that is totally up to you. I happen to
be one of those people that believe that most people are
honest and will pay for something they find useful. I also
believe that most software costs too much, and that all AI
software costs way too much. I dislike copy protection
schemes and there are none in ESIE. And I believe that you
will want to see ESIE grow and be supported.

If you feel that ESIE is useful to you, send what your
conscience dictates. However, if you send at least $75 you
will receive the most recent version of ESIE, free. If you
send at least $145 you will receive: the most recent version
of ESIE, fully commented source code for ESIE (ESIE was
written in Pascal), my sincere thanks for your support, a
copy of PC-Write (c) - a shareware full-feature text editor
fully compatible with ESIE, and access to a help line, all

Regardless of how you feel towards ESIE, I ask that you do
two things: 1) Print and fill out the file FORM so that I
may keep improving ESIE, and 2) share copies of the
distribution diskette with at least two people, preferably
one of them outside your organization.

I think of ESIE as living software: software that continues
to develop and get better, more powerful. I believe ESIE is
a useful tool as it is, but can be improved. However,
support for living software must come from somebody. Even
software authors and AI researchers can't live on discovery
and love alone. In shareware this support comes from you -
the user.

Mail and money for ESIE can be sent to: Lightwave Consultants;
P.O. Box 290539; Tampa, FL 33617.

Page 24

Planned Enhancements to ESIE

As the current version of ESIE is being wrapped up and taken
out of beta test, a few additional capabilities for ESIE have
been suggested. Some of these sound like good ideas and are
listed below. They will be part of ESIE version 2.0.

1. Adding the capability for introductory text to explain
the KB.

2. Adding the capability for more terminating text, to
explain the conclusion more fully.

3. Designating legal responses on a question by question
as well as global basis.

4. Performing some type of automatic completion of
responses, so the end user does not have to key in the
entire response every time.

A. I'm not so sure about this one. Why not just
include those as part of the LEGALANSWERS?

5. Numerical computations.

6. A 256 KB RAM ESIE.

7. A 512 KB RAM ESIE.


Page 25


Classification of the Animal Kingdom, An Introduction of
Evolution; by Kenneth Jon Rose; David McKay Company, Inc.,
New York, 1980.

The Common Sense Book of Baby and Child Care; by Benjamin
Spock, M.D.; Duell, Sloan, & Pearce, New York; 1957.

  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : ESIE.ZIP
Filename : MANUAL.ESI

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: