Вы находитесь на странице: 1из 9

COMPSCI 367

THE UNIVERSITY OF AUCKLAND


SECOND SEMESTER, 2012
Campus: City

COMPSCI.367
The Practice of Artificial Intelligence
(Time allowed: 45 minutes)

This test is out of 100 marks.


Attempt ALL questions.
Write your answers in the space provided in this booklet. There is space at the back for answers
that overflow the allotted space.
The use of calculators is NOT permitted.

Surname (Family Name):

First Name(s):

UoA ID Number:

Login Name (UPI):

Section Mark Marks Available

A 80

B 20

Total 100

Continued…
2 COMPSCI 367
Print Name:
____________________________________________________________________________

PART A: Knowledge Engineering

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].

Dynamic knowledge refers to knowledge that is constantly changing. Dynamic knowledge is


constantly changing which means it may have changed by the time the knowledge has been
elicited, modeled and implemented. Moreover, if the knowledge changes faster than the
knowledge-based system can solve the problem then it cannot even be used as an answer to a
question because it may almost instantly incorrect.

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]

Backward chaining or goal-driven inferencing is typically used in diagnostic systems where


one has a hypothesis and one tests if the symtoms confirm the hypothesis by chaining back
from the goal (from the THEN part of a rule to the IF condition part)

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

2) building an ontology leads to a greater understanding of a problem domain

3) an ontology allows different computer systems or agents to share information or knowledge

[other reasonable reasons were accepted]

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

(deftemplate car “a template for a computer”


(slot id)
(slot name)
(slot type)
(slot manufacturer)
(slot owner)
(slot processor)
(slot operating_system)
(slot ram_size (type number))
(slot age (type number))
(slot warranty (allowed-symbols T F)))

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).

(deftemplate node (slot name) (multislot children))


(deftemplate tree (slot root))

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]

f(T1,S1) x w1 calculates local similarity for each case feature

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…

Вам также может понравиться