10
Mud is an expert system that provides diagnostic and =________ treatment recommendations to engineers responsible for maintaining desired properties of oil well drilling fluids. The Mud S stem Gary Kahn and John McDermott Carnegie-Mellon University M u ud is a drilling fluid diagnostic and treat- The prevention of caving and sloughing of the hole, ment consultant recently developed at Car- The control of subsurface pressures, negie-Mellon University in cooperation Filtrate control, with NL Baroid. Following a year of field Transmission of hydraulic pressure to the bit, testing and enhancement by NL Baroid, Mud became The cooling and lubrication of the bit and drill string, available as a product early in 1985. NL Baroid markets The support of the drill string and casing, and Mud under the name Mudman. Its knowledge base cur- Well logging. rently consists of about 1600 rules. During testing, Mud- Mud's diagnostic conclusions and treatment recommen- man demonstrated a level of competence comparable to dations must be sensitive to the composition, or type, of that of expert mud engineers with respect to the problems mud in use. The original Mud system could diagnose mud it was designed to handle. In this article, we describe what problems and recommend treatments for two of the ten Mud does, examine several aspects of its design with re- standard mud types. A mud problem is defined as a depar- spect to its ability to diagnose those problems, and discuss ture from expected measures for one or more of about 20 why it performs as well as it does. Elsewhere, we describe mud properties typically monitored by mud engineers. Mud in more detail, including the system's approach to These properties include density, solids content, rheology, making treatment recommendations.' and filtrate characteristics, among others. Mudman is ca- pable of recognizing and treating problems for several ad- ditional types of mud. Mud and its domain A diagnosis of a mud problem entails finding the causes Mud and itS domain for deviant test results. Possible causes include contami- nants, high temperatures, high pressures, and inadequate Mud serves as a diagnostic and treatment consultant to corrective treatments, including the underuse of solids-re- mud engineers.* Mud engineers know how to test for and moval equipment and the unsatisfactory use of chemical regulate drilling fluid properties that influence characteris- additives. For any particular type of drilling fluid, there tics of the bore hole and aspects of the drilling operation. are roughly 20 or so significant causes of deviant mud A well maintained drilling fluid serves to optimize properties. The number of evidential considerations bear- ing on the diagnosis of each problem is usually between Hole cleaning (the removal of cuttings and cavings), four and six. Mud may arrive at more than one hypothesis The suspension of cuttings and weight material during about possible causes for any set of test results; in this interruptions in circulation, case, hypotheses are ranked by confidence. Mud is able to The removal of sand and cuttings from the mud at the explain its level of confidence in each hypothesis. Mud sug- surface, gests treatments that may require either restoring or alter- ing mud properties through the addition of chemical addi- *Drilling fluids are often composed of clay, which gives them a tives or the operation of special equipment. When alternate muddy appearance; hence, drilling fluids are referred to as mud, treatments are available, it evaluates them and chooses the and drilling fluids engineers as mud engineers, best. SPRING 1986 0885-9000/86/0200-0023$01.OO © 1986 IEEE 23

The Mud System

Embed Size (px)

Citation preview

Mud is an expert system that provides diagnostic and=________ treatment recommendations to engineers responsible for r

maintaining desired properties of oil well drilling fluids.

The Mud S stemGary Kahn and John McDermott

Carnegie-Mellon University

M u ud is a drilling fluid diagnostic and treat- The prevention of caving and sloughing of the hole,ment consultant recently developed at Car- The control of subsurface pressures,negie-Mellon University in cooperation Filtrate control,with NL Baroid. Following a year of field Transmission of hydraulic pressure to the bit,

testing and enhancement by NL Baroid, Mud became The cooling and lubrication of the bit and drill string,available as a product early in 1985. NL Baroid markets The support of the drill string and casing, andMud under the name Mudman. Its knowledge base cur- Well logging.rently consists of about 1600 rules. During testing, Mud- Mud's diagnostic conclusions and treatment recommen-man demonstrated a level of competence comparable to dations must be sensitive to the composition, or type, ofthat of expert mud engineers with respect to the problems mud in use. The original Mud system could diagnose mudit was designed to handle. In this article, we describe what problems and recommend treatments for two of the tenMud does, examine several aspects of its design with re- standard mud types. A mud problem is defined as a depar-spect to its ability to diagnose those problems, and discuss ture from expected measures for one or more of about 20why it performs as well as it does. Elsewhere, we describe mud properties typically monitored by mud engineers.Mud in more detail, including the system's approach to These properties include density, solids content, rheology,making treatment recommendations.' and filtrate characteristics, among others. Mudman is ca-

pable of recognizing and treating problems for several ad-ditional types of mud.

Mudandits domain A diagnosis of a mud problem entails finding the causesMud and itS domain for deviant test results. Possible causes include contami-

nants, high temperatures, high pressures, and inadequateMud serves as a diagnostic and treatment consultant to corrective treatments, including the underuse of solids-re-

