From: AAAI Technical Report FS-01-04. Compilation copyright © 2001, AAAI (www.aaai.org). All rights reserved. Using Uncertainty Within Computation Overview To reason about complexcomputational systems, researchers are starting to borrow techniques from the field of uncertainty reasoning. In somecases, this is becausethe algorithms contain stochastic components.For example, Markovdecision processes are nowbeing used to modelthe trajectory of stochastic local search procedures. In other cases, uncertainty is used to help modeland copewith the stochastic nature of inputs to (possibly deterministic) algorithms. For example, MonteCarlo samplingis used to deal with uncertainty in gameplaying programs,whilst probability distributions are used to model variations in runtime performance. Uncertainty and randomnesshave also been found to be a useful addition to manydeterministic algorithms. Anda numberof areas like planning, constraint satisfaction, and inductive logic programming whichhave traditionally ignored uncertainty in their computationsare wakingup to the possibility of incorporating uncertainty into their formalisms. Thegoal of this workshopis to encouragesymbiosis betweenthese different areas. Topics The aim is to bring together researchers from a numberdifferent areas of AI including (but not limited to) agents, constraint programming,decision theory, gameplaying, knowledgerepresentation and reasoning, learning, planning, probabilistic reasoning, qualitative reasoning, reasoning under uncertainty, and search. Possible topics include (but are not limited to): ¯ Incorporating uncertainty into existing frameworks ¯ Modelling uncertainty in computation ¯ Monte Carlo sampling ¯ Probabilistic analysis and evaluation of algorithms ¯ Randomizationof algorithms ¯ Stochastic vs. systematic algorithms ¯ Utility and computation vii HandlingUncertainty with Active Logic ~d, D. Perlis ~c, °K. Purang M. Anderson~, M. Bhatia b, P. Chib, W. Chongc, D. Josyula ~, Y. Okamoto a: Institute for AdvancedComputerStudies, University of Maryland,College Park MD20742 b: Departmentof ComputerScience, BowieState University, BowieMD20715 c: Departmentof ComputerScience, University of Maryland, College Park MD20742 d: Departmentof Linguistics, University of Maryland,College Park MD20742 { mikeoda,yuan,darsana,yoshi,perlis,kpurang}@cs.umd.edu Introduction Reasoningin a complexand dynamicworld requires considerableflexibility on the part of the reasoner;flexibility to apply, in the right circumstances, the right tools (e.g. probabilities, defaults, metareasoning, belief revision, contradictionresolution, and so on). A formalismthat has beendeveloped withthis purposein mindis that of active logic. Activelogic combinesinference rules with a constantly evolvingmeasure of time(a ’now’)that itself can be referencedin thoserules. As an example,Now(6)[the time is now6] is inferred from Now (5) since the fact of suchinferenceimpliesthat (at least one ’step’ of) timehas passed. Fromthis feature comeothers, mostnotably: ¯ Ignorance-assessmentamountsto a lookupat time ~, of what was knownprior to t. ¯ Contradictory information can (sometimes) be detected and usedto curtail nonsensicalinferencesas well as to initiate repairs. ¯ Default conclusions can be characterized in terms of lookupsto see whetherone has information(directly) contrary to the default. ¯ Reasoning can be kept current, i.e., inferencescan be triggered to occur whenthey should, and this itself is, done declarativelyso that it is also undercontrolof (easily modifiable) inferences. Thesefeatures of active logic provide mechanisms to deal with various formsof uncertainties arising in computation. A computational process P can be said to be uncertain abouta proposition (or datum)X (i). it explicitly represents X as in the knowledgebase (KB) but possibly a mistake; (ii). it represents X as in the KBand initially correct but possibly no longer correct; (iii). itis awareof X (and/or-~X)-that is, Xis aclosedsubformulaof at least one item in the KB- but X is not present in the KBas a belief; or (iv). X is knownto be an item it cannot computeor infer. (This last case is often undecidablein its fullest form; active Copyright©2001,American Associationfor Artificial Intelligence(www.aaai.org). All rights reserved. logic providesa convenientshortcut that wewill return to below.) Uncertainties of type (i) abovelend themselvesto representation by probabilistic reasoning, whichinvolvesthe representation of explicit confidencelevels for beliefs, for example, Bayesian Networks; and somewhatless so for type (ii); and even less for types (iii) and (iv). Onthe hand, a suitably configureddefault reasoner (non-monotonic approaches)can represent all of these, and without special ad hoc tools; that is, active logic already has, in its timesensitive inference architecture, the meansfor performing default reasoningin an appropriately expressive manner.It is the purposeof this paper to elaborate on that claim; the formatconsists of an initial primeron uncertaintyin active logic, then its current implementation(Alma/Came), existing applications, and finally a discussionof potential future applications. Probabilistic and Non-monotonic Reasoning Probabilistic approaches (Pearl 1988; Ramoni& Riva 1994) are very useful in reasoning with uncertainty; they can smoothlyhandle inconsistent inputs, and modelbelief changeover time as evidence accrues, by adjusting the probabilities attachedto beliefs and their connections. However,in a Bayesiannet for instance, becausethe probabilities have a somewhat holistic character, with the probability of a given proposition dependingnot just on direct but indirect connections,it looks like addingnewpropositions or rules (connectionsbetweennodes) will be expensive and potentially require re-calculation of all connection weights. If one’s world-modelis well specified enoughthat reasoningabout and interacting with the worldis primarily a matter of comingto trust or distrust propositions already present in that model,a Bayesiannet mayprovide a goodengine for reasoning. However,if one’s world-modelis itself expectedto be subject to frequent change, as novel propositions and rules are added(or removed)from one’s KB, think that a reasoningenginebasedon active logic will prove a better candidate. In addition, and partly because a Bayesiannet deals so smoothlywith inconsistent incomingdata, it can operate on the assumptionthat incomingdata is accurate and can be taken at face value. Althoughof course it is not expected that all incomingdata will be accurate(for instance, it is expectedto contain noise), it is expectedthat the systemwill get reliable inputs overall. Wehave two related concerns aboutthis: first, an abnormally long string of inaccuratedata - as mightbe expectedfrom a faulty sensor or a deliberate attempt at deceit - wouldobviouslyreduce the probability of certain beliefs that, werethe data known to be inaccurate, wouldhaveretained their original strengths. It has beensuggested to us that one could modelinaccurate incominginformationby codingchild nodes that wouldcontain information regarding the expectedaccuracyof the incominginformation from a given evidence node. This seemsadequate whenit is knownat the outset that a given sensor operates with a certain reliability; but it is not clear howone mightlearn that an informationsource is unreliable, as one mightwishto be able to do if a sensor breaks or a sourcebegins lying. Second, it seemsthat in a Bayesiannet, all beliefs are similarly sensitiveto incoming data (if theyare sensitiveto it at all) the sense that the net operatesby a slowerosion or confirmation of probability.But it is not clear that all beliefs should fit this model;one can retain full confidencein a given belief for a long time in the face of continuingempiricalevidenceto the contrary, and then in light of a single further fact (whichalone wouldnot havecausedthis event) give the belief entirely. (See (Bratman1999)for a discussion belief modelingin light of such considerations.) Further, insofar as a Bayesiannet is operating smoothly, the fact that incomingdata contradicts currently held beliefs, or other incomingdata, need not be explicitly recognized. But we believe that the recognition of contradiction should be a central and importantpart of informationhandling (Pedis 1997). For it seemsthat there are cases where one can learn fromthe fact of a contradiction(wherethe belief that there has beena contradictioncan be useful in the reasoningprocess), as for instance in comingto the conclusion that there is a systemmalfunction.Althoughit is no doubtpossible to modifya Bayesiannet to explicitly encode the occurrenceof a contradiction,it is less clear whatuse this informationwouldbe within that schema.Andthis brings us to our final reasonfor preferring non-monotonic approaches: active logic has muchgreater expressive power, including not just the ability to encodecomplexpropositions,but also functionsand quantification. Let us consider the following example: The belief Yeilow(tweely) maybe based on theoretical considerationsthat should not necessarily be weakenedby indirect evidence, e.g. TweelyBird(tweety), If TweelyBird(X)thenYellow(X). In such case one will at least wantto considerhis reaction to a photographof a green Tweety. The complexityof the case is not captured by decidinghowto treat the veridicality of photographsin general (for assigninga lowerprobabilityto this sort of evidencejust meansit will take longer for photographiccontentto register in the KB,and this will not alwaysbe appropriate); the issue is one of comingto an intelligent assessmentof a given piece of evidence(photographor no) in light of current beliefs andtheir parents(if any- withouttheoretical considerations supporting a given belief we mayadopt the newevidenceat face value; with very strong empiricalevidence,we mightdisbelieve the theoretical bases.) It looks as thoughin manycases wewill wantto makedecisions about this, rather than letting things play out accordingto pre-determined confidence measures. Onthe other hand, it seems important that we recognize and rememberthe (apparent) contradiction, evenwhenweresolve it by distrusting the photographs. For a systemwhichis fully epistemically opento the world - that is, whichis capable of changingits worldmodelby adding or deleting rules and facts, and for whichevery belief in the wordmodelis empirically sensitive (no dogmatic beliefs) - mayencounterevidencethat directly contradicts TweelyBird(tweety). In such case, amongthe considerations motivating a decision to accept the newevidencemay be the fact that it allows acceptanceof the previouslydiscarded photographicevidence of Tweety’sgreenness. Primer on Active Logic and Uncertainty Currently, active logic does not explicitly represent confidencelevels of the KB(although it certainly can be madeto do so). Instead,it has the flexibility to distrust anyof its beliefs in the presenceof suitable counterevidence.In effect, active logic treats its currentbeliefs as simplytrue until such time as reasons arise for doubtingthem, and then distrusts themuntil such time as they maybe reinstated. Onecan thus regard (the current versionof) active logic as a kind of timesensitive nonmonotonic reasoning engine. Twoof the principal mechanisms that provide the flexibility of active logic, especiallyin regardto uncertainty,are contradiction-detectionand introspection. Contradiction-detection: If P and ~P are both in the KB at any step, then bothbecome distrusted in the next step and a repair process is initiated (whichmayor maynot be conclusive). Sucha distrust and repair process can occur in cases (i) and(ii). Forinstance,if P is believedoriginally, but later --,P is either derivedor observed(this could comeabout for various reasons: P mightalwayshavebeenfalse, and the belief that P mistaken;P mighthave becomefalse; --,P could be false, and this newbelief could therefore be a mistake), then a conflict occurs betweenP and -~P. This wouldcause active logic to enter a state of"uncertainty"withrespect to P and --,P leadingto distrust both P and --,P and to initiate a repair process to adjudicate betweenthe ’old’ P and ’new’ --,P. (Unlike mostbelief-revision formalisms,active logic does not automatically assumethat the newestdata is more accurate). Therepair processinvolvesthe identification and distrust of the parents (and any derivedconsequences) of the contradictands;reasoningabout the parents; and possible reinstatementof one or another set of parents, whichmayallow oneof the original contradictandsto be re-derived. Returning to our Yeiiow(tweety) example, in the normal case such a belief wouldbe taken (and used) simply at face value, even though it may(unknownto the reasoner) be incorrect, until such time as counterevidenceappears (the photo showinga green Tweety). At that time, a contradiction would occur between Yellow(~wee~y)and -1Yeilow(tweety) (itself derived from Green(~weety)and rules about howcolors inhere in objects). Assessmentwould discoverand distrust the parents of each contradictand,and attemptto discern whichbeliefs it oughtto reinstate, as for 2 instance by utilizing preferencesfor somebeliefs over others (the wholeset neednot be acceptedor rejected together). Thus, assessmentmaylead to rejection of the initial belief; or it maylead to its reinstatement,and rejection of the photo data (not just if it had a preferencefor the theoretical bases of Yeilow(~weety), but also, for instance, if it knewthat the photowasdevelopedpoorly, or taken in green light). (This instead of assumingconfidencesfor various of the data items and combiningthem into a revised confidence measurefor Yeiiow(~wee~v).) Introspection: Another mechanismthat provides the flexibility of active logic is its ability to note that it does not have a given belief P, represented as -,Know(P)and -,Know(-~P).This ability can be applied to encode uncertainties in uncertaintiesof type (iii) above.Hereit is crucial that Knowis interpreted as "currently-in-the-KB", and not as (an often undecidable)"possible-to-derive." Thusan intractable or even uncomputableproblemis replaced with a simplelookupin the (alwaysfinite) KB.In the aboveyellow bird example,this canbe usedas part of a default, to wit: "if somethinglooks yellowand if I (currently) have no knowledgethat there is an irregularity aboutthe situation, then I ,,1 Later, if the concluwill concludethat it in fact is yellow. sion that Tweetyis yellowis foundto be problematic(e.g., it conflicts withother data) that conclusioncanbe retracted (or precisely, disinheritedat subsequenttimesteps, since the actual inferential history is preserved). outcomesof a contradiction betweenformulas ~b and -~b 2namedN1 and N2 are: - A formula of the form cor~t:ra(N:l., N2, T) added to the database where T is the step numberat whichthe contradiction has beendetected. - The contradictands and their consequencesare "distrusted" so that they cannotbe used for further inference but can be reasonedabout. - Formulas of the form distrusted (N) are added the database whereN is the nameof a formula that is distrusted. Onecan specify axiomsto reason about the contradiction and decidewhichof the formulas,if any, to reinstate. Almaprovides the reserved predicate reinstate(N) for that purpose. ¯ Somecomputationsthat need to be done in the logic may be moreeasily, conveniently or efficiently donethrough procedures. Toenable this, prolog programscan be specified as inputs to Alma.Thesecan be invokedwhenneeded through the formulas. Analternative for longer running procedures is Came(see below). ¯ Almacan operate in both the forward and backwardchaining modes.Theusual modeof operation for Almais in the forward direction. Almaalso allows one to do backward chaining to find whethersomespecific formulais derivable. Thisis also donein a step by step fashion,just as for forward chaining. Came:Cameis a process that communicateswith Alma but runs independently.The mainuse of Cameis to run nonlogical computationsasynchronousfrom Almasteps. Oneof its roles is to serve as an input-outputinterface to Alma.In this case Cametransformsexternal input to a formsuitable for addition to the AlmaKBand conversely. Almaformulas can request computations to be done by Cameby asserting call(X, ¥, Z) in the database. This will trigger the programX in Came.Whenthe request is sent to Came,doing(X,Y) is asserted in Almato record that the action has been started. WhenCamereturns with an answer, doing(X,¥) is deleted and done(X,¥) is added. If the action fails, we have error(X, Y) replacing the doing(X, Y). Camecan add and delete formulas directly in Alma.This enables external inputs to be added to the Almadatabase wheneverthey becomeavailable. Cameinteracts with external processes and with the user at standard input and output. A KQML parser converts input to a formsuitable for further processingin prolog. This causes a formula to be added to the Almadatabase. Alma can then request further processingof the incomingmessage basedon user-defined messageinterpretation code. Alma/Carne Almais our current implementationof active logic and Came is a processthat executes non-logicalcomputationsindependent of Almasteps. Alma:At each step, Almaapplies the rules of inference to the formulasin the databaseat that step to producea set of newformulas. Theseare addedto the database, and the process repeats at each subsequentstep. Somecharacteristics of Almaare: ¯ The current step numberis represented in the KBas now(T). Formulascan be written using the step number whichmakesit possible to reason about the current time. ¯ Almamaintains information about various properties of the formulasin the database, includingthe derivations of the formulas, their consequencesand the time at which they were derived; indeed, the entire inferential history is preserved. This informationis available for reasoning throughreserved predicates. ¯ The formulas in the KBhave nameswhichallow the user to assert properties of the formulas and to reason about these properties. Onecanfor instance, assert that a particular formulais to be preferredover another;that its probability is q; etc. ¯ If ¢ and --¢ are presentin the KBwhere¢ is a literal, this fact is detected by the contradiction-detectionrule. The Existing Applications As indicated above, active logic provides a frameworkfor reasoningin presenceof uncertainties. Someof the application areas of active logic are discussedbelow. 1Thisformulation comes close, at least intuitivelyspeaking,to McCarthy’s notion of circumscriptionwithan abnormality predicate; see (McCarthy 1986) ZNames for formulasplaya technicalrole that wewill not further detailhere. 3 Deadline-Coupled Planning In the presenceof contradiction, active logic distrusts both the contradictands(Tweetyflies and Tweetydoes not fly) until it has enoughfacts to trust oneoverthe other. (Nirkheet al. 1997)addresses the problemof deadline coupled planningin active logic. Deadlinecoupledplanninginvolves taking into accountthe uncertainties that could crop up in the planningprocess, while at the sametime factoring in the ever decreasingtime to deadline. Consider for example, an agent planning a strategy to FedExa hard-copyof a paper before the deadline. Whilethe agent is planningthe strategy to get to the nearest FedExlocation, the clock is ticking. Thereforethe timehe has available to reach the location beforeit closes is fast decreasing. Whilehe is trying to reach the nearest FedExlocation, time is still passing and hencemanyuncertain events could happen which could mandatemore planning. For instance, a traffic jam could delay the agent and the nearest FedExlocation mightclose, so that he will haveto go to anotherlocation whichis openlater. (This reasoningabout the choiceof locations to try next, basedon distance and time-to-closing, is naturally expressiblegivenactive logic’s timesensitivity andrepresentation;further, since the reasoningitself explicitly takes placein time, this canbe usedto give preferencefor an easily-computableand workableplan over a moreoptimal possibility whichmighttake too muchtime to compute.) The time tracking and observation mechanismsof active logic renderit useful in such applicationsthat deal withuncertainties whiletrying to meeta deadline. Dialog Active logic has been applied to various dialog problems, including presuppositionfailures (Gurney,Perlis, &Purang 1997), cancellation of implicatures (Perlis, Gurney,&Purang 1996) and dialog management (Perlis etal. 1999). The followingbriefs on these issues. Uncertainty often arises whenCooperativePrinciple (Grice 1975)is not observed amongthe discourse participants. For instance, when the speaker provides insufficient amountof information, or whenit is false, irrelevant, ambiguous,vague, or whenit lacks adequateevidence,the addresseeis uncertain about the speaker’s intention. Even whenthe CooperativePrinciple is being followed,uncertaintycan just as easily arise; e.g. if a speaker uses an unknownword or reference, or when the answerto a questionis implicit rather than explicit. In somecases, conversationor communication just stops there, maybebecausethe speaker is infelicitous and the addressee does not wishto participate in conversation. In mostcases, however,the addresseereasonsabout the speaker’sintention andtries to stay in conversation.Despitethe fact that there is a potential risk of misunderstanding that couldlead to further uncertainty, wetake advantageof reasoningwhenit comesto resolving uncertainty. In the followingsubsections, we will discuss howintelligent reasoning can be effectively woven into uncertaintyresolution in the context of dialog applications. CommonSense Reasoning Active logic finds applications fromfully-decidable default reasoning to reasoning in the presence of contradictions. Someexamplesare listed below (working examplescan be foundat http://www.cs.umd.edu/,,~kpurang/alma/demo/demo.html) SimpleDefault ReasoningGiven facts Birds generaUyfly andTweetyis a bird, active logic can concludeTweetyflies. Default Reasoningwith PreferencesIn active logic, one can specify default preferences like "Penguinsdo notfly is preferred over Birds generallyfly". Then,if at any instant, Birds generally fly. Tweetyis a bird. Tweetyis a penguin. andPenguinsdo notfly, are in the database,active logic can concludeTweetydoes not fly. Maintainingworld view An accurate world view cannot be specified withoutkeepingtrack of current facts, because of the associated uncertainty. Current knowledgecan have gaps (e.g., not knowingwhat constitutes black holes) or mayevenbe wrong(e.g., earth is flat). Astimeevolves,facts mightchangeor cease to be true (e.g., the current president, cold war)or evennewfacts mightarise (e.g., existenceof the International SpaceStation). In order to deal with the ever changingplethora of facts, active logic has mechanisms to add, modifyor delete facts on the fly. AssumptionIn ambiguous cases, people make assumptions based on their previous knowledge.Considerthe following example: "Send the Boston Train to NewYork." (1) In this example,the referent of "the BostonTrain" may be ambiguous:It maymeanthe train currently at Boston, or the train goingto Boston,or the train whichleft Boston this morning(and manyother things besides). Furthermore, there maybe morethan one candidate for each case, as for instance, if there is morethan one train currently in Boston. Nevertheless, wecan deal with this ambiguityby makingassumptionsbased on context. Relevant context might be the following: The speaker once used the phrase "the ChicagoTrain", and meant the train currently at Chicago. Hence, we suppose that "the Bostontrain" meansthe train at Boston(although we know that there are other possibilities); likewise, given several trains at Boston(e.g. Northstar, Acela, Metroliner)we will chooseone candidate, again with an eye to the overall context of the dialog. Forinstance, Northstaris leavingsoonfor Cleveland; Acela has mechanical problems. Here we would be led to assumethat Metrolineris the train meant. It is importantto note, however,that this reasoningmay be mistaken:for it could be that the speaker wantedto send Northstar to NewYork instead of Cleveland. Anyreasoning systemthat employsassumptionsshould be able to repair false assumptions(see "Repair"belowfor details). Reasoningwith ContradictionsTraditional logics generate all consequencesin the presence of contradictions, whereasactive logic uses contradictionsto help in its reasoning process. Anagent can believe that Tweetyflies until he gets contrary informationthroughobservationor reasoning. 4 user responsesshould be appropriate: "Metroliner";"I mean Metroliner"; "Send Metroliner to NewYork". However,it looks like "Sendthe YankeeClipper to Philadelphia"should not be understoodas relevant (althoughwecould alwaystell a story in whichit wouldbe relevant, for it could be an implicit cancellation of the original request, perhapsprompting the question to the user: "Doyou still want meto send the Bostontrain to NewYork?").Likewise,were the user to haveresponded"Sendthe YankeeClipper to NewYork", this could be an indication that the YankeeClipper (whichoriginated in Boston) wasactually the Bostontrain; and it was the assumptionthat "Bostontrain" meant"train at Boston" whichwas incorrect. The question of determiningrelevance is a large, difficult, importantopenarea of research. Ourapproach,as with other formsof uncertainty, is to modeldeterminationsof relevancewith explicit reasoningof the type already described (althoughit should be noted that for applications wherethe rangeof choicesis circumscribed at the outset, a probabilistic approachlooks promising. See, e.g. (Paek&Horvitz 1999)) Repair Whenfalse assumptions are made, it is important for an intelligent systemto be able to repair the mistakeas we do in natural languagediscourse. In example2, the answerer mightadd: "but they are not fresh." In this case, the implication that the roses are fresh wouldneed to be retracted. (Perlis, Gumey,&Purang 1996) describes an active logic implementationwhichcan handle such cancellation of implicature. Likewise, in the TRAINS example, suppose the system wereto choosethe Metrolineras the referent of "the Boston train" througha courseof reasoning.It shouldbe opento the user to say "No",and havethe systemretract its assumption (andremember the retraction, for it will likely be relevant). As mentioned,our version of TRAINS has this ability to retract the assertion "Sendthe Metroliner to NewYork"and remember that retraction to help in future interpretations of user utterances. It is worthpointingout however that the systemhas madetwoassumptionsin order to get to its interpretation: first, that the "Bostontrain" meansthe train at Boston, and second,that the Metrolineris the relevanttrain at Boston. Weare workingon refining our representation and use of the ongoingdialog context to makeit possible not just to reason about other interpretations of phrases like "the Boston Train", but to be able to choosewhichof these assumptions to negatein light of the user’s "No." Wehave implementeda simplified form of reasoning into the Rochester TRAINS (Ferguson et aL 1996) system. In our version of TRAINS,the system makesthe assumption that phraseslike "the Bostontrain" mean"the train currently at Boston",and then utilizes context to makea choice among the trains at Boston.It utilizes contextin that it choosesthe first candidate,the choosingof whichwill not causea contradiction in the KB.(For instance, if the sentence"Donot send Northstarto NewYork"is in the K.B,interpreting "Sendthe Boston train to NewYork" as "Send the Northstar to New York"will cause a contradiction.) If the user deniesthe system’schoiceof train, that denial becomespart of the relevant context, and will be taken into accountwhenthe systemconsidersthe alternative candidates in its ongoingefforts to interpret and act on the sentence. Thusour implementationof TRAINS has a rudimentaryability to repair incorrect assumptions.Weare currently working on waysto expandthis ability, as for instance by addingthe capacityto considerother interpretationsof phraseslike "the Bostontrain". Implieature Each expression we utter can meanmore than it literally means.Considerthe followingexample: Q: "Arethe roses fresh?"A: "Theyare in the fridge." (2) In this example,the answer"Theyare in the fridge" appears to give information about the location of the roses, rather than their state (whichis whatwasaskedabout). However, it is not hard to see, that, given the location, weare meantto infer that the roses are, indeed, fresh. Onewayto handleimplicatureis to assign a default interpretation to the expression. Thebetter way,however,is for the systemto be able to reason about the context, and provide an interpretation that is mostfitting for the context. (Perlis, Gurney, Purang1996) describes an active logic implementationof reasoner whichcorrectly concludesthat the roses are fresh from a dialog like example2. Meta-DialogueWhenuncertainty arises, one way to avoid further uncertaintyand potential discoursefailure is to ask for clarification. In natural languagediscourse,clarification takes place at all times. In the cases discussed, one might confirm the notion that the roses are fresh: "Yes, but are they fresh?". Likewise one might ask: "ByBostonTrain do you meanNorthstar?" Our version of TRAINS is currently equippedwith an extremelyrudimentarymeta-dialogability, triggered only whenits ownreasoning reaches an impasse (i.e. whenit cannot find a candidatewhichdoes not cause contradiction). In such case it returns a messageto the users whichsays: Please specify the nameof the train. Weare working on a more robust representation of Question-Answer dialog exchangesthat will support a more impressiverangeof meta-dialogabilities. Thereare difficult issues to be faced evenin the simplestof cases, however.For whenthe systemsays: "Please specify the train by name"it looks as thoughthe systemshouldencodefor itself an expectation that somefuture responseof the user will be relevantto that request. But in determiningwhetherany given response is relevant,all the sameissues of uncertaintyin dialoginterpretation assert themselves.It seemsthat all of the following Change in meaning Active logic has been also used to modelchanges in the meaningassociated with terms (Miller 1993). The following is the kind of problemtreated in that work. Imaginean ongoingconversationin whichB initially understands A’s use of Bushto meanGeorgeWalkerBush, the 43rd president of the United States. However,A meanthis father GeorgeHerbert WalkerBush, the 41st president. A then tells B that Bushis the "read mylips" president. Supposing that B does not knowanything about the "read my lips" speechthat the 41st president made,B will understand the 43rdpresident to be the "read mylips" president. Later, 5 however,whenA tells B that Bushis married to Barbara, B realizes his misunderstanding. At this point, B has to reassociate previousinformationwith the appropriatereferent; B then understandsthat the "read mylips" president is the 41 st president.Thisis a slightly different sort of repair from those mentionedin the section above,althoughobviouslyrelated. Potential Applications Time Sensitive Automated Theorem Prover Canan automatedtheoremprover function- to its advantage - more like a (human)mathematician7 One way in which this might be possible is via time-sensitivity. A humanis highly awareof the passageof time, and in particular to time well-spentas opposedto ill-spent. Thusa mathematicianmight, after months(or hours, or evenminutes)of pursuinga particular line of investigation, decide that it is not payingoff, and instead try a different track. Activelogic, with its built-in time-sensitivity, provides a potential mechanism for exploring this possibility. The obviousadvantageis that, althougha computermaynot care that it runs a given programfor hundredsof years in a search for a proof, wecertainly care and we will wantit to try a different tack long before manyyears go by. Thereis anotherlikely possible advantagehere, something inherent in the active logic framework:it avoids the KRinflexibility of mosttraditional AI systems. In creative activities such as mathematicalreasoning, often the introduction of a key newconcept, or even an improved(and possibly inequivalent)reformulationof an old concept, can vastly shorten the argumentor evenrecast it entirely. But AI systemstypically are stuckin a fixed meansof representingtheir knowledge and cannot, for instance use Set(X)to refer to finite sets at onetime, and later to sets that are finite or infinite. Indeed, such systemscannot easily give up a belief, and whenthey do ("belief revision"), it is lost rather than availablefor further consideration.Thisis not to say that active logic has a built-in general-purposeconcept-formation mechanism;but it does have the expressive powerto represent and reason with such formations, if they were made available, perhaps along lines of AM(Lenat 1982; Lenat Brown1984). Furthermore,as seen earlier, active logic allowsfor recognition that a given statementis already known,or that it’s negation is known,or that neither is known,thereby avoiding re-derivation of a theorem.Similarly,if such a purported human-style-theorem-prover(HSTP)that is allowed to run in continualmode(rather than started up at a user’s request) already workingon a proof of X, it can respond, if asked (again)whether Xis true, that it is uncertainbutthat a proof already underwayand that it has established such-and-such lemmas,and so on; or that it has givenup since the considerable timespenthas not resulted in results that supportfurther effort. Interactive Mathematical Companion- IMC Weenvision an active-logic-basedinteractive system, which, in conjunctionwith an appropriate computationalmathemat- ical package(MP)as well as a conventionaltheoremprover (TP), can act as a virtual mathematicalassistant and/or companion (BenzmUlleretaL 1997; Chang& Lee 1973). It may be used in a variety of modesas illustrated by the following scenariooutline. A client maywish to use IMCto ask a (mathematical) question. IMCcan try to understandthe question on the basis of its existing KBandquite possiblybe able to answerthe query. Or it maynot understandsomeof the terms used by the client and ask the client to explainthem. Thedesired interactions such as IMCtrying to clarify the meaningof terms canbe achievedeasily by active logic withits ability of detecting and handling ignorance. Thusa dialog mayensuein whichIMCmaytake note of the newdefinitions or facts relevant to the querythat the client furnishes in muchthe same manneras an interested professional colleague might. After this preliminarydialog, IMCmayfind that it is unableto answerthe questionfromits (local) KB(eventhough’thinks it understandsthe question’). At this point, IMCmayconsult the TP to see ifTP has an answerto the client’s question. If TP can respond affirmatively (within the time specified by IMC),IMCcan capture the answer, conveythe same to the client and also update its KB.In this wayIMCis ’leaming’ fromthe interaction with the client. If TPis unable to providethe answer,uncertaintyprevails for the client as well as IMC.TP’sinability to provide the answermaybe becauseone of the two reasons. Either it is not given sufficient time, or it mayjust be unable to prove it from the hypothesescontainedin the query. In any case IMCcan tell the client that it does not knowthe answerto the question. Uncertaintypersists. The client maythen try to pursue somethought of her own.She maycometo a point whereit is necessaryto compute something(possibly as an intermediate step). She may choose to ask IMCto do the computation. IMCinterprets client’s command and formulates the necessary computation as a request and submitsit to the MP.When(and if) it receives the responsefromMPit passes it backto the client. Suchan interaction betweenthe client and IMCcan continue indefinitely until the client decidesto terminateit. IMC is thus able to mobilizethe mathematicalresources for the client. At each step, during the course of an interaction such as outlined above, IMCchecks any newfacts that are submitted to it bythe client, or that are responsesit gathersfromMP or TP, against its current KB.If the newfacts do not directly contradict the KB,they are recordedas assertions in its KB alongwith the (time) step numberwhenit wasentered. If any fact is in conflict withanyexisting itemin the currentKB,the contradictionis notedand client is madeawareof the contradictands, active logic provides a convenientframeworkin which IMCcan be implemented. The ability of IMCto keep track of facts as they develop and to detect contradictions can be put to gooduse by any client whomightbe trying to checkthe truth of (or construct a proof of) a proposition. Continual Computation A studentof AI will soonfind out that, almostwithoutexception, any interesting problemis NP-hard.Whena computer scientist is confrontedwitha hardproblem,there are several options to deal with it. Oneis to simplify the problem,or identify a simpler subproblem so that it can be solved algorithmicallyand automated,andleave the hard part for the human.Anotheroption is for the scientist to study the problem carefully, derive someheuristics, and hopethat they will be adequatemostof the time. But noneof these is quite satisfying: ideally, wewouldlike the computerto do as muchwork for us as possible, andhopefully,be able to derivethe heuristics by itself. A promisingapproachtowardrealizing this ideal is the notion of continualcomputation(Horvitz1997). The mainmotivation behind continual computationis to exploit the idle time of a computationsystem. Asexemplified by usage pattern of desktop computers,workstations, web-servers, etc of today, most computersystems are under utilized: in typical employments of these systems,relatively long spans of inactivity are interrupted with bursts of computationintensive tasks, wherethe systemsare taxed to their limits. Howcan we makeuse of the idle time to help improve performanceduring critical time? Continual computationgeneralizes the definition of a problem to encompassthe uncertain stream of challenges faced overtime. Onewayto analyzethis problemis to put it into the frameworkof probability and utility, or moregenerally, rational decision making(Horvitz2001). However, an implicit assumptionof the utility-based workin continual computationis that the future is somehow predictable. But in manycases, this cannot be expected. For example,for long termplanning,moststatistics will probablylose their significance. Hereis a place wherelogic-based systemswith the capability to derive or discover theoremsby its own(e.g., Lenat’s AMsystem)can play a complementary role, in a similar way wheremathematicsplays a complementary role to engineering principles. Just as mathematiciansusually do not rely on immediate rewardto guidetheir research (yet discover theoremsof utmostutility), AMcan function in a way independentof the immediateutility of its work. Moreprecisely, if weadopt logic as our base for computation and look at problemsolving as theoremproving(Bibel 1997), a systemcapable of discovering newtheoremscan becomea very attractive modelof a continual computationsystem. In such a system, every newlydiscovered theoremhas the potential of simplifyingthe proof of future theorem;so in essence, theorembecomesour universal format for caching the result of precomputationand partial solutions to problems. A simplistic embodiment of the modelcan just be a forward chaining system capable of combiningfacts in its database to produce new theoremsusing modusponens, for instance. Sucha systemis not likely to be very useful, however, becauseit will spendmostof its time derivinguninteresting theorems. So the success of this modelof continual computationwill hinge on whether we can find meaningful criteria for the "interestingness"of a theorem.In the classical AM(Lenat 1982; 1983; Lenat &Brown1984), the systemrelies largely on humanto providethe judgmentof inter- estingness. In a survey of several automateddiscoveryprograms, (Colton &Bundy1999) identify several properties of conceptswhichseemto be relevant to their interestingness, such as novelty, surprisingness,understandability,existence of modelsand possibly true conjectures about them. Althoughthese properties seemplausible, it is not obvious they are precise enoughto be operational to guide automated discoveryprogramstowardsignificant results. Mathematical conceptsare characterized by their abstractness. In fact, it is unclear whetherthe interestingnessproperty of conceptsis evenmeaningfulat such abstract level, wherethe conceptsare stripped to their bare essentials, sanitized fromany domainspecificity: in real life, our interests seemalwaysto be tied to our biological existence in the physical word. Whenisolated from all real-word interpretations, is there an objective wayto tell one theorem is more"interesting" than another? Althoughwedon’t have an answerto this question, wehavea reasonto be optimistic: mathematicshas workedso well for us. Seven Daysin the Life of AI To put things into perspective, we will consider AI, a robot poweredby active logic. A1is an "office robot", whoroamsthe CSoffice building delivering documents,coffee, etc. He was endowedat birth with the desire to makepeople happy. Wewill see howactive logic enabledA1to developinto an excellentoffice robot throughhis first weekof work(Chonget al. 2001). ¯ 1st day: The first day A1began his day as the office robot, he was given a tour of the building. Among other things, he was shownthe poweroutlets scattered around the building so that he can recharge himself. Not wanting to overwhelmAI in the newenvironment,the supervisor let AIoff early. * 2ndday: The morningwent well: AI delivered everything on target, makinggooduse of the maphe constructedfrom the tour given the day before. But a problemoccurredduring the afternoon: A1found himself unable to move!The problemwas soon diagnosed-- it was simplylow battery. (Since thinking drawsless energy than moving,A1could still think.) It turned out that althoughA1knewhe needed powerto operate and he could rechargehimself to restore his battery, it had never occurredto himthat, "he would needto reach an outlet before the powerwent too low for him to move!"The movement failure triggered AI to derive the aboveconclusion,but it wastoo late; AI wasstuck, and could not deliver coffee on request. Caffeinedeprived computerscientists are not happyhumanbeings; AI had a bad day. ¯ 3rd day: AI was bailed out of the predicamentby his supervisor at the morning.Havinglearned his lesson, A1decided to find an outlet a fewminutesbeforethe battery got too low. Unfortunatefor AI, optimal route planning for robot navigation is an NP-completeproblem.WhenAI finally foundan optimalpath to the nearest poweroutlet, his battery level was well belowwhat he neededto move,and AI wasstuck again. Since there wasnothing else he could do, AI decidedto surf the web(throughthe newlyinstalled wireless networkin the building), and cameuponan in- 7 ¯ ¯ ¯ ¯ teresting article titled "Deadline-Coupled Real-timePlanning" (Kraus, Nirkhe, &Perlis 1990). 4th day: After readingthe paper, AI understoodthat planning takes time, and decidedto quicklypick the outlet in sight whenhis battery waslow. Unfortunately,the outlet happenedto be too far away,and AI ran out of poweragain beforereachingit. Actually,there wasa neareroutlet just aroundthe corner; but since AI used a non-optimalplanning algorithm,he wasunable to find it. Again,stuck with nothing else to do, AI kicked into the "meditation"mode where he called the AutomatedDiscovery (AD) module to drawnewconclusions and theoremsbased on the facts he accumulatedthese few days. AI madesomeinteresting discoveries: uponinspecting the history of his observations and reasonings, AI found that there were only a few places he frequented; he could actually precompute the optimalroutes fromthose placesto the nearest outlets. AI spent all night computingthose routes. 5th day: This morning, Al’s ADmodulederived an interesting theorem: "if the battery powerlevel is above 97%of capacity whenAI starts (and nothing bad happened along the way),he can reach an outlet before the poweris exhausted."Finally, AI didn’t get stuck that day. But people werenot quite happy; AI seemednot very responsive. Later, it was foundthat AI spent mostof his time around the outlets recharging himself- since Al’s powerlevel dropped3%for every 10 minutes, the theoremaboveled himto concludethat he neededto go to the outlet every 10 minutes. 6th day: After Al’s routine introspection before work,it was revealed to him that his knowledgebase was populated with millionsof theoremssimilar to the one he found the day before, but with the powerlevel at 11%,12%..... andso on. In fact, the theoremis true whenthe powerlevel is above10%of capacity. Luckily, there was a meta-rule in AI knowledgebase saying that "a theoremsubsumedby anotherwas less interesting;" thus all the theoremswith parameterabove 10%were discarded. Equippedwith this newer, moreaccurate information, A1concludedthat he could get awaywith recharging every 5 hours. Although this mightnot be an optimalrule, it seemedto workwell: AI did his job, and people were happy. 7th day: That happenedto be Sunday. Nobodywas coming to the office. AI spent his daycontemplating the meaningof life. tive logic madeit possible to store the meta-rulesaboutinterestingness of theorems, whichgave AI a good"taste" in evaluating them. Finally, becauseof the uniformity of the logic-based system, precomputationis seamlesslyintegrated into goal based problemsolving through the forward- and backward-chainingmechanisms of active logic. The so called No Free Lunch Theorem (Wolpert Macready1997) states that "all algorithmsthat search for an extremumof a cost function performexactly the same, whenaveragedover all possible cost functions." In other words, without domainspecific structural assumptions of the problem, no algorithm can be expected to performbetter on average than simple blind search. This result appears to be a cause for pessimismfor researchers hoping to devise domain-independentmethodsto improveproblem solving performance. But on the other hand, this theorem also provides compellingreason for embracingthe notion of continual computation, whichcan be seen as a wayto exploit domaindependentinformation in a domainindependent way. However,to take advantage of continual computation, wecannotavoidthe issue of interestingness.Interestingnesstouches on the ultimate uncertainty: whatto do next? Althoughutility theory has its place, we arguedthat there are aspectsof interestingnessnot susceptibleto utility based analysis. Webelieve that a forward and backwardchaining capablelogic systemsuchas active logic, withits expressiveness,time sensitivity, and reflective ability to reasonabout theorems,proofs and derivations, is well-positionedto take advantageof the opportunity offered by continual computation and explorethe possibilities of interestingness. Importing Intelligence Into Computation In this paper we hope to have supportedthe view that (explicit, time-sensitive, and flexible) reasoningcan be advantageous whereverthere is uncertainty. The underlying architecture can be thought of as (one or more)proceduralalgorithms with a suitably attached reasoning componentso the (system of interacting) algorithms becomescapable self-monitoring in real time. The reasoning componentaffords certain protections such as recognizingand repairing errors, informedguiding of strategies, and incorporationof newconcepts and terminologies. In our view, reasoning should apply almost across the board, not only to AI programs, or to automatedtheoremprovers, but also, for example,to operating systems. Imagine an OSthat had an attached active logic. Suchan OSAlmapair not only could gather statistics on its ongoing behavior(this is not new)but could infer and initiate realtime alterations to its behavioras indicated by the circumstances. Weenvision such an application as largely defaultpowered,along the line of error-diagnosis tools such as (deKleer 1986). But an active logic version has the additional virtues of accepting dynamicallychangingobservations, andof havinga genuinereal-timedefault capability via its introspective lookupinterpretation of ignorance. Wewouldlike to bring to attention several features of active logic which helped AI tremendously: time awareness of active logic enabledA! to realized that optimality is not necessarilydesirable, especially whenthere is a deadlineapproaching;this realization improvedhis chancesof success. Morefundamentally, the time awarenessallows AI to keep track of changes:the battery level is Xnowdoes not imply that is still true 5 hourslater. Activelogic’s Now(i)predicate provides a natural and efficient wayto deal with that. The history mechanismin active logic gave AI an opportunity to spot certain pattern in his past behavior,whichhelped him improvehis future behavior. Theexpressiveness of ac- 8 Acknowledgments Lenat, D. B. 1983. TheoryFormationby Heuristic Search. Artificial Intelligence 21:31-59. McCarthy,J. 1986. Applicationsof circumscriptionto formalizing common-sense knowledge.Artificial Intelligence 28(1):89-116. Miller, M. 1993. A Viewof One’s Past and Other Aspects of ReasonedChangein Belief. Ph.D. Dissertation, Department of ComputerScience, University of Maryland,College Park, Maryland. Nirkhe,M.; Kraus,S.; Miller, M.; and Perlis, D. 1997.How to (plan to) meet a deadline betweennowand then. Journal of logic computation7(1): 109-156. Pack, T., and Horvitz, E. 1999. Uncertainty, utility and misunderstanding:A decision-theoretic perspective on groundingin conversational systems. In Proceedings,AAAI Fall Symposiumon Psychological Models of Communication in CollaborativeSystems. Pearl, J. 1988. Probabilistic Reasoningin Intelligent Systems: Networksof Plausible Inference. San Mateo,California: MorganKaufmann. Perlis, D.; Purang, K.; Purushothaman,D.; Andersen,C.; and Traum, D. 1999. Modelingtime and meta-reasoning in dialogue via active logic. In Workingnotes of AAAIFall Symposiumon Psychological Models o f Communication. Pedis, D.; Gumey,J.; and Purang, K. 1996. Active logic applied to cancellation of Griceanimplicature. In Working notes, AAA196Spring Symposiumon ComputationalImplicature. AAAI. Perlis, D. 1997. Sources of, and exploiting, inconsistency: Preliminary report. Journal of APPLIEDNONCLASSICALLOGICS7. Ramoni,M., and Riva, A. 1994. Belief maintenance in bayesian networks. In Proceedingsof UA11994. Wolpert, D. H., and Macready,W. G. 1997. Nofree lunch theorems for optimization. IEEETransactions on Evolutionary Computation1 (1):67-82. Wewouldlike to acknowledge support for this research from AFOSRand ONR. References Benzmtlller, C.; Cheikhrouhou,L,; Fehrer, D.; Fiedler, A.; Huang, X.; Kerber, M.; Kohlhase, M.; Konrad, K.; Meier, A.; Melis, E; Schaarschmidt,W.; Siekmann,J.; and Sorge, V. 1997. f2MEGA: Towardsa mathematical assistant. In McCune, W., ed., Proceedingsof the 14th International Conference on Automateddeduction, volume1249 of LNAI,252-255.Berlin: Springer. Bibel, W.1997. Let’s plan it deductively!In IJCAI, 15491562. Bratman, M. 1999. Faces oflntention. Cambridge, UK: CambridgeUniversity Press. Chang, C. L., and Lee, R. C. T. 1973. SymbolicLogic and Mechanical Theorem Proving. NewYork, NY: Academic Press. Chong, W.; O’Donovan-Anderson,M.; Okamoto,Y.; and Perils, D. 2001. Sevendays in the life of a robotic agent. In To be presented at the GSFC/JPL Workshopon Radical Agent Concepts. Colton, S., and Bundy,A. 1999. Onthe notion of interestingness in automatedmathematicaldiscovery. In AISB Symposium on AI and Scientific Discovery. deKleer, J. 1986. Problemsolving with the ATMS. Artificial Intelligence 28:197-224. Ferguson, G. M.; Allen, J. E; Miller, B. W.; and Ringget, E.K. 1996. The design and implementation of the TRAINS-96 system: A prototype mixed-initiative planning assistant. TRAINS Technical Note 96-5, University of Rochester. Grice, H. P. 1975. Logicand conversation.In Cole, P., and Morgan,J. L., eds., Syntax and semantics3: SpeechActs. AcademicPress. 41-58. Gurney,J.; Pedis, D.; and Purang, K. 1997. Interpreting presuppositionsusing active logic: Fromcontexts to utterances. ComputationalIntelligence 13(3):391-413. Horvitz, E. 1997. Modelsof continual computation.In Proceedingsof the 14th NationalConference on Artificial Intelligence and9th InnovativeApplicationsof Artificial Intelligence Conference (AAAI-97/IAAI-97), 286-293. Menlo Park: AAAIPress. Horvitz, E. 2001. Principles and applications of continual computation.Artificial Intelligence 126(1-2):159-196. Kraus, S.; Nirkhe, M.; and Pedis, D. 1990. Deadlinecoupled real-time planning. In Proceedingsofl99ODARPA workshopon Innovative Approachesto Planning, Scheduling and Control, 100-108. Lenat, D. B., and Brown, J. S. 1984. WhyAMand EURISKO appear to work. Artificial Intelligence 23(3):269294. Lenat, D.B. 1982. AM:Discovery in Mathematics as Heuristic Search. NewYork, NY:McGraw-Hill.1-225. 9