Professional Documents
Culture Documents
COMPSCI.367
The Practice of Artificial Intelligence
(Time allowed: 45 minutes)
First Name(s):
UoA ID Number:
A 80
B 20
Total 100
Continued…
2 COMPSCI 367
Print Name:
____________________________________________________________________________
Question 1
What is heuristic knowledge? Give an example.
[6 marks]
Heuristic knowledge are rules of thumb that usually or typical hold true such as:
“IF meal is crayfish THEN meal is expensive”
However, there could be exceptions to this heuristic if the location was “on dive boat”
Question 2
What is control-knowledge? Give an example.
[6 marks]
Control knowledge is also know as meta-knowledge (knowledge about knowledge) and refers
to knowledge about solving a problem, for example which inference method to use.
Forexample:
“IF patient is child THEN best-first search”
Continued…
3 COMPSCI 367
Print Name:
____________________________________________________________________________
Question 3
Not all knowledge is suitable for inclusion in a knowledge based system. Is dynamic
knowledge suitable or not? Please explain your answer.
[6 marks].
Question
4
Forward
Chaining
and Backward
Chaining
are two inferencing methods for rules, each is
commonly used for different problem types. Describe a problem you would use each for.
[6 marks]
Forward chaining or data-driven inferencing is typically used in process control systems such
as controlling manufacturing equipment where rules fire to see the consequences of data (from
the IF condition to the THEN part)
Continued…
4 COMPSCI 367
Print Name:
____________________________________________________________________________
Question 5
What are the advantages of using a rule-based system like CLIPS to infer over a rule set rather
than coding the rules directly as IF-THEN-ELSE statements in a programming language like
Java?
[10 marks]
CLIPS is declarative meaning that in CLIPS rules can be written in any order and can be
grouped together into meaningful collections or groups. This makes writing and maintaining
the rules mucheasier than in Java where the logic of the IF-THEN-ELSE statements are hard
coded in procedural code – this becomes very hard to edit and maintain as the number of rules
increases
The inference engine in CLIPS supports backward and forward chaining and breadth first and
dept first search to be chosen at run time. This would be very hard to do in Java, again because
it is procedural and because you’d have to program an inference method yourself.
CLIPS rules are easy for non-programmers to read and even edit.
CLIPS provides debugging tools to monitor rule execution and view the rule stack or agenda
Question 6
Create a semantic network to describe a car. Your network should include the concepts: car,
person,
driver,
engine,
petrol,
petrol
tank,
and road.
[14 marks]
[1 mark for each correct concept and 1 mark for each correct relation to a maximum of 14]
Continued…
5 COMPSCI 367
Print Name:
____________________________________________________________________________
Question 7
List three reasons for using an ontology.
[6 marks].
1) an ontology provides a common and shared language to describe the concepts of a domain
and their relations
Question 8
Define a CLIPS template to describe a computer. Your car template should be able to handle
the following information:
[10 marks].
ID: serial number
Name: computer name
Type: desktop, laptop, tablet . . .
Manufacturer: Apple, Dell, Acer, Samsung . . .
Owner: name of owner
Processor: Intel, AMD
Operat System: OS X, Windows, Linux, Android
RAM Size: amount in gigabytes
Age: age in years
Under-warranty: no, yes
didn’t deducted for minor syntax errors but half marks for asserting or declaring each each slot
separately. typing and allowed symbols or values was not necessary
Continued…
6 COMPSCI 367
Print Name:
____________________________________________________________________________
Question
9
Defining a tree data structure in CLIPS.
A tree
fact will store the name of the root node of the tree. A node
fact in the tree has a name
and a list of that node's children (if any).
Given the tree above, write the facts, using the templates defined above, to encode this tree.
[12 marks]
(deffacts initialTree
(node (name mammal) (children rodent ungulate canine))
(node (name rodent) (children rat mouse))
(node (name rat))
(node (name mouse))
(node (name ungulate) (children cow buffalo))
(node (name canine) (children wolf dog))
(node (name cow))
(node (name buffalo))
(node (name wolf))
(node (name dog))
(tree (root mammal))
1 mark per correct line half marks for asserting or declaring each node separately
Continued…
7 COMPSCI 367
Print Name:
____________________________________________________________________________
Question
10
Given the formula for the k-nearest neighbour algorithm below identify which part of the
formula refers to local similiarity and which to global similarity.
[4 marks]
Similarity (T,S) i.e., the sigma ∑ sums global similarity for the entire case T with respect to S
Continued…
8 COMPSCI 367
Print Name:
____________________________________________________________________________
PART B:
_______________________
Continued…
9 COMPSCI 367
Print Name:
____________________________________________________________________________
This page left blank for any questions that overflow.
Continued…