mud engineers.* Mud engineers know how to test for and moval equipment and the unsatisfactory use of chemicalregulate drilling fluid properties that influence characteris- additives. For any particular type of drilling fluid, theretics of the bore hole and aspects of the drilling operation. are roughly 20 or so significant causes of deviant mudA well maintained drilling fluid serves to optimize properties. The number of evidential considerations bear-

ing on the diagnosis of each problem is usually betweenHole cleaning (the removal of cuttings and cavings), four and six. Mud may arrive at more than one hypothesisThe suspension of cuttings and weight material during about possible causes for any set of test results; in thisinterruptions in circulation, case, hypotheses are ranked by confidence. Mud is able toThe removal of sand and cuttings from the mud at the explain its level of confidence in each hypothesis. Mud sug-surface, gests treatments that may require either restoring or alter-

ing mud properties through the addition of chemical addi-*Drilling fluids are often composed of clay, which gives them a tives or the operation of special equipment. When alternatemuddy appearance; hence, drilling fluids are referred to as mud, treatments are available, it evaluates them and chooses theand drilling fluids engineers as mud engineers, best.

SPRING 1986 0885-9000/86/0200-0023$01.OO © 1986 IEEE 23

At the second level of description, Mud recommendsspecific additives and their amounts; the cost of each addi-tion is given, together with the total cost of the treatmentplan. An asterisk next to an additive means that the systemFigure 1. An example list of mud properties with low (L) or knows about other additives with the same function

high (H) target values.(Fgr5)(Figure 5).The user may ask for two kinds of explanations about

the recommended treatment plan. If the user asks to havethe recommended amounts explained, the nature of the ex-

Diagnosis. Whenever Mud is provided with information planation offered depends on the function of the additive.about mud properties, it produces a list of those properties For instance, if an emulsifier is added, the standard recom-that are either low (L) or high (H) with respect to a desired mended dosage at a particular temperature is indicated, to-target value. For example, Mud might produce the list in gether with any factors that lead to a modification of thatFigure 1. Having considered the evidence and perhaps after dosage. If oil is added, the amount is explained in terms ofrequesting more information from the user, Mud reports that needed to increase the oil/water ratio from some cur-its strongest conclusions, provided they are supported by a rent value to a desired target value. The user may also ex-combined evidential weight exceeding a set threshold. At amine the alternatives to an asterisked additive to find outthe same time, any observation not consistent with the why it was not Mud's choice; Mud decides among alterna-evaluation is reported (Figure 2). tives on the basis of a parametric function which takes intoAt this point in an interaction, the user is presented with account cost of treatment, expected side effects, and inven-

a menu offering several kinds of explanatory displays. tory (Figure 6).Most importantly, we can examine Mud's reasons for itsassessment of any hypothesis considered during a diagnos-tic session (Figure 3).

Treatment. Having drawn its conclusions about the Design options for diagnostic systemscauses behind observed property deviations, Mud is pre-pared to provide treatment recommendations. Mud deals Mud, like the Emycin family of systems,2 uses an eviden-with treatments at two levels of specification. At the first tial rather than a causal approach to diagnosis. (Kahn dis-level, it provides a treatment plan in which the nature of cusses elsewhere why an evidential approach is preferablerecommended additives and their consequences are de- in a domain such as Mud's.3) That is, rather than reason inscribed. Since many of the effects of the diagnosed prob- terms of a causal model, or an explicit representation oflem are secondary results of certain deviant properties, how hypothesized causes bring about symptoms,' Mud ap-Mud's treatment plan covers only what it believes to be the plies a support function to evidence whose weight, with re-primary property deviations (Figure 4). spect to diagnostic conclusions, is explicitly represented in

Figure 2. The report gives itsPstrongest conclusions and anyobservation not consistent withthe evaluation.

Figure 3. An explanatory displayoffers the user a chance to ex-amine the program's reasonsleading to its diagnosis.

24 IEEE EXPERT

Sp ~~~~~termediary steps in the causal path from hypothesizedPBs. ANxc4_ krIo 4 jpWY4Z3ROqAR~S problem to evidential consideration are not represented,

and that the degree of evidential support provided by eacht hBZStE3!i^mS<PO N(.;i~ ie:>0consideration is subjectively assigned.

With the evidential approach, there is a quite simple~~~~ ~ S~~~~ljP~~~~~ ~structure to diagnostic problem solving:

t j9l4LAST JCvL;SCf;:S-Lf;.SITYig: (1) Generate a set of plausible hypotheses,Ei~~QTh~~WAT~~R RA~~FIO ~(2) Order the hypotheses for investigation,

(3) For each hypothesis, determine the relevant evidentialA~~~~~~~!GA L ~~~~~~~considerations,

(4) Evaluate each hypothesis on the basis of the available~~Th~C~EA~~& VA~Th~~P4~IO evidence, and

(5) Accept or reject each hypothesis.

Figure 4. At the first level of treatment recommendations, the Mud follows this approach fairly closely, as do Intern-program describes the nature of the recommended additives ist,5 and to a somewhat lesser degree, Mycin.6 But withinand their consequences. this general approach, the designer of a diagnostic system

is presented with a number of other design decisions.

When and how are hypotheses evoked?How is the problem space searched?

the program. The support function takes as its arguments When is search terminated?the degree of support contributed by each of a number of What is the appropriate evidential unit?weighted evidential considerations and returns a value indi- How are evidential weights combined?cating the degree to which the evidence combines to sup- When should a hypothesis be accepted or rejected?port a diagnostic conclusion. Such systems are often said How are uncertainty, ignorance, and inconsistencyto have compiled diagnostic knowledge; this means that in- handled?

j Figure 6. At the second levelof treatment recommenda-

~ tions, the program recom-1~~O~X $~~l4$3 ~mends specific additives,

their amounts, their costs,2Of4~~~~~~~~~~~~~~~ ~~and the cost of the treatmentp an.

$dbIb ~Figure 6. The user may ask to

have recommended amountsexplainedNorGto examine alter-

aterisked addi-tives.

SPRING 1986 25

Expert systems differ in their solutions to these design is- Representing and evaluating evidencesues, and thus it is useful to understand the motivation be-hind any particular approach. In what follows we discusshow Mud deals with several of these issues by focusing on Mud's approach to diagnosis. Mud relies on compiledfour substantive topics: diagnostic knowledge and evidential support functions.

Figure 7 provides an example of a rule expressing the rela-(1) HThesisrmal revocsenationand search,tialk tion between a hypothesis and the evidence that supports(2)hinT frormalionreprestentationmof,evidentialknow it. Each diagnostic rule is a production that may be firedwithin a production system,(3) The appropriate content for an "evidential unit," when Mud decides to investigate a relevant hypothesis. A

and description of the evidence supporting a hypothesis is then

(4) The source of robust performance under conditions entered into its global working memory. As discussed be-of uncertainty. low, other more general rules constitute an inference engine

and provide the capabilities for seeking and evaluating evi-dence, as well as deciding among hypotheses.The effect of the diagnostic rules is to generate a tree for

Hypothiesis evocation and search each hypothesis. At the top node of each tree is a uniqueHypothesis______evocation ______and__search___ HYPOTHESIS. Below each HYPOTHESIS is one or more

REASONS. A REASON represents a consideration with aIn backward chaining diagnostic systems, or more gener- positive and negative evidential weight, which may be used

ally, in those that actively seek confirmatory or disconfir- in confirming and/or disconfirming the HYPOTHESIS. Inmatory data for potentially true hypotheses, the interactive other words, the evidential focus of the rule can be consid-burden on the user increases with the number of hy- ered both in terms of its sufficiency and necessity vis-a-vispotheses investigated. There are two ways to reduce this deducing that the hypothesized state holds.burden. One is to begin by passively collecting significant Each REASON is linked by a network to data that canobservations on the basis of which a relatively small set of potentially justify the consideration. In the simple case,initial hypotheses may appear as plausible candidates. The there is a single link, expressed in the DATAFOR, betweenother alternative is to constrain search by pruning from the the REASON and one "observation" (the value of an at-set of hypotheses (sometimes all those in the knowledge tribute of a specified data object). In other cases, a REA-base) before all the evidence is in. SON may be linked to a set of observations whose truth

value is defined as a Boolean function. Each hypothesisInternist relies on both these strategies, Mycin only on..>. . . ~~~~~~~canbe supported by several such rules.the second. Mud relies on the first strategy; it activates a In te exaple, tevrasON roiess

hypothesis if a "diagnostically significant" event is known In the example, the REASON provides support for theto~~~~~~~~~~~~havocurd.igotcly infcnbevto hypothesis that formation solids are building up in theto have occurred. A diagnostically significant va tion drilling fluid. The evidence that grounds the REASON isiS typically a deviation from an expected value for a mud dsrbdi h AAO okn eoyeeetaproperty. In interviewing mud engineers, we discovered tesvalue of the DITION atributemof elDAt obthat although they recognized a number of potential conse- the value of the DIRECTION attribute of the DATA ob-quences for each possible hypothesis, only some of these ject whose name is LOW-SPECIFIC-GRAVITY-SOLIDS.coequencesf reachpossiberehypothstis,aoly someifithe.s When the test specified in the tCONDITION field is true

non eof the d cagnosticallysign ificant . If for the value of TRELEVANT-ATTRIBUTE, the REA-nonredo the dssociagnosticallypotheesi toudnsteqenbes hcoc- SON is justified and may be used in support of the hypoth-curered, th associated hprotesesw udnotev beducn esis to which it is linked. Thus, in the example, if the valuesidered. by foingrtisprocedurMud atly ru of TDIRECTION in the specified data object is HIGH,

processing that would have bewtntequired to examine all then the REASON linked to the DATAFOR is justified.hypotheses. When justified, the value specified in the TPOSITIVE-

SUPPORT field will be used in computing an overall mea-While the pruning alternative is appealing and required sure of belief for the hypothesis in question. The value

in large search spaces, it has a cost: a hypothesis may be specified in the TNEGATIVE-SUPPORT field will be usedeliminated from consideration on the basis of erroneous in- in computing an overall measure of disbelief when a REA-formation. If this happens, the opportunity to gather addi- SON is unjustified. A non-Bayesian function similar totional data that might suggest that an error had been made that used in Mycin combines the evidential weights contrib-is lost. Since the mud domain is one in which data gather- uted by each REASON. These weights are determined as aing procedures are executed under less than ideal condi- result of interviews with domain experts.tions, test results are often in error and open to question.Since uncertainty is best assessed in light of as much other Mud's inference engine. Behind Mud's ability to use thedata as possible, Mud does not terminate its investigation working memory element representation of domain-specificof hypotheses until all potentially useful data has been con- inferential knowledge is a set of general rules responsiblesidered. for applying this knowledge, given the evidence at hand.

26 IEEE EXPERT

T0 i LD-O AMNT

Figure7.Asaplerule.*

exceptionsgurto ths seample symptrris be prsn beor an cocuso ca be

These, ruleseucanitiae taskseneededntoaorcquires dthe missing tia cosdratios,iitlrulsouss.D agnosi agrule-base eproedreofsdatioum.sevaluation cominaion Inohei thisaio reules, Mycin differsieadth mon feieta froml

Thereypoehesiskindserprevalation rules.Frthe first pert, stedge depresented uinga Expert,IMyin,whic eampeditnthruetyi

fxetormsthcondtothist spcfesnaDTFRSfreveryalesmentoms,the powersentbeforvieantiaconlsioncan-bCODItIOacq iedionrules dtreogieference bydtheDAitAr- drawns (isgeuiredMu8).teopsteeteermssfOr.rThitetob canrtnaAAO valunoftrefviablse. ouhn-tisi tehe develoedwyithincluesrulst. aD omainexerdistinctasevdenknown.thesecodstorulesitaetapply Booleanlgcqical opera-ssing toacospeifyratins, wigtrulsoues whoslondithionprcedureot

Tiosoereaetoknsfevaluat ionDTF rSulTes.Teopraionstcarer- sysembrokenlope usingmore r,elm ntr evienichal constidetruleturmstecniintrue, specifieunnon a AAO'or everyelevantnthsenaluhearpowerseteemetofevidential consideratin(eerdtprOpagated upward onthrog datlgiaIneference andtheDATA ains eidentialdfous) is typihelypposinge symtreefom sys-

value reaching the top node is passed to the REASON gether with one or more background (or contextual) con-grounded by this set of considerations. siderations that affect the diagnostic significance of observ-The hypothesis evaluation rules accumulate the contribu- ing that symptom. The rule of combination discussed

tions of each true REASON into an overall measure of be- above is used to combine evidence across different rules.lief; and each false REASON into a measure of disbelief. There are several reasons for pushing down to an ele-(We use Bernoulli's rule of evidential combination, itera- mentary level. The first is that the knowledge acquisitiontively defined as, E = E + [ (I - E ) * e ], where E is the task is easier, simply because we need to inquire abouttotal evidence for H so far, and e is the contribution of fewer rules. That is, given a set of symptoms {SI, wherenew evidence.) A total measure of belief results from sub- each s e S can take one of three values- true (has oc-tracting the latter from the former. curred), false (has not occurred), or unknown-there are

Finally, the hypothesis interpretation rules are used to three rules that can be defined on (SI. However, when evi-make decisions regarding the acceptance and rejection of dential foci are teased apart, there are only 3n possibleevaluated hypotheses. rules, as the evidential contribution of each s e S will de-

| ~~~~~pendonly on the truth value of S. Once these contributionsare determined, the combinatoric algorithm is used to com-bine the evidence.

cannedtrasltionteeishnto wgeneirated. Explanation in Mud relies on Secondly, complex rules can generate unintuitive resultssome text generation capabilities have been developed in parallel under Mycin-like assumptions that beliefs are non-comple-with Mud, and these could be easily integrated into the existing sys- mentary and that uncertainties are propagated using thetem. conjunctive/disjunctive rules of standard fuzzy logic. For

SPRING 1986 2

; ' t g <=g \ X X <X:Xgr 9 7 vMud domain, however, we found that unwarranted im-

m ~~~~~~~~~~~~~~~Problems emerged, for instance, when experts volunteered

w m~~~~~~~~~~~~~~~rules with a "jackpot effect" thtios, woeherfrexceethewegtoW _1 W , eW <>. I ~~~~~weight that would be assigned using our composition algo-

t | g g^ffig~~~~~~~~~rithm iteratively over the weight of each. On examination,

u 2 2 2 : L @ .-12E I~~~~~~thejackpot effect typically appeared where a rule conclud-

iF (1) THE SITE OF THE CULTURwaEconitinalon ISe ofcoLOODatinsANom

subset of which would have been strongly supportive of anFigure 9. Two representations of evidential knowledge. alternative hypothesis, Hj. Implicit here was the recogni-

tion that Hj would not account for the additional symptomthat distinguished Hi from the former. While perhaps avaIid distinction, a rule implicitly embedding this knowl-

instance, consider the two sets of rules in Figure 9, where F edge similarly disallows for attributing the evidence associ-represents Bernoulli's rule of evidential combination, var- ated with Hi to a combination of Hi and Hj, or, for thatiants of which are used by both Mycin and Mud. matter, Hj and Hn, some arbitrary hypothesis which would

Rules C.l1, C.2, and C.3 say that when A and B are the explain the symptoms for which Hj failed to account.case, believe H to degree .8, but believe H to degree .3 if We were hesitant to allow such implicit diagnostic deci-only B is true, to degree .6 if only A is true. Rules S. I and sions because the MUD domain has considerable complex-S.2 have virtually the same effect as C.2 and C.3, respec- ity. Bore holes may be through a range of lithologies withtively, when either A or B is false. However, if both A and quite different problem profiles, and thus no expert isB are true, then both rules will be instantiated in the simple likely to have enough experience to be sure of the strongcase. Their combined weight, with respect to the hypothesis independence assumptions underlying the "jackpot ef-they support, will be tallied by the function F, which in fect." Two alternatives to such implicitly loaded rules,this case returns .72. each of which made the underlying reasoning more explicit,Now consider what happens with the complex represen- were tried successfully.

tation when uncertainty enters the picture. Again, follow- One was to define rules that would specifically rule outing Mycin, the certainty of a conjunction is taken to be the Hj given that Hi had been accepted, in other words, explic-minimum of the certainties on each of the conjuncts. Thus itly representing the impossibility of Hi and Hj co-occur-if B is believed true to degree .6, - B to degree 0, and A to ring. The second was to weaken rules that concluded Hjdegree 1, the overall certainty of the conjunction C.l1 is .6. unless they noted the condition that Hi had been rejected.The contribution of C. 1 to a belief in H is then this value This represents the assumption that Hi is to be preferred tot-6) times the confidence factor .8 that represents the the conjunctive hypothesis that Hj is occurring togetherstrength of the rule on the condition that its supporting with another event that would account for the symptomsevidence is known to be certain. C.2 makes no contribution that differentiate Hi from Hj-that is, the acceptance ofto H, as the certainty on - B is 0. Thus, in this case, we Hj becomes contingent on the rejection of Hi.would be left with a contribution of .48. On the other These strategies have allowed us to focus rules on a sin-hand, the procedure for combining the contributions of the gle symptomatic focus without loss of diagnostic accuracy.simple rules calls for diminishing the contribution in pro- At the same time, assumptions that would otherwise beportion to the uncertainty of the evidence on which the rule hidden from sight are explicitly opened up to the scrutinyis conditional. Thus, the overall belief in H given S.1I and of multiple experts. In addition, teasing out the differentS.2 is F( (.6)*(.3),.6 ), which equals .67. In this case, the factors that may be naively compounded in a complex ruleuncertainty on B only affects the contribution of B. A's has led to insights about where confidence factors comecontribution remains intact. Although it is hard to make from, that is, about the objective considerations behind thegeneral conclusions here, this latter procedure appeared to domain experts' subjective assignments. These insightsgenerate results more in line with the intuitive responses of have proved valuable both in discerning errors in the ruleour human experts. set as well as in enhancing the effectiveness of our knowl-

Despite the above considerations, complex rules may ap- edge acquisition interviews.'pear desirable insofar as they reflect a kind of domain ex-pertise, namely, the ability of the domain expert to com- Mud as a production system. Mud is implemented inbine evidence in a better way than the combinatoric func- OPS5, a general purpose production system language.' Un-tion can. While this may indeed be true at times, in the like many OPS programs, Mud does not take full advan-

28 IEEE EXPERT

tage of the OPS interpreter, as can be seen from the struc- the knowledge base with new diagnostic rules-a situationture of the sample diagnostic rule shown in Figure 7. The we faced with Mud. With the declarative approach takensignificant part of the content of such a rule is in its action by Mud, neither consistency nor control issues need be ofpart; the effect of applying the rule is to place a description concern when new evidential rules are entered into the sys-of the evidence supporting a hypothesis into working mem- tem. Since there is only one rule for each evidential consid-ory. Other more general rules match this data and provide eration, the consistency issue goes away.the capabilities for seeking and evaluating evidence, as well The declarative approach also makes it easier to exploreas deciding among hypotheses. Alternatively, we can imag- alternative solutions to critical problems. One of these, forine rules, as shown in Figure 10, that would exploit the example, is that of handling ignorance-what to do whenOPS pattern matcher by placing the evidential descriptions some desired datum is uninferable by the system and un-in the conditional part of the rule and using the action part known to a user. Under such conditions, we would like toof the rule to evaluate these with respect to their bearing make an intelligent guess or point out to the user just whaton a REASON. information is required to make an accurate diagnostic as-We had several reasons for preferring a more declarative sessment. This cannot be done when the missing datum is

approach to the largely procedural approach typically char- represented in the conditional part of a rule; the descrip-acteristic of production system programming. With a de- tion is simply inaccessible. Of course, with the proceduralclarative representation, it is easier to expand and maintain approach we can compensate for this by creating rulesthe knowledge base, explore alternative approaches to var- whose conditions constitute the powerset of potential par-ious problems, and access the knowledge base outside of a tial matches. Each rule indicates what to do under the con-performance context. ditions of ignorance defined in its conditional part. NotExpanding the knowledge base manually is easier the less only does this result in a lack of conciseness in the pro-

we have to be concerned with issues of consistency and gram, but it proves a tremendous obstacle to exploring al-control. These problems can arise in many places in a diag- ternative global strategies for dealing with ignorance. In-nostic system, but most readily occur in guaranteeing that stead of replacing a very few general rules, as with the de-the data required to draw a diagnostic conclusion is avail- clarative approach, it is necessary to modify all the rulesable when desired. Backward-chaining systems solve this that were formulated to handle ignorance in many particu-problem by examining the conditions of the rules that lar cases. By creating a working memory representation ofwould provide support to the hypothesis in question, and evidential relations, a few general rules can provide ainstantiating those with unknown values. OPS does not global strategy to problems of ignorance. In Mud, some ofprovide this capability directly. Instead, for the procedural these rules function as part of a multi-valued logic for as-approach to work, there must be rules that generate data signing truth values to evidential networks; others, to as-when it is needed by other rules. Since these rules are dis- sess the pattern of ignorance, deciding what information istinct from those that actually use the data to make infer- necessary or unnecessary to achieve an adequate diagnosticences, the burden of maintaining consistency and adequate conclusion.sequential control is on the programmer. This is especially A declarative approach is also required if knowledgeworrisome when novice programmers will be augmenting about evidential relations is to be accessed outside of ac-

Figure 10. A procedurally oriented CPS rule.

SPRING 1986 29

tually running a diagnosis over some set of symptoms. For also expect considerable refinement of the existing treat-instance, in the mud domain, there are conditions under ment rules as the scope of considerations bearing on treat-which engineers would like to ask conditional questions, ments is extended. And we expect rules that calculate thesuch as, "How would one know if a salt formation were amount or degree of a treatment to increase substantially.being drilled?" With the more procedural approach, an- Inconsistency checking rules check for unlikely or impos-swering such questions requires using canned text or an ar- sible combinations of data. This rule set is likely to growtificial trace which could be inconsistent with the rules that somewhat, but not to a great extent.perform the actual diagnosis. Mud's more declarative ap- The small class of search control rules currently controlsproach allows us to answer such questions by using general the order in which hypotheses are evaluated. As the Mudexplanation rules to read the same working memory ele- system comes to recognize larger classes of relevant hy-ments that would drive the system during a diagnostic ses- potheses, it may be necessary to modify or add to thesesion. rules. However, we do not expect this to occur as Mud's

early pruning strategies seem to successfully restrict the setMud statistics. When released to NL Baroid, the Mud of candidate hypotheses.

system had 826 rules. Of these, approximately one third The large class of data related rules is composed of rulesrepresented a general control mechanism, or procedures that either create a data schema for a particular datum,that made no assumptions about the domain in particular. perform a procedure for inferring the value of a datum, orOf the remaining two thirds, about half involved domain- create a set of requests for data from which a desired valuespecific knowledge. The remaining half, while not domain- can be inferred. A data schema is a working memoryspecific, were domain-dependent; that is, they entailed as- element that carries information about a particular kind ofsumptions about the representation of information in Mud, datum. This information includes the default units of ana representation that was constrained by requirements of instantiated value, a descriptive phrase for the datum, athe domain. question to be used in asking for the current value of theThe 268 domain-specific rules can be classified as follows datum, and constraints on acceptable values. We expectData related rules: 126 these rules to be augmented gradually as the scope ofDiagnostic rules: 68 evidence Mud considers increases.Treatment rules: 52Inconsistency checking: 19 The 303 domain-dependent rules are distributed as

Search Control: 3 follows:Database access and transfers: 100

The large class of data related rules is composed of rules Trend analysis: 63that either create a data schema for a particular datum, Treatment handling: 67perform a procedure for inferring the value of a datum, or Evidential Assessment: 35create a set of requests for data from which a desired value User interface: 38can be inferred. A data schema is a working memory ele-ment that carries information about a particular kind of The domain-dependent rules differ from the domain-datum. This information includes the default units of an specific rules in that they provide a variabilized schema ofinstantiated value, a descriptive phrase for the datum, a condition elements. While these rules are generalized, theirquestion to be used in asking for the current value of the form is considerably constrained by the requirements of thedatum, and constraints on acceptable values. We expect mud domain. Undoubtedly, there are other diagnostic andthese rules to be augmented gradually as the scope of evi- treatment domains to which many of these rules woulddence Mud considers increases. apply. However, their present form is a direct consequenceThe class of diagnostic rules includes both hypothesis of constraints imposed by the mud domain. While some of

generation rules and evidential rules (those that create a these rules correspond to domain knowledge, moreworking memory representation of the evidential require- typically the rules exist to manipulate internalments for evaluating a hypothesis). We expect considerable representations, control the behavior of the program, orgrowth in these rules as Mud's knowledge base is extended explain the behavior of the program to the user.to handle additional mud types. We also expect consider- A large number of database access and transfer rules areable refinement of the current set of evidential rules. These used to provide an interface between Digital's DBMS codi-refinements will be right-hand-side refinements in the logi- cil database and Mud. Most of these rules map between thecal description of evidential considerations. relatively simple database currently being used and Mud's

Treatment rules generate treatment programs, calculate more complex representational structure.the amount or degree of a treatment, or generate explana- Trend analysis rules are largely computational. Theytion schemata for different kinds of treatments. We expect make considerable assumptions about the kind of data thatthe number of rules that generate treatment programs to requires analysis. While these rules are not restricted to theincrease rapidly as Mud is used for other mud systems. We mud domain per se, they assume a representational struc-

30 ~~~~~~~~~~~~~~~~~~~~IEEEEXPERT

ture constrained by the domain considerations that guided with confidence, provided there is an absence of contradic-Mud's design. tory evidence. However, if a strong belief results from the

Treatment handling rules provide generic procedures for accumulation of many small weights, we can be sure onlyselecting treatments and providing explanations. A user in- under special conditions that the results are due to the hy-terface of 179 rules provides a general mechanism for inter- pothesized problem and not to one or more other prob-rogating the user and providing menus; 38 of these rules lems. What are these conditions?are used to tailor this interface to the requirements of the First of all, confidence is warranted when the conse-Mud domain. quences of the potential problems responsible for diagnos-

tic symptoms vary greatly. The more the consequences dif-fer, the more likely it is that belief will accumulate more

Uncertainty and ignorance toward one hypothesis than another. Secondly, we can beconfident if it proves possible to reject alternative hy-

The current version of Mud assumes that all data en- potheses. A hypothesis can be ruled out when expectedtered, as well as the recognition of diagnostically signifi- consequences of the problem fail to materialize. When evi-cant observations, is certain. So far, surprisingly, this has dential considerations are assigned large negative supportnot degraded Mud's performance. We had expected that values, a rule-out strategy becomes a powerful diagnosticMud would need a way of both recognizing the likelihood tool. Since Mud's evidential support function generates anof a deviation in a mud property and of transmitting evi- additive measure of disbelief, a rule-out strategy can alsodential uncertainty to its hypothetical conclusions. Mud is, be used when there is an absence of several consequences,in fact, designed to allow this functionality if it becomes each of which has a low negative support value. Finally, ifdesirable in the future. we expect few concurrent problems with overlapping re-Mud seems able to succeed with its assumption that its sults, we can legitimately see significance in marginal dif-

data is certain because its diagnostic procedure is robust in ferences among potential explanations. Thus, if this condi-two respects. First, there are typically several diagnostically tion is met, we can accept a hypothesis grounded on manysignificant observations that can evoke a hypothesis; if a weak evidential sources, provided the measure of belief isproblem occurs, it is likely to be indicated by forcing at marginally above any alternative.least one mud property across a detection threshold. Thus, Mud's ability to generate high levels of confidence in itsuncertainty in the data is unlikely to cause Mud to miss the diagnostic conclusions will thus rest largely on how domainoccurrence of a disruptive event. Secondly, as Mud brings experts assign weights to evidential considerations. Mud'sseveral evidential considerations together in coming to a performance will depend on the extent to which each po-conclusion with respect to any hypothesis, small errors in tential hypothesis has some evidential considerations withsome fraction of these observations may wash out given a high positive and negative support weights. In addition, thepreponderance of evidence for or against the hypothesis. amount of differentiation among hypotheses with respect(One place where it is necessary to be careful is when a to associated evidential considerations and the likelihoodmud property with a high negative support value is near a of concurrent problems will affect Mud's performance.detection threshold. In these cases, Mud warns the user, And, indeed, it appears that Mud performs well and ro-but does not alter its diagnostic conclusion since the detec- bustly because the above conditions hold extremely welltion threshold, set by the engineer, should take into ac- across most hypotheses. Most hypotheses appear to have atcount the desirable tradeoff between false/positive and least one consideration that carries significant positive im-false/negative responses. If the latter is of concern, the port. In 17 out of the 20 problem types that the originalthreshold can be lowered; if the former, the threshold can version of Mud knew about, one evidential considerationbe raised.) Indeed, this might explain why mud engineers had a weight greater than or equal to eight, Mud's thresh-themselves do not need to rely on mathematical models for old of acceptance under normal conditions. (When lackinghandling uncertainty. The following analysis of Mud's di- evidence, or when faced with unexplained inconsistencies,agnostic procedure and knowledge base supports this con- Mud resorts to more complicated decision rules. Some ofclusion. these capabilities are still under development.) There is alsoThe strength of a diagnostic conclusion in Mud is a a substantial degree of differentiation. Of the 20 problems,

function of the difference between accumulated measures there are only three for which there are alternative hy-of belief and disbelief. As discussed above, each measure potheses that would explain at least half of their potentiallyresults from an incremental function that operates over the supportive evidence. This means that evidence for the cor-positive or negative evidential weights associated with each rect conclusion is unlikely to lend much credence to alter-REASON. These weights range from 0 to 10, with 0 indi- native hypotheses. Thus, even when some potential evi-cating no contribution to the relevant belief measure. These dence is degraded or absent, there tend to be other discrim-values are subjectively assigned by domain experts. mnating considerations, sufficient to drive a diagnostic con-

If a high measure of belief results from at least one clusion in the right direction. In addition, Mud's diagnostichighly weighted REASON, we can accept the hypothesis conclusions are driven by a rule-out strategy that is sup-

SPRING 1986 31

ported by the high expectation of observing symptoms as- Referencessociated with particular problems. For 17 of the 20 prob- I. G. Kahn and J. McDermott, "MUD, a Drilling Fluidslems, the failure to observe a key consequence would lead Consultant," tech. report, Carnegie-Mellon University, Dept.to the belief that that problem had not occurred. In two of of Computer Science, Pittsburgh, Penn.,1985.the remaining cases, the potential exists for rejecting a hy-pothesis on the failure to observe a set of expected conse- 2. W. van Melle et al., "The EMYCIN Manual," tech. report,

Heuristic Programming Project, Stanford University, Paloquences. Alto, Calif., 1981.

3. G. Kahn, "On When Diagnostic Systems Want to Do withoutiagnostic systems differ in their solutions to Causal Knowledge," Proc. Advances Artificial Intelligence,

* many design issues. Mud provided an oppor- Pisa, Italy, 1984, pp. 21-30.tunity to test out the adequacy of an evidential 4. R. Davis, "Diagnosis Via Causal Reasoning: Paths ofapproach based on a method of cumulatively Interaction and the Locality Principle," Proc. Nat'l Conf.

assessing rules with single symptomatic foci. Mud showed Artificial Intelligence, Washington, D.C., 1983, pp. 88-94.that forward-chaining OPS-5 production systems offered 5. H. Pople, "Heuristic Methods for Imposing Structure on 111-interesting flexibility in defining rules and control strate- Structured Problems," Artificial Intelligence in Medicine, P.gies, but that declarative representations of diagnostic Szolovits (ed.), Westview Press, 1982, pp. 119-190.knowledge remain crucial. Mud is currently proving a suc-cess not only in its commercial use, but, more importantly 6. E.Shortliffe, Computer-Based Medical Consultation: Mycin,to us, in the ease with which Baroid experts have been able Elsevier, 1976.

to augment the knowledge base, expanding Mud's range of 7. S. Weiss et al., "A Model-Based Method for Computer- Aidedcompetence to new types of fluids and to an ever-increas- Medical Decision-Making," Artificial Intelligence, Vol.ll,ing variety of problems. rE] 1978.

8. G. Kahn, S. Nowlan, and J. McDermott, "Strategies forKnowledge Acquisition," IEEE Trans. Pattern Analysis and

Acknowledgments Machine Intelligence, Vol. 7, No. 5, Sep. 1985, pp. 511-552.Many people besides ourselves have contributed to the 9. C.L. Forgy, "OPS5 User's Manual," tech. report, Carnegie-

development of Mud, including Randall Brooks, Steven Mellon University, Dept. of Computer Science, Pittsburgh,Downes-Martin, Kinson Ho, John Hutter, and Jeff Stout. Penn., 1981.

Gary Kahn is the director of knowledge engineering systems at John McDermott is a principal scientist and the associate head ofCarnegie Group, Inc., and an adjunct scientist in the computer the computer science department at Carnegie-Mellon University.science department at Carnegie-Mellon University. His research His research interests are in the area of artificial intelligence,interests are in the areas of knowledge engineering tools, particularly in the application of Al techniques to industrialdiagnostic and planning systems, and knowledge acquisition. problems and in developing computer programs that simulateKahn received the PhD in philosophy of science and a BA, both human cognitive processes.

from the University of Chicago. In 1980, he completed work on Rl, a program used by DigitalEquipment Corporation to configure computer systems. Since1984, he has helped develop tools that assist with the acquisitionof knowledge for expert systems, for example, More, Salt, andSear.McDermott received the PhD in philosophy from the University

of Notre Dame in 1969, and a BA and MA from St. LouisThe authors can be reached at Carnegie-Mellon University, Dept. University. He is the author of more than 50 papers and technical

of Computer Science, Pittsburgh, PA 15213. reports.

32 IEEE EXPERT