You are on page 1of 12

An expert system for formulating lubricating oils

K. Lunn, I. G. Archibald, J. J. Redfearn, A. Robinson, A. Bamigboye, M. D. Cope


and B. T. Hird

Shell Research Ltd, Thornton Research Centre, PO Box 1, Chester CH1 3SH, UK

The formulation of lubricants for automotive engines involves the highest levels of human
decision-making. A project investigating the application of AI techniques to support this activity
has proved to be a challenging exercise. The aim is not to replace formulators, but to automate
only those aspects of their activity where it is reasonably practicable to do so. The basic approach
taken is to view formulation as a hierarchical planning activity, with deep knowledge represented
using a causal model. Formulation decisions are made by rule-bases which mix heuristic
knowledge and causal reasoning, together with the facility for formulators to enter their own
decisions. Decisions are represented as constraints and alternative decision paths are maintained.
Representation of knowledge in a manner accessible to the end users is a key issue, with substantial
amounts of the construction and maintenance of the knowledge base handled by the formulators
themselves. Problems in the interpretation of statements about such a complex domain have
been highlighted. The formulation system integrates with existing information technology,
especially databases. Whilst complete automatic formulation is viewed as technically feasible,
the support of formulators in more routine matters is seen as the only practicable means of
applying AI technology to lubricant formulation.
Key Words: formulation, design, planning, causal reasoning, knowledge acquisition,
constraint-based reasoning, least-commitment.

1. I N T R O D U C T I O N range of potential additives. Additives are used to


improve the lubricant by reducing wear or deposition or
A project to investigate the application of AI to the other forms of deterioration of an engine. Additives may
formulation of lubricating oils for automotive car engines have side-effects, or may interact, in a beneficial or
began in 1985. Initially this was part of an Alvey project deleterious manner. Inside an engine, the physical and
involving Schering Agrochemicals Limited and Logica chemical processes which influence the performance and
UK Limited. The wider Alvey project had the more degradation of a lubricant are only partially understood.
general aim of investigating the application of AI to the Changes in engine design, materials used, environmental
formulation process; this meant identifying, where restrictions and general expectations mean that require-
possible, common themes among a broad class of ments change continually. A formulator must make
formulation activities. The Alvey project concluded decisions based on incomplete information, unreliable
mid-1987, producing a publicly available report 1 5 and information, and an incomplete understanding of many
a number of prototypes; confidentiality considerations of the processes involved. A formulator is continually
have prevented public demonstration of many of these learning and re-learning his craft.
prototypes, but a demonstrator containing no com- Tackling such a demanding task as the application of
mercially sensitive data does exist. AI to this process is justified by the insight gained into
This paper presents a Shell Research Limited both AI and lubricating oil formulation. Formulation of
perspective on the Alvey project, and reports on lubricating oils is costly in terms of human resource, and
continued work in this area. The chief conclusion of the in terms of materials expenditure on testing. This means
Alvey project was that applying current AI techniques that anything which might reduce costs is worthy of
to formulation is feasible and that systems which exploration. Further, for large volume products, small
formulate adequately can be constructed. Practical reductions in lubricant costs can result in large scale
implementation of an operational system involves far savings. A secondary justification is the development of
more than technical feasibility, and we have since tried useful spin-offs, both for the formulation department and
to identify and solve many of the potential problems. in other AI projects.
The formulation of lubricants for automotive engines The key issue in determining the likely success of an
involves the highest levels of human decision-making. A operational system, given the premise that a working
modern lubricating oil consists of a base oil (or mixture system can be produced, is the ease with which it can be
of such) and a number of additives chosen from a wide maintained. At this point we seem likely to encounter a
common problem of combinatorial complexity which
limits the rate at which a system can be updated. This
Paper accepted October 1990. Discussion closes September 1991.
problem exists in X C O N 6, a system which produces
© Shell Research Limited
Reproduced by Computational Mechanics Publications with their kind computer system configurations from a statement of
permission. customer requirements, and requires a large team of

© 1991 Computational Mechanics Publications


74 Artificial Intelligence in Engineering, 1991, Vol 6, No 2
An expert system f or formulating lubricating oils: K. Lunn et al.

