next up previous
Next: DISCUSSION Up: No Title Previous: Specialisation

EXAMPLE

 

Milord II is a modular language for knowledge engineering based on reflection mechanisms and that implements the specialisation calculus described in this paper. More general descriptions of Milord II may be found elsewhere [14, 15]. The purpose of this section is only to show how the specialisation mechanism is actually used in a medical cooperative setting. In real medical environments, problems are usually solved by means of the cooperation of several human agents. The example presented in this section intends to assist physicians to diagnose pneumonia diseases, and consists of two cooperating agents.

In Milord II agents are implemented as autonomous processes in a network. Agents communicate each other by means of message passing in a mail-like system. This example is composed of two agents: the Clinician agent and the Micro-biologist agent (see Figure 1) that assist their correspondent human physicians. The Clinician agent assists the physician (user of that agent), that has a close contact with the patient, to make a diagnosis of pneumonia. The Clinician agent uses its own knowledge to get an initial diagnosis of the patient from clinical signs. It also uses the services of the Micro-biologist agent to refine this initial diagnosis into a definitive one. The Micro-biologist agent provides its own opinion of the diagnosis based on the analysis of a sample (of sputum) of the patient and on the initial diagnosis made by the Clinician agent.

   figure876
Figure 1: General schema of the agents.

Let us explain the Milord II code of this example that can be found in Figures 2 (Clinician agent) and 3 (Micro-biologist agent) respectively.

   figure883
Figure 2: Clinician Agent code.

The Clinician agent declaration contains: the set of agents this agent can communicate with (acquaintances), in this case just Micro-biologist; the import interface, that is, the set of propositions that can be asked to the user of that agent, for instance Expectoration; the export interface, that is, the set of propositions that can participate in output communication utterances, in this case pneumonia; and the deductive knowledge containing the dictionary with the declaration of the facts of the agent (that is, tex2html_wrap_inline1454 ) and a set of weighted propositional rules (that is, Mv-Rules).

The set of truth-valuesgif used in this example is tex2html_wrap_inline2304 =( impossible, slightly-possible, possible, very-possible, definite) where impossible = 0 and definite = 1 (see Section 2). We follow in this section a convention used in Milord II: intervals of type [a,1] are written just as a.

The Clinician agent exports the proposition pneumonia. This agent tries to deduce this proposition interacting with the known agents (Micro-biologist) and its user, and using its own rules. The rules may contain queries to other agents about values for particular propositions belonging to the other agent's language in the form Agent?Proposition. For instance, the proposition Pneumonia can be deduced by rule R004 from a proposition valued by agent Micro-biologist, that is Micro-biologist ?Pneumonia. Propositions belonging to the import interface (for instance Expectoration) are asked to the user of this agent. Given an initial diagnosis of pneumonia ( Initial_Diagnosis_Pneumonia, definite), the rule R003 can be specialised to deduce the proposition (Pneumonia, possible). In the case of a definite diagnosis of pneumonia given by the Micro-biologist agent, the rule R004 can be specialised deducing (Pneumonia, definite). In other words, the agent gives more importance to the micro-biological evidence of pneumonia.

   figure923
Figure 3: Micro-biologist agent code.

Figure 3 contains the declaration of the agent Micro-biologist. It knows the Clinician agent and needs data about the sample of sputum of the patient. To deduce the proposition Pneumonia, it previously needs to deduce the presence of pneumococcus in the sputum sample of the patient and the presence of streptococcus pneumonia in a culture of the sputum (rule R001), and it needs to know the initial diagnosis of pneumonia obtained by the Clinician agent (rule R002). Notice that the Micro-biologist agent cannot deduce pneumonia without an initial diagnosis (by the Clinician agent).

Making abstraction of the real operational semantics, let us explain the specialisation inference mechanism on this example. Consider that the physician asks for the value of the diagnosis of Pneumonia to the Clinician agent. To solve this query this agent will then specialise its own rules and will make questions to the other agents and to its user. Consider the following Clinician agent initial mental state :

tex2html_wrap2504

To conclude the fact Pneumonia the agent needs to conclude an initial diagnosis for pneumonia (the proposition Initial_Diagnosis_Pneumonia) and to ask the agent Micro-biologist for the value of its particular diagnosis of Pneumonia. Recursively, to deduce an initial diagnosis for pneumonia, the agent needs to gather all the data relative to the patient (Cough, Expectoration, Fever and Rx_Lung_Infiltrate). This gathering has to be made bay the user of the Clinician agent.

Consider the case of a patient who has cough, expectoration, fever and infiltration in the lung; the sample of sputum contains gram positive cocci, and the culture of sputum contains streptococcus pneumonia. It can be expressed with the following sentences.

tex2html_wrap2506

Consider now that the user of the agent Clinician gives the propositions tex2html_wrap_inline2350 , tex2html_wrap_inline2352 , and tex2html_wrap_inline2354 (cough, expectoration and fever). Then, a first specialisation step will produce the following new AG'.

tex2html_wrap2508

Notice that the first rule has been totally specialised to get (Respiratory_Infection, [definite, 1]). The truth-value of that proposition corresponds to the successive application of the SIR rule. For instance, we can show a specialisation step of that rule with respect to the proposition Fever.

tex2html_wrap2510

The question about pneumonia made by the Clinician agent to the Micro-biologist agent will activate a deductive process in that agent. As showed in tex2html_wrap_inline2398 , to deduce the fact pneumococcus the agent needs to know the initial diagnosis of pneumonia made by the Clinician agent and the propositions related with the analysis of sputum.

tex2html_wrap2512

Notice that (see Figure 2) the fact Initial_Diagnosis_Pneumonia is not exported by the Clinician agent. Then it can not be asked to that agent. As we will see this will force the Clinician agent to answer with a conditioned answer, that is, a rule.

Suppose the answers to the questions Sputum_Gram_Positive_Cocci and Sputum_Culture_Streptococcus_Pneumonia are given to the Micro-biologist agent by its user. Then, specialising tex2html_wrap_inline2418 with respect to the sentences corresponding to those propositions we get:

tex2html_wrap2514

No more specialisation is possible. Then, in this case, the answer to the question Pneumonia given by the Micro-biologist agent is a specialised rule, for that agent cannot ask the Clinician agent a non exportable fact:

tex2html_wrap2516

This rule is then sent back to the Clinician agent from the Micro-biologist agent, and translatedgif. In this particular case the translation is:

(Initial_Diagnosis_Pneumonia tex2html_wrap_inline1998 Microbiologist?Pneumonia, definite)

Now we can see another specialisation step over tex2html_wrap_inline2456 . The specialisation is done on the translation of tex2html_wrap_inline2458 and on tex2html_wrap_inline2460 . The result is the following:

tex2html_wrap2518

AG'' already contains a definite truth-value for the proposition pneumonia to give back to the user of the Clinician agent who started all the deductive process with the initial query. The answer is then: (Pneumonia, definite). Notice that there would be no final diagnosis for pneumonia without an initial one, and that without a micro-biological diagnosis the final diagnosis would have had as maximum truth-value possible.


next up previous
Next: DISCUSSION Up: No Title Previous: Specialisation

Josep Puyol-Gruart
Wed Jun 11 15:38:47 MET DST 1997