Knowledge engineering (AI)


next up previous
Next: Some terminology
Up: Supplement 1
Previous: How rules are phrased
Back: to main list of student notes

Knowledge engineering (AI)

 

Much of the business of programming is converting vague everyday language into precise programs. In A.I., we often have to do this when putting the knowledge into expert systems, as we saw earlier.

It is the job of the knowledge engineer to interview experts and set them trial problems, then convert the results into something an expert system can handle. Experts usually are not able to talk systematically through a topic, giving neat syllogisms like those in the other exercises. Instead, they'll ramble, throwing in little snippets of information as something prompts its recall. Below, I imagine such a monologue from a G.P. who's being interviewed during the construction of a medical expert system.

Can you translate this into Prolog? What you need to do is to identify key concepts in the monologue: kinds of treatment, different types of illness, the various symptoms, and so on. Then tease out all the logical connections, throwing away any un-necessary ones. Finally, write down the rules, after choosing suitable names for your facts.

You were asking what drugs I bought last month. Well, the main one's a new product from Hoffnung-Gavroche called brontomycin - if I buy more than 30 g each month, they throw in a free skiing holiday at the end of the year. They're very good with these perks. I must have gone on at least 50 skiing lessons since I started with Hoffnung. Of course, I only go for fun; to train seriously you need to be really fit, and with all these drug company bashes I've been to recently, I couldn't even do a pressup without collapsing, let alone the daily half-marathons those professional skiers seem to thrive on.

It seems to be good stuff though...Treats what we call remediable infections. Fowlpox's one such. Very easy to prescribe, because it works the same for all remediables. Just give the patient a daily dose of 10 mg for four weeks.

I treated the Mayor with it last week when he returned from a holiday in Enschede in Holland. He had Dutch measles. That's another remediable infection. You want to know the symptoms ...itchy red spots all over and high temperature. As with all remediable infections, you have to quarantine for three weeks, otherwise the kids get it. And that's where you must take care to halve the dose, if you don't then some children may develop eczma, hyperactivity and floating ribs.

I remember that because the hairdresser caught fowlpox recently. He does pets as a sideline, and the local chicken farmer had called him in for a root-perm and auburn rinse on his prize Leghorns before they went up to the Royal Poultry Show. It's like Dutch measles, but the temperature crashes to 92 or so. Anyway, he refused my quarantine order ...wanted the money I suppose ...it was just before the school sports day, and all the parents were bringing in their brats to be smartened up. Whole school went down with it.

Thought at first he might have an allergy. Some people are allergic to the plant extracts in deodorants, and get itchy red spots ...or sometimes hard black lumps in the armpits instead. No trouble to treat - like all allergies you remove the cause for a trial period, that's ten days, and then desensitise. He never uses them though - most unpleasant in there on a hot day. Smells like the Black Hole of Calcutta...There's another allergy. James the florist came in last month, he'd was shaking with cold, had severe itching and red spots all over. Not the chickens this time; I knew he works with exotic plants from the nursery up there, and so I asked him whether he'd handled any of those Rumanian ``Devil's Lovebite'' creepers. That causes a plant allergy too: ``False Fowlpox'' because it looks the same if you don't know the cause.

Someone else had that ...well actually it wasn't the allergy but something else. A senior chemist from the Grimbledon Down bio-warfare place. She had exactly the same symptoms. Nasty place, Grimbledon Down...they run recombinant-DNA analysis on plague strains. Suppose it's safe, but...standing instructions from the MoD if anyone shows up with high temperatures and black lumps or itchy red spots: plague's non-remediable, so there's no treatment, not even brontomycin. But you must take safety precautions. Not really quarantine, no ...evacuate the country for a radius of five miles, burn the corpses, and shoot all the foxes, rats, badgers, and voles. Oh, and the chickens.

Anyway, get back to the chemist ...she'd been refining batavium. They use it in cold-fusion research. Left the fume-cupboard open, and got a whiff ...came down with the same symptoms as ``Devil's Lovebite''. But if it's caused by batavium, then it's not a plant extract allergy, but heavy metal poisoning. You have to flush out the whole system with chelates, and place on dialysis for four weeks. That reminds me ...if she'd had a remediable infection, I'd have to replace the brontomycin by 30 mg daily of prestatine ...it seems that more than 500 gm daily of bronto causes birth defects in rats, so it's been forbidden for pregnant women...

Now translate the following question, and use Prolog to answer it: Kylie, having just returned from a holiday in Eindhoven, has itchy red spots all over and a high temperature. Do you recommend any safety precautions such as quarantine? What treatment is recommended? Would you change this if she were pregnant? What's the cause?


next up previous
Next: Some terminology
Up: Supplement 1
Previous: How rules are phrased
Back: to main list of student notes



Jocelyn Paine
Tue Jun 4 17:40:31 BST 1996