full-time maintenance staff. The configuration problem the limited knowledge of the processes involved and
addressed by XCON is comparable in complexity with frequent changes in engine technology. A causal network
the formulation of lubricating oils, involving many appears to be the most acceptable model available, given
hundreds of components which can be mixed in many the lack of any existing formal model of the process
ways, but the criteria for success in X C O N are much involved.
simpler. To be successful, a lubricating oil formulation
must be tested by placing samples in a number of engines, 2.1. Knowledge elicitation
running those engines under controlled conditions and There are no textbooks on formulating lubricating oils.
dismantling them to determine the effect on components Learning the basic skills involves an apprenticeship which
such as wear and deposition. Repeatability on such tests can expand over many years. A great deal of factual
is often poor, and they are expensive and time- information exists, stored in manuals and computer
consuming. Additives interact, either enhancing or databases, but the process of formulating a lubricating
inhibiting each other, and additives have unwanted oil is not written down. At the beginning of the project
side-effects which must be controlled. there were few publications on knowledge acquisition;
It has become clear that with current state-of-the-art techniques such as those suggested by Breuker and
techniques an operational system could only succeed if Weilinga 7 were incorporated as the project progressed.
it could be maintained principally by the users of the To identify the formulation process, about fifty
system. The intervention of a knowledge engineer would interviews averaging about one hour took place over
lead to delays in modification, which would mean that 18 months. The early interviews were somewhat confused
the system was always out of step with the level of general and their chief value seems to have been in allowing the
knowledge in the formulation department. Hence, the interviewees to develop suitable techniques. Later
later stages of our work has involved the construction of interviews were better directed and proved very effective.
tools which should ease the modification of the system. Interviews were recorded and transcribed. The
In the long term, we see the capacity to learn as an transcriptions were then condensed into short English
integral part of such a system, but current induction summaries (no formal intermediate representation was
techniques are inappropriate, and other techniques are used) before encoding in prototypes. Transcribing a one
too immature. hour interview takes almost a day of a skilled typist's
The rest of this paper outlines the key aspects of the time, and analysing the interview can take a knowledge
Shell Research Limited contribution to the Alvey project engineer up to two days. Analysis of the interview requires
and the ensuing work. The post-Alvey work concentrated an understanding of the intent of the interview; for a
principally on adapting the concepts developed under third party, reading the transcriptions is difficult.
the Alvey project, and providing high quality interfaces. However, transcripts have proved very valuable for new
We begin by looking at the analysis and representation, members of the research team, and for established
then examine the m o s t ~ c e n t implementation. We shall members when revisiting the project. The cost of
conclude with some of-;the lessons learnt and possible transcription has been justified and, where appropriate,
future directions. we are using the same procedure with other projects.
Adequate alternatives to interviews could not be
identified. Acting as an observer proved inappropriate -
2. ANALYSIS AND R E P R E S E N T A T I O N
the formulation activity could take place over several
Considerable effort was expended in the acquisition of weeks, involving discussions with colleagues and private
formulation knowledge and much heartache was spent meditation both inside and outside the normal working
on finding suitable representations. The following hours and working environment. For the same reasons,
description is inevitably a distillation of the lengthy asking a formulator to write down what he did was
process undergone. A fuller description is given in the infeasible. Some consideration was given to video
Alvey public report 1 5. Some aspects of the original Alvey recording of interviews, but this seemed even more
project have diminished as we move toward practical off-putting than audio recording an interview, with little
implementations, and this is reflected below. extra information provided. Thus, whilst an interview
The core knowledge representation involves a causal was an artificial environment in which to formulate, it
network and a hierarchical task breakdown. Tasks are was the most practicable means of covering the greatest
implemented as rule bases, and the order of evaluation amount of ground without encroaching too heavily on
can change dynamically. Decisions are made by posting a formulator's time.
constraints, which need to be resolved. When alternative Early interviews were loosely structured, on a theme
decisions are possible, it is important to be able to explore which could be described as 'tell me all about
the consequences of any alternative. Finally, incor- formulating'. Three or four 'knowledge engineers' would
poration of a database of analytical and experimental be present with one or two formulators, putting the
data is required, to provide technical data on additives formulators on the defensive. Too often a formulator was
and provide experimental evidence to support form- asked to relate his activity to a particular method or way
ulation decisions. of describing it, rather than 'telling it like it is'. Broad
Initially there was some hope of formalizing the whole ranging interviews such as these are useful initially as a
process. There exist a few statistically derived mathe- way of familiarizing the knowledge engineers with the
matical models for performance prediction of lubricant domain, but they need to be handled with care - they
additives. However, their validity depends on reasonable are not the way to elicit the detailed knowledge of the
quantities of experimental data, and by the time sufficient domain expert(s).
data is avaiable, market requirements have often The early interviews led to an awareness that the
changed. Modelling an engine, including wear and interviewer's interpretation of an expert's statement
deposition processes, is technically very difficult, given influences what the expert will say. It is necessary to

Artificial Intelligence in Engineering, 1991, Vol 6, No 2 75


An expert system for formulating lubricating oils: K. Lunn et al.

prevent the interviewer over-constraining the expert's as a reasonable explanation of his own thought processes.
description. If the interviewer proffers a model of what We have become increasingly aware that verbal responses
the expert does, the expert may agree with that model to questions such as 'Why did you do that?' are more
because it is a good analogy even though there are major often than not post-rationalizations and justifications
mismatches with his own reasoning. It is impossible to rather than an accurate explanation of the decision-
remove this problem, and therefore it is important to be making process. For example 'Why did you add X?' often
aware of it and avoid the pitfalls. The dialogue between elicits the response 'Because it is good for Y', when it
interviewer and expert needs to be managed, and turns out that X is almost always used and is now used
inevitably that responsibility falls on the interviewer. habitually. Similarly a question such as 'What decision
It was soon recognized that the best way of proceeding do you make next?', elicits a response which implies that
was with one interviewer and one expert. Interviews need decision-making is a step-wise activity.
to be planned and to have clear goals. Two types ot Many arguments have arisen over how a formulator
interview developed. The first type was to obtain carries out his job. There are often major discrepancies
declarative knowledge about the chemical and physical between what a person does and what a person says he
properties of lubricating oil additives and engines. The does. The major lesson here is that we cannot be certain
second was to obtain procedural knowledge about how of accurately simulating an expert's reasoning. At best,
a formulator undertakes his job. we can build something which is behaviourally
The 'declarative knowledge' interviews proceeded equivalent.
along the lines of 'tell me all about additive X'.
Information was sought on its main functions, its 2.2. Causal reasoning
side-effects, the additives it worked well with, those it Much of a formulator's justification of his decisions is
worked badly with, when it was a good choice, when a along the lines of 'X is good for Y' or 'X is good for Y
bad choice. Similarly, interviews investigated all aspects which in turn is good for Z'. There are three major classes
of a particular engine test measurement such as wear on of object in the lubricating oil domain - namely additives,
cams, seeking information on which additives improved processes and measurements. Additives are used to
it and which additives made it worse. Much of the modify performance, and it is the set of additives and
information was interpreted by the construction of a their quantities which define a formulation. Processes
causal network (see later). These interviews were also cover oxidation of the oil, particle formulation, and many
used to construct rules about which additives are useful other activities or events in an engine. Measurements are
in which situations, and which interactions to avoid or hard evidence of the effect of a formulation, such as how
promote. much did a cam wear.
The objective of such interviews was to identify a Causal reasoning 8-1° is a powerful technique in a
'structure' to the declarative aspects of lubricating oil well-bounded domain, such as circuit diagnosis. In the
formulation. It was clear early on that the interviewing lubricant formulation domain~the connectivity of the
activity would be too time-consuming to allow network is high, and the qua'fitification of causation
maintenance of an operational system. How additives difficult or impossible. In the Alvey project, to represent
influence tests is often weakly understood since tests causation, links were prioritized and ad hoc means were
change sufficiently often to prevent collection of adequate used to chain across from additive to measurement.
statistical data. New additives are developed with Recent experience with an editor which allows a
improved functionality but unknown side effects and formulator to draw a network and modify priorities
interactions. To succeed with an operational system, it indicates that reasonable suggestions can be made using
will be necessary to construct updating facilities which a causal network; at the very least the causal network
allow the system to keep pace with changes in the real should prove to be a useful decision support tool.
world, and with a formulators perception and under- The network was constructed with 'isa' and 'class'
standing of that world. hierarchies and inheritance. Thus, if class X influences
The 'procedural knowledge' interviews proceeded class Y and x belongs to X, y belongs to Y and no direct
along the lines of 'please formulate for this specification'. link between x and y is recorded, a causal link is inherited.
Specifications were obtained either from previous This permits economical inclusion of additives where a
examples, or were made up by one formulator for another precise understanding of the behaviour has not yet been
to tackle. Occasionally a formulator was asked to resolve acquired.
the same problem twice with a suitable intervening Within the Alvey prototypes, the causal network is
period, which often resulted in a different solution; on used as a default when a suitable rule does not exist for
close examination this was usually the result of changes selecting an additive. It gives prioritized lists of additives
in understanding or newly acquired knowledge, but to consider and additives to avoid in order to improve
sometimes indicated that some decisions could be a measurement. Alternatively, it can give prioritized lists
arbitrary. The interviews aimed to come up with a of measurements which are improved or degraded by an
formulation in one to two hours of activity. Throughout additive. There was an intention to use the network for
the interview, the knowledge engineer would encourage justification of decisions (rule based or otherwise), but
the formulator to explain his reasoning. this was not explored. Recent prototypes have used the
A serious concern is that any structure imposed upon causal network as a critiquing tool, comparing two
the system will be inconsistent with the expert's activity. formulations in terms of their broad effects; for example
For example, a formulator works with a rough plan (or it is possible to indicate that one formulation is better
list of things to do), but the way he acts on that plan is than another in preventing wear, but worse at preventing
not clear. A computer specialist is inclined to force-fit deposition.
the formulators activity into an existing computational Recent prototypes have used a numeric tag to a causal
model, and the formulator is apt to agree with that model link. Tags are integers in the range - 5 to + 5. An ad

