Assignment #2: Knowledge Intensive Processing


Assignment #2 consists of 3 parts: a self-explorartory on-line task, some paper and pencil work (plus applet testing), and some rule writing in Prolog.

Due date: Mo 15.12.2003

Part 1: Self Exploration

Please go to:

(page protected with the usual username and password)

alternatively go to:

and try out the definite reasoning system. The purpose is to see how the process of question answering within a knowledge base can be cast as a search problem.




Part 2: Paper and pencil (and applet testing)

Total possible points: 20

a) Write down first order logic representations (FOL) for the following sentences, suitable for use with Generalized Modus Ponens:

  1. Every phd is a student.
  2. Professors and phds are teachers.
  3. Susan is a phd.
  4. Paul is a student.
  5. Robert is a professor.
  6. A phd is a student and a teacher.
  7. A teacher teaches students.

b) Draw a proof tree generated by an exhaustive backward-chaining algorithm for the query:

 x  Student(x).

How many solutions for x actually follow from your sentences?

c) Translate the FOL representations into CILog, the notation language of the Definite Clause Deduction Applet, which is similar to Prolog. If you are not familiar with Clause Logic, CILog or Prolog, you may want to consult the Definite Clause Deduction Applet and have a closer look at one of the sample knowledge bases (File → Load Sample Knowledge Base → Select an Example File).

d) Create your own student/teacher CILog knowledge base with the Definite Clause Deduction applet, and solve different queries. Follow the instructions here.

What do you notice when asking the query 'teach(X,Y).'? Change your knowledge base if considered necessary.

e) Optional: You can also query your Prolog knowledge base by using a Prolog interpreter. See Prolog Resources for more information about the interpreter.

What to hand in:

a) FOL representations on paper
b) Proof tree on paper
c) Prolog or CILog knowledge base either on paper or electronically (email file to kaufmann at

Part 3: Defining rules for an expert system

Total possible points: 20


In this part of assignment #2, you will define diagnostic rules for a small expert system, which can diagnose problems of a real world appliance and give recommendations for repair.

The rules are based on real world user manuals of diverse electric/electronic appliances. The task will be to study an existing rule-based expert system (implemented in Prolog), and to develop rules for an expert system for the appliance described in the user manual you have been given in class. The rules will incorporate probability measures.

You will need to provide evidence that your rule knowledge base performs correct diagnostic task according to the user manual, which it does in collaboration with an existing inference system.

What to do:

  • Study the sample expert system, and especially the knowledge base that contains the diagnostic rules encoded in Prolog for solving car problems (see Prolog Source Code).
  • Study the troubleshooting part of the user manual of the appliance. The manual (in English and German) was handed out in class.
  • Determine what the possible systems and system components that can fail are.
  • Define askable symptoms to infer the bad component of a failed system.
  • Establish rules to make recommendations for repairs.
  • Incorporate certainity measures into the rules.
  • Write the rules according to the format of the car rules encoded in Prolog.
  • Run the expert system (your knowledge base and the exshell file) on the Prolog interpreter. We suggest that you use the SWI-Prolog Interpreter because we have tried it, and we know it works (see Prolog Resources).

Don't change the exshell file, just define diagnostic rules analogous to the cars file!

What to submit:

Hand in the Prolog file that contains your diagnostic rules via email to kaufmann at

This assignment part is a group assignment and can be done in teams of up to three students. Don't forget to list the name of every student in your group in the submitted file.