76 Artificial Intelligence in Engineering, 1991, Vol 6, No 2


An expert system f or formulating lubricating oils: K. Lunn et al.

hoc but very effective means of inferring causation across component, for example, might restrict the choice of other
intermediate nodes has been implemented. If X causes Y components because of unfavourable reactions. The 'least
degree N, and Y causes Z degree M, then X causes Z commitment' method of M O L G E N (Stefik TM) was
degree M , N / 5 . For example if additive-X causes seen initially to be the best fit to our understanding of a
oxidation with degree 3 (intuitively interpreted as a formulator's reasoning, recording decisions as con-
moderate positive influence), and oxidation causes wear straints which may involve disjunctions. A simple
with degree 4 (intuitively interpreted as a strong positive example would be the recording of an additive selection as
influence), then in the absence of any other link between 'additive-X or additive-Y', instead of making a firm
additive-X and wear, the system would calculate that choice. Later decisions may extend the constraint, say
additive-X causes wear with degree 2.4 (interpreted as a by making another additive selection which is dependent
moderately positive influence). on the earlier additive selection, resulting in a new
There was no theoretical justification to the combina- constraint of 'additive-V and additive-X or additive-W
tion rule presented above. It was a simple attempt to and additive-Y'. In this way, multiple alternative solution
improve the prioritization mechanism of the Alvey paths could be avoided.
prototype which adopted a number of ad hoc procedures Implementation of 'least commitment' proved prob-
for reasoning across links. We now recognize the need lematic. Constraint resolution can require substantial
to elaborate this mechanism, where the 'degree' measure knowledge, is often only a way of postponing a difficult
is some function of the quantity of the causer. For decision, and can result in redundant knowledge
example, doubling the quantity of an additive does not representation or poor partitioning of a solution.
double its effect on an engine test measurement. Further Moreover, complex constraints are not easily understood
research is required on this. Nonetheless, the simple by the user. On the whole, the Alvey project tried to
mechanism described above has proved more than avoid backtracking because of the potential combinatorial
adequate for identifying broad trends and discriminating explosion.
between strong and weak influences. Clues to why a formulator does not have these
Joint causation has also been modelled, so that X1, problems come from re-investigation of the interviews.
X2 . . . . . Xn can together cause Y. This allows modelling To begin with, the dialogue is full of asides about
of complementary additives where one additive enhances implications for other decisions. Whilst he is concen-
the effectiveness of another, or alternatively it can model trating on one activity, a picture is being built of other
conflicting additives where one additive inhibits or reacts activities. In an interview, a formulator is artificially
with another additive. Chaining across intermediate constrained, and adapts his explanations to questions
nodes is a simple extension of the above. If X1, X2 cause such as 'What do you do first?'. In practice he may
Y with degree M, and Y causes Z with degree N, then consciously visit and revisit a decision a number of times
X1, X2 cause Z with degree M , N / 5 . If X causes Y1 before settling on a solution. Furthermore, a formulator
degree M, and Y1, Y2 cause Z with degree N, then X, solves a problem over an extended period, not in one or
Y2 cause Z with degree M* N/5. two intense sessions; a number of times a formulator
Despite the weakness of causation as a quantifiable would ring up the day after an interview and start by
reasoning technique in this domain, it has proved saying 'I've been thinking about that and ...'. Least
valuable as an analysis tool and for inference. commitment is the best fit we found to this form of
Formulators have found this to be a very clear reasoning, but the implementable representations do not
representation of their domain, and it is encouraging that seem able to handle subtle nuances.
they are now making firm proposals on how the causal Another clue is to be found in recent publications on
network should be altered to more adequately fit their design 13 which suggest that good designers work by
understanding of the domain. There is significant adapting and combining previous examples (or some
potential for this as a decision support tool beyond its weak representations of such). This interpretation fits the
role in an expert system. Further research is underway interviews, though it was not explicit from the interviews.
on the inference techniques applicable to such networks, Subsequent work has substantiated this.
including the capture and reasoning over multiple After the Alvey project, least-commitment was
opinions, and reasoning based on some value associated abandoned as a reasoning strategy, and multiple decision
with a cause, such as the quantity of an additive. paths were permitted, with backtracking allowed either
automatically or under the direction of the user. Despite
initial fears of a combinatorial explosion, the later shift
2.3 Planning of emphasis towards a user-guided system acting
A formulator has a well-defined set of decisions to principally in a decision-support role has meant that the
make, such as choosing a dispersant or a detergent. The backtracking approach has been very effective.
consensus of the Alvey project was that planning was Despite these problems, as part of the Alvey project,
hierarchical and one step at a time. The ordering of plan a prototype was constructed which formulated with
steps was taken to be problem-dependent, and the tolerable accuracy based on a limited set of candidate
schedule was modifiable at run-time. A task which started additives and target measurements. The Alvey prototype
but which could not complete was able to suspend itself was tested by comparing results with those recommended
and reschedule after a later step had run. A task, on the by a formulator. Discrepancies between a formulator's
whole, either broke down into smaller tasks or solution and the system's solution were usually the result
transformed the formulation by either selecting a of changes in the formulator's understanding in the
component, quantifying a component, or posting a period between knowledge elicitation and completion of
weaker form of constraint. Plan steps were implemented the prototype. The formulator was happy with the way
as rules. in which the system went about making decisions, and
The key problem was task-interaction. Choosing a was able to relate new knowledge to the individual

Artificial Intelligence & Engineering, 1991, Vol 6, No 2 77


An expert system f or formulating lubricating oils: K. Lunn et al.

decisions made by the system. No formulation generated fmm~a~


by the system was tested in an engine.
The subsequent prototypes have placed more emphasis
+
on the user directing the solution, and exploring the sir~le_fo~Aulat~
potential solution space. The system provides an overall
framework with a plan of tasks to undertake. The user
can either let the system follow its plan automatically, zmc 2~nc ~lnc
or he can guide the system through a restricted set of
options to progress a formulation, or both. Multiple
t detergent detergent dctcrgent dct~cm d ~ t ~ t
paths are permitted - how this operates is described in
a later example. The system is now viewed as an
environment in which the formulator makes his own
;;
d~p~'=~L,~td~l~'~nt ~
+ ; + + d~p~s~t dL~'~m~t ~ a n t
decisions, mixed with system decisions where appro-
priate. The system also offers critiquing of decisions, such Fig. 1. A typicalformulation tree. Nodes represent tasks,
as comparison of two formulations using the causal such as 'choose zinc additive'. Tasks are defined by rules.
network. Validation of this is underway, and there is Multiple alternative rules for the same task 9enerate
every indication that this way of using a system is the alternative paths. The decisions resultin9 in a formulation
preferred solution. (or partial formulation) are defined by a single path from
The Alvey project demonstrated that at a behavioural root to leaf (or node)
level on a bounded problem, hierarchical step-by-step
reasoning does work. However, the time taken to
construct a system can result in a system which is out of with the plan of tasks necessary to complete the
date by the time it is installed. An environment which is formulation. A plan step creates a new world or set of
directed by the user, where the user can enter his own worlds from a formulation. A plan step involves a state
decisions and modify some aspects of the knowledge base, transition in either the formulation or the plan (or both).
is considered more appropriate and more acceptable for Thus if a candidate set of three additives could be used,
this type of domain. the system would generate three worlds with each of the
three possible choices, and explore the three alternatives
2.4. Constraint based reasonin9 in turn. The resulting tree is displayed in the prototype
A formulator, whilst making a decision, does not and the user can interrupt the process, directing search
appear to make a hard and fast choice at once. He may along alternative paths, or intervening with a decision of
decide on a list of suitable additives, and return to that his own and exploring the consequences. An example of
list for further refinement. He may decide not to use more such a tree is displayed in Fig. 1.
than a certain quantity of an additive to limit a side-effect, The presentation of what is effectively a decision tree
and return to make the choice on quantity later. To cope is important to our aim of providing a decision-support
with this, a formulation is constructed as a set of environment. Such a display is quite acceptable to the
constraints. A choice of one component may impose formulators. Each node of the tree represents a decision
constraints on the choice or quantity of other made (or to be made). Multiple alternate decisions might
components. be made. A decision might b e taken based on the system's
The system must reason with constraints. For example knowledge base or a decision may be made by the user.
there may be a constraint that the dispersant is to be The route through to a formulation might involve a
chosen from the set [a, b, c, d]. Later it may be decided to mixture of system and user decisions.
constrain the dispersant choice to be from the set I-c, d, e]. The benefits for a formulator are potentially many. To
The system must resolve these constraints to restrict the begin with, it is possible to record the decision process
dispersant choice to be from the set [c, d]. Similarly range and return to it. The structure imposed in effect
constraints on numbers must be handled, for example implements a methodology for formulating, giving
1 . 2 < x < 3 . 4 and 2 . 3 < x < 4 . 7 must be resolved to guidance to novice formulators and allowing standard-
2.3<x<3.4. ized communication of the decision process to other
Constraint-based reasoning was seen as one way of formulators. By mixing system decisions and his own
controlling combinatorial explosion, and removing the decisions, the user can supplement areas of his own or
need to backtrack. Unfortunately, resolving conflicting the systems weakness. Call out facilities exist to consult
constraints can require a great deal of knowledge about the causal network or to edit the rules in the system or
the origins of the constraints. One approach taken was to other support systems such as technical databases.
to have a weaker form of constraint, called a preference, Even without the system making any decisions, there will
which could be overridden. Another approach was to be benefits in using such a system as a means of recording
construct a knowledge-based constraint manager which a particular activity.
would referee conflicting constraints. The recent,
preferred solution is to allow backtracking, with 2.6. Databases
over-constrained decision paths being blocked. This Formulators make use of a substantial database of
seems to be a more readily comprehensible option for previous formulations. This database contains inform-
the users. ation on composition (i.e., what additives) and
performance (i.e., what engine test results). Substantial
2.5.Alternative world reasonin9 use is made of this database to corroborate decisions
To support hypothetical reasoning, the luboil made and to develop statistical models of additive
prototype supported alternate world views. A world behaviour. It was surprising to find that much of the
consists of a partial (or complete) formulation together formulators use of the information was derived from

78 Artificial Intelligence in Engineering, 1991, Vol 6, No 2


An expert system f or formulating lubricating oils: K. Lunn et al.

standard reports rather than from interactive queries. Shell Research Ltd considered Knowledge Craft to be a
Initial assumptions that this was technical conservatism useful prototyping tool, particularly the frame-based
proved wrong. Two prototypes were constructed which representation language CRL, but that operational
extracted information from the database. The first constraints would rule it out as a development tool.
prototype looked for a formulation which achieved Prolog was used extensively as a language for accessing
specified performance measures (expressed as ranges). and manipulating databases, both on an IBM 4341
The second prototype retrieved formulations which fitted (Rapport) and on a Symbolics (compiled Prolog
a chemical profile. Both required very complex queries database).
which took considerable time and effort to construct, Recently, the key aspects of the work have been
and long query times on the database. re-implemented and extended on a network of SUN/3
This taught us that a naive interface to the existing workstations using Quintus Prolog and the interfacing
database would be of limited value. A formulator can tool Prowindows. A suitable object-oriented extension to
work faster with a highlighter pen on a listing than with Prolog would be a benefit, but lack of one has not proved
a sophisticated query interface. Formulators extract far a great handicap - Prowindows is sufficiently close to an
more data than is necessary, and refine it off-line. An object-oriented system for the purposes of handling the
expert system would need to simulate this off-line activity. user-interface. Settling on a single language has greatly
The other lesson is that fully normalized databases, improved compatibility between components. Oracle has
whilst removing update and other integrity problems, been chosen as the new database implementation system
can seriously impede performance and reduce the clarity on a DEC Vax and this will facilitate remote access to
of the database structure for the end user. Introducing techical databases.
redundant representations can overcome the perform-
ance penalties and improve clarity. 3.2. Encoding of rules
Standard query languages do not easily support the The Alvey prototypes encoded rules in LISP. The Shell
browsing of data. For scientific applications, it is Research prototype required the rules to be edited as
common to want to find a set of entities which meet a LISP and compiled into the environment. More recently,
complex set of criteria. Each criterion may well result in the Prolog implementation has defined a simple language
a join in a relational database. A formulator works outlined briefly below.
iteratively, finding a superset of the entities required The rules are written according to the syntax:
based on strong selection criteria. He then repeatedly
sifts out unwanted entities, or adds in entities which were TASK: : C O M M A N D , C O M M A N D . . . . . C O M M A N D .
unwittingly sifted out. The sifting process may be driven
by constraints on data or sometimes the formulators To run a task, the commands are evaluated in turn.
knowledge of the type of entity. During the filtering Commands may fail, and backtracking to find an
process the formulator wants to examine information alternative solution to an earlier command is permitted.
about an entity, which in turn may require joins in a A task may have multiple rules, and each rule will be
relational database. Attempting to translate such a evaluated in an alternative world. Variables are recorded
process into a SQL query is non-trivial and likely to as either formulation or specification values, which may
result in very long retrieval times. Moreover, the query change during execution. The value of a variable may be
would not be generic. We suspect that such processing a symbol, a number, a list or a range.
of data is quite common in other areas, such as market Typical commands include the following:
analysis and trading, and that much of the processing of
data is off-line. We have attempted to tackle these run A - schedule task A for running.
problems, firstly with a query language (TREQL 14'15) run A a f t e r B - schedule task A to run after B.
which does automatic navigation and provides a run A b e f o r e B - schedule task A to run before task B.
user-oriented image of the database. Secondly, we are menu(A1, A2, .... An) - define a pop up menu with
investigating windowing mechanisms which allow the options A1 to An which are task names.
user iteratively to construct sets of entities and tag those On user selection of Ai, place Ai on the
entities with attributes. plan, and continue executing the plan.
if X t h e n Y - if X evaluates to true carry out Y.
3. I M P L E M E N T A T I O N if X then Y else Z if X evaluates to true carry out Y
otherwise carry out Z.
During the Alvey project a good deal of prototyping either A or B - run alternate worlds from here on, one
activity took place. Detailed discussion of this is available with the results of evaluating A, one with
in the Alvey public report l-s. The implementation the results of evaluating B.
described below outlines the work within Shell Research A < B proceed if the current range for A includes values
since the Alvey project ended, and differs in a number less than B, and modify the range of A to
of respects. The aim was to re-implement in an exclude values B or above.
operationally acceptable environment the key concepts A = B - proceed if the current range of A includes B, and
of the original work. Inevitably, some aspects have set A to B precisely.
changed. The emphasis has been on explicating the A in [ B 1 , . . . , Bn] - proceed if the current value of A
reasoning process, making it accessible and modifiable includes at least one of B1 to Bn, and set A
by the formulators themselves. to be the appropriate subset.
X = goodfor(A) - set X to the list of items which 'isa' X,
3.1. Software and hardware and are good for A on the causal net,
The Alvey consortium used Symbolics computers, ordering the list in decreasing causal
LISP and Knowledge Craft for much of the prototyping. strength.

Artificial Intelligence in Engineering, 1991, Vol 6, No 2 79


An expert system for formulatin9 lubricatin9 oils." K. Lunn et al.

The range manipulation is quite effective and was The system initially offers the user a screen as shown
motivated by statements such as 'use at least X % of in Fig. 2. The user can choose which of a number of
detergent Y', and 'never use more than Z % of detergent windows to display by selecting from a pop up menu
X'. A formulation may be produced which gives range attached to the windows icon (Fig. 3). The formulation
values rather than fixed values. Similarly, lists are useful tree starts off with the single node 'formulate'. Attached
to implement statements such as 'detergent X or detergent to this node is a pop-up menu which allows the user to
Y could be used here'; alternate world reasoning could enact the 'simpledbrmulate' or ' c o m p l e x J o r m u l a t e '
be used to examine the alternative possibilities, but later task. Let us assume that the 'simpled'ormulate' option
statements may reduce a list - in this way some of the is chosen. The following tasks would execute in turn
combinatorial explosion is reduced.
formulate - Offers a menu of two options to the user.
3.3. The inference engine in action
A simple knowledge base might be: s i m p l e _ f o r m u l a t e - Puts the tasks 'specify', 'zinc',
'detergent', 'dispersant' and 'test' onto the plan, in
formulate ::menu (simple_formulate, that order.
complex_formulate).
specify - Posts the constraint that 'camwear' must be
simple_formulate ::run specify, less than or equal to 9. Any task which attempts to
run zinc, violate this constraint will fail.
run detergent,
run dispersant, zinc - There are three rules here, so the formulation tree
run test. branches correspondingly (Fig. 4). The first rule
corresponds to the rightmost node displayed, and is
specify::camwear = < 9. the first to be executed.

zinc::camwear = < 8.5, zinc (rule 1) - The first rule further constrains 'camwear'
zinc_additive = super_zinc, to be less than or equal to 8.5, which does not conflict
detergent_additive in with the earlier constraint placed by the task 'specify'.
[expensive_detergent 1, The zinc additive is chosen to be 'super~zinc', and
usual_detergent2]. the detergent additive is chosen to be one of
zinc::8.5 < camwear < 9.5, 'expensive_detergentl' or 'usual_detergent2'.
zinc_additive = usual_zinc.
zinc::camwear > = 9.5, zinc_additive = cheap_zinc.

detergent ::detergent_additive in
[cheap_detergentl, cheap_detergent2].
detergent ::detergent_additive in
[usual_detergentl, usual_detergent2].
detergent ::detergent_additive in
[expensive_detergent 1,
expensive_detergent2],
dispersant_additive = expensive_dispersant.

dispersant ::dispersant_additive = goodfor (camwear). Fig. 3. The window icon. A pop up menu permits the user
to open or close a variety of windows which show different
test ::stop. aspects of the progress of the formulation

Fig. 2. The initial screen presented to the user. The top left is the unexplored formulation tree. The top right
presents the icons representin# the options available

80 Artificial Intelligence in Engineering, 1991, Vol 6, No 2


An expert system for formulatin 9 lubricating oils: K. Lunn et al.

LF - ARTIIqCIAL LUBRICANT FORMULK1OI detergent - There are three rules here, so the formulation
formulate tree branches correspondingly (Fig. 5). The first rule
corresponds to the rightmost node displayed, and is
the first to be executed.

detergent (rule 1) - This tries to constrain detergent_


additive to be one of 'cheap_detergentl' or
'cheap_detergent2'. The zinc rule (1) had earlier
constrained this to be one of 'expensive_detergentl'
or 'usual_detergent2'. Hence this task fails. The
~c ~c ~c system now backtracks to an earlier node, in this
case the second detergent task.

detergent (rule 2) - This tries to constrain detergent_


Fig. 4. A formulation tree, showing the branching caused additive to be one of 'usual_detergentl' or
by three alternative zinc rules 'usual detergent2'. The zinc rule (1) had earlier
constrained this to be one of 'expensive_detergentl'
or 'usual detergent2'. Thus detergent_additive is
given the value 'usual_detergent2'.
formulate
dispersant - This rule calls out to the causal network,
asking for a list of the dispersants which are good
for 'camwear'. There are three dispersants recom-
mended, so the formulation tree branches.

test - At this point, the formulation has completed. A


rule base might be constructed to take in the results
of engine tests, and to modify the formulation based
mc ~c ~c
on those results, and subsequent tests scheduled. In
our simple example, however, the system simply
stops. The final screen is described in Fig. 6. The
formulation is displayed in one window, the
detergent detergent detergent completed plan to this decision in another.

At this point, the user may continue exploring the


Fig. 5. A formulation tree showing the branching caused formulation space by popping up a menu on any node
by three alternative detergent rules where the plan still has outstanding tasks, and choosing

~c ~c ~c

detergent detergent detergent

dispersant dispersam disperumt stop

test

Fig. 6. The screen on completion of a formulation path. Two windows are displayed, showing the formulation and the
plan followed to achieve this formulation

Artificial Intelligence in Engineering, 1991, Vol 6, No 2 $1


An expert system f or formulating lubricating oils." K. Lunn et al.

the 'run task from here' option. A more extensively Similarly, the rules can be edited via a text editor called
explored formulation space is described by the from the main screen. Various windows can be opened
formulation tree in Fig. 7. and closed to display status information such as the rule
The causal network is illustrated in Fig. 8. Suggestions fired at a node, the plan of tasks to carry out at a node,
for dispersant_additives which are good for camwear will the formulation, and various rule traces. The status at a
be usual dispersant, cheap dispersant and expensive_ particular node is found by pointing at the node and
dispersant in that order of preference. pressing a mouse button.
The network editor is called by activating a pop-up The nodes on the tree are active, and a pop-up menu
menu on the edit icon on the inference engine display. allows inspection of the node, or the undoing of that

.4-- ~ ~ ~

detergent detergent detergent


S
detergent

dis rsant dispcrsant dispcrsant dispcrsantdis dispersant dispcrsant dis~rsant disp¢rsant dispersant

¢ ¢ ¢
test test test test test test test test test test test test

Fig. 7. The screen with a more fully explored formulation tree

[ ; A l i , % A I . N I - I WOI~,K I-I)1 l(J

tire j

~ g-'-ccc~-3 U---rrcr--3 ~'----c~--3 ~ ~ ~ ~


Fl|Qrlaee; Current v|evn~ne: 4:ilS:iBgpe, ~tl nes ds y 61~h Junef 1990

Fig. 8. A sample causal network as displayed by the causal network editor

82 Artificial Intelligence in Engineering, 1991, Vol 6, No 2


An expert system forformulatin9 lubricatin9 oils: K. Lunn et al.

node and its descendants. For example, the user might Views are switched via a pop-up menu. Objects can
wish to edit the rule base and redo a line of reasoning. disown (if it is a parent) or adopt other displayed objects.
The tree can be larger than the screen and scrolled around Objects can have multiple parents.
(as in Fig. 7). Causal links are created by clicking on a link icon
The user can amend the formulation state at a node, ('add new causer' or 'add new causes'), then clicking on
and then see the consequences. For example, the user the two items to link. The link value can be set to an
may want to see the consequences of choosing a different integer in the range - 5 to + 5 by activating a pop-up
dispersant, or a different level of dispersant. In this way, menu in the link bubble using a mouse button. Multiple
it is possible to mix system and user decisions. causers are allowed, and this is done by clicking on the
'new causers' icon, clicking on the object caused, then
3.4. The causal network editor clicking on the objects which together cause it.
An important goal of the later work has been to provide Items can be displayed either from a pop-up menu of
adequate means of presenting and editing the knowledge root parents or from a dictionary of all objects via a
base. One such tool is the causal network editor (Fig. pop-up menu on the background. Objects can also be
8). This gives a clear visual presentation of the causal displayed as children (as described above) of a displayed
network, and provides easy to use editing operations. object, as parents of a displayed object, as a causer of a
It takes less than thirty minutes for a novice to become displayed object, or as a causee of a displayed object. If
proficient in its use. the display is too crowded, objects can be removed from
New objects are created by selecting an option from the display (but not the network) by clicking on the 'hide'
a pop-up menu obtained by pressing a mouse button icon (cover) and clicking on the object to hide, or by
when the cursor is on the background. Names are typed dragging the object behind the curtain 'hide' icon.
directly into a box by highlighting the box with a Similarly objects can be deleted by clicking on the 'erase'
mouse-click. Objects can be arranged in hierarchies. For icon and clicking on the object to be deleted from the
example, to add a new child, the user clicks on the top-left network, or by dragging the object to be deleted into the
icon, clicks on the parent, and a new box appears ready 'bin' icon.
for the name of the object to be typed in. Not all of the It is possible to chain through the network obtaining
network can be displayed at once, and so there are a list of all objects which cause (directly or indirectly) a
options to display selected items. For example, to display particular object. An example is given in Fig. 9. A
an existing child, the user clicks on the icon second from particular causal link can be explained by clicking on the
top left, then on the parent, and the child appears line in the causers table. Similarly a list of all objects
underneath if there are multiple children a menu of caused can be obtained, together with an explanation of
them is offered. Different views of the network are the causal links used to establish a level of causality (see
allowed, displaying different subsets of the network. Fig. 10).

c0.4,[a2])
cO,[m])
c(3.6,[ai])
c(3,[n])
c(l.2,[b]) (isa(al,a), eauses(a,n,+2)), causes(n,x2,+3)
(isa(al,a), causes(a,m,+3)), (isa(x2,x), causes(m,x,+4))

1%- C0
Fig. 9. A sample causal network as displayed by the causal network editor. The list of all causes of x2 has been requested,
together with an explanation of why aI causes x2

Artificial Intelligence in Engineering, 1991, Vol 6, No 2 83


An expert system f or formulating lubricating oils." K. Lunn et al.

c0.6,with[],x2)
cO,with([]),m)
c(2,with(I]),n)
c(1.2,with([]),y)
c(1.2,with([]),xl)
(isa(al,a), causes(a,n,+2)), causes(n,x2,+3)
(isa(al,a), causes(a,m,+3)), (isa(x2,x), causes(m,x,+4))

Fig. 10. A sample causal network as displayed by the causal network editor. The list of all effects of al has been
requested, together with an explanation of why al causes x2

The network is represented by a set of Prolog tables requires a large team of programmers and several million
which can be stored out on disc. To prevent disasters, dollars a year investment. In DEC's business, the return
each edit operation is journalled on disc until the network on investment is significant since it improves product
is saved. If the editor is exited without saving, the editor quality, reduces overall staff requirements and improves
restarts by applying the journal to the original file. delivery. If the DEC experience were to be repeated for
The effort expended in constructing the editor has been the formulation of lubricating oils, the programming
more than justified by the fact that the end users can team would have to be comparable in size to the current
now reliably update the causal network. Despite the number of formulators. The potential return on
complexity and high level of functionality, the editor is investment would not compare with that of DEC, where
extremely easy to use, and simple to learn how to operate. hundreds of configuration engineers could be replaced
The editor has succeeded in making the underlying (or have a large part of their workload replaced) by a
knowledge base tangible and comprehensible. A similar computer system. XCON essentially makes a large
approach to the editing of rules is being investigated, number of small decisions based on complete and
though the task there is much more complicated. deterministic knowledge. Lubricating oil formulators
However, changes in the causal network are anticipated make a small number of large decisions based on
to be much more frequent than changes in the rule base. incomplete and non-deterministic knowledge.
We must conclude, therefore, that replacement of
formulators by computer systems is, apart from the
4. F U R T H E R W O R K A N D C O N C L U S I O N S
technical limitations of AI, not a cost-effective option.
4.1. Development We must therefore look to AI as a means of enhancing
It is clear that, at a behavioural level, we can reproduce a formulator's work. Significant achievements have been
a formulator's decisions at a given time. In domains made in developing prototypes which could complement
where the understanding of the technology is evolving a formulator's decision making. In particular the decision
slowly, it would be feasible to construct a usable support/documentation features of the inference engine,
operational system with restrictive modification of the the causal network and the database interfaces are of
knowledge base using specialist computing/AI staff. In great potential value in assisting a formulator.
domains such as the formulation of lubricating oils,
successful operational use across the whole range of 4.2. Limitations of AI
formulation activities would depend on rapid and The key limitations of AI for a domain such as the
continued development/maintenance of the knowledge formulation of lubricating oils are an inability to learn
base, which must involve a substantial commitment from and an inability to make decisions on incomplete or
the formulation department staff. uncertain information. The key skills of a formulator are
Our only role-model for an operational system of the ability to keep pace with changes in the field and to
comparable complexity is DEC's XCON. This project make necessary decisions without the luxury of complete

84 Artificial Intelligence in Engineering, 1991, Vol 6, No 2


A n e x p e r t s y s t e m f o r f o r m u l a t i n g lubricating oils: K. L u n n et al.

experimentation, unlimited time and unlimited money. and techniques which should have significant operational
Current AI techniques for learning are, by h u m a n value. These techniques include the causal network and
standards, naive. Rule induction techniques rely on large database interfaces. Improvements in data handling,
numbers of simple examples to construct a decision tree; using AI techniques where appropriate, should provide
conflicting examples are not handled particularly well. significant benefits in the future.
Neutral networks offer more promise, but still appear to The overall project has led us to a major strategic
be limited in their scope. conclusion about the future of AI as an aid in high-level
Much contemporary research in AI concentrates on activities. Rather than look for replacements for experts,
the removal of inconsistent knowledge and the attempt we should be looking towards the development of tools
to ensure completeness of the knowledge base. For to enhance the effectiveness of the experts we have, by
creative, evolving domains this is counter to require- reducing their training time, by handling more routine
ments. Research is continuing on reasoning with decisions, and by encapsulating/transmitting expertise.
incomplete and inconsistent information, but one should Such tools may not accurately simulate the behaviour of
not expect short-term operational implementations. an expert, but extend the expert's efficiency and
effectiveness.
4.3. Conclusions
Current AI techniques are far from capable of ACKNOWLEDGEMENTS
reproducing the activities of a lubricant formulator. The
The early part of this research was undertaken as part
Alvey project established convincingly that a system can
of the Alvey programme which added an important
be constructed which corresponds behaviourally to a
breadth to the project. We thank the Alvey Directorate
formulator at a given time. However, a formulator's
and our consortium partners Logica U K Ltd, and
behaviour adapts to meet changes in requirements and
Schering Agrochemicals Ltd for their contribution. The
changes in understanding. In the broad spectrum of
formulation department, especially John Lillywhite,
lubricant formulation that rate of change is high. If one
David Colbourne, Richard Egan and Eddie Wilkinson,
considers the adaptation to that change a key activity of
are thanked for their enthusiasm, patience and input to
a formulator (one must), we conclude that AI is
the project. Thanks also to Steven Death, and many other
incapable, at present, of adequately encompassing the
individuals who have contributed considerably.
whole of a formulator's activity.
We must therefore consider whether the lubricant REFERENCES
formulation department could maintain and extend a
knowledge based system to keep pace with changes in 1 Robinson, A. (Ed.) PFES Project Report to the Alvey
requirements and understanding. F r o m our own Directorate: Volume 1 - The PFES Project, 1987, available from
A. Robinson, Shell Research Ltd, Thornton Research Centre,
experiences and considering the experience of X C O N , Chester CH1 3SH, UK
we must conclude that the cost of managing such change 2 Robinson, A. (Ed.) PFES Project Report to the Alvey
is high and comparable to the current cost of employing Directorate: Volume 2 Description of Applications, 1987,
formulators. available from A. Robinson, Shell Research Ltd, Thornton
Research Centre, Chester CH1 3SH, UK
The key facilitator for providing wide-scale automated 3 Robinson, A. (Ed.) PFES Project Report to the Alvey
decision making in such a domain must lie in the ability Directorate: Volume 3 - The Formulation Kernel, 1987, available
to construct systems which learn, and which develop and from A. Robinson, Shell Research Ltd, Thornton Research
adapt their learning strategies. Rule induction techniques Centre, Chester CH1 3SH, UK
rely on numerous examples and cannot readily cope with 4 Robinson, A. (Ed.) PFES Project Report to the Alvey
Directorate: Volume 4 - The Public Demonstrator, 1987,
inconsistencies and incomplete information. Adapting available from A. Robinson, Shell Research Ltd, Thornton
neural network learning techniques to causal networks Research Centre, Chester CH1 3SH, UK
looks interesting but is, as yet, unexplored. 5 Robinson, A. (Ed.) PFES Project Report to the Alvey
Current AI techniques are capable of application in Directorate: Volume 5 - Recommended Applications Method-
ology, 1987, available from A. Robinson, Shell Research Ltd,
areas where formulation knowledge does not change Thornton Research Centre, Chester CH1 3SH, UK
rapidly. A significant number of such areas exist within 6 Winston,P. H. and Prendergast, K. A. (Eds) The AI Business,
the lubricant formulation department, and automating The MIT Press, 1984
these should have significant value. Any reduction in the 7 Breuker, J. and Weilinga, R. Model-Driven Knowledge
number of engine tests required to achieve a formulation, Acquisition Interpretation Models, Esprit Project 1098, 1986
8 De Kleer, J. and Brown, J. S. A. Qualitative physics based on
and/or any reduction in treat rates which result in a lower confluences, Artificial Intelligence, 1984, 24(1-3)
cost product, are worth having. Quantitative benefits in 9 Forbus,K. D. Qualitative process theory, Artificial Intelligence,
a field of this kind will be hard, if not impossible, to 1984, 24(1-3)
assess. Measures of success must inevitably come from 10 Kuipers,B. Commonsensereasoning about causality, Artificial
Intelligence, 1984, 24(1-3)
the formulators judgement of the value of the system.
11 Stefik,M. Planning with constraints (MOLGEN: Part 1),
On a broad scale, it is infeasible to automate all Artificial Intelligence, 1981, 16(2)
lubricant formulation decisions, but a computer system 12 Stefik,M. Planning and recta-planning (MOLGEN: Part 2),
should prove useful in documenting the decision making Artificial Intelligence, 1981, 16(2)
procedure of a formulator (even if that documentation 13 Gero, J. S. (Ed.) Artificial Intelligence in Engineering,
Proceedings of the 1988 Conference, Computational Mechanics
is not an accurate reflection of the creative process), and Publications
assist the formulator in routine decisions and cal- 14 Lunn,K. and Archibald, I. G. TREQL (Thornton Research Easy
culations. At the very least it should provide a Query Language) An Intelligent Front End to a Relational
methodological framework, and an environment for Database, in Prolog and Databases, Gray, P. M. D. and Lucas,
novice formulators to explore the domain without too R. J. (Eds), Ellis Horwood, 1989
15 Gray, P. M. D., Archibald, I. G.and Lunn, K. Interfacing a
great a dependence on skilled formulators. knowledge base to a large database, The Knowledge Engineering
The research has led to the development of useful tools Review, 1989, 4(1)

Artificial Intelligence in Engineerino, 1991, Vol 6, N o 2 85

You might also like