Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

December 2022

FACULTY OF ENGINEERING

Third Year Examination for the Degrees of

Bachelor of Science and Master of Engineering

COMS30013 - SAMPLE PAPER 1

ARTIFICIAL INTELLIGENCE

Section I (Multiple Choice): Answer all 15 (out of 15 possible) questions

There are 15 questions in Section I for which ALL of your answers will count For each question, select exactly one correct option

(Please note that an MCQ tick sheet will be provided in the January exam)

Your 15 answers are all worth up to 1 mark each

There are a maximum of 15 marks available in Section I

Section II (Long Answers): Answer only 2 (out of 3 possible) questions

There are 3 questions in Section II for which only your best TWO answers will count

(Please note that an answer booklet will be provided in the January exam)

Clearly indicate which question, part, and sub-part you are answering

If you answer more than two questions, only your best two answers will count

Your 2 best two answers are both worth up to 15 marks each There are a maximum of 30 marks available in Section II

The maximum possible mark on this exam is 45

The maximum time allowed on this exam is 2 hours

Calculators must have the Faculty of Engineering Seal of Approval.


Part I - Answer all 15 questions. Each question is worth 1 Mark.

1.   Which one of the following is a well-formed Prolog term?

A.  _r(_a)

B.  R(a,B)

C.  r_(a_)

D.  R'

2.   What is the standard logical interpretation of the Prolog operator ";"?

A.  OR

B.  XOR

C.  IF

D.  AND

3.   Which one of the following is a unifier of the Prolog terms p(W,f(W,X)) and p(Y,f(a,Z))?

A.  { W/a }

B.  { W/Y , Y/a, Z/X }

C.  { W/a, Y/a, X/V, Z/V }

D.  { }

4.   If (x,y) are the coordinates of an agent in a modified GridWorld where agents can move one square at a time up, down, left, right OR diagonally, which one of the following is an admissible heuristic for the length of the shortest path    back to the origin (0,0)?

A.  (x*x) + (y*y)

B.  x+y

C.  x*y

D.  x

5.   Which one of the following statements is FALSE?

A.  A* will never return a worse solution than breadth-first search

B.  breadth-first search will never visit more nodes than A*

C.  breadth-first search will never return a worse solution than depth-first search

D.  depth-first search may visit fewer nodes than A*



6.   Which of the following is NOT a real bio-inspired computing paradigm?

A.  DNA computing

B.  Swarm Intelligence

C.  Genetic programming

D.  Logic programming

7.   What is an “allele”?

A.  A value taken by a gene

B.  A loci

C.  A chromosome

D.  A genotype

8.   Which of the following statements is least true? Hillclimbing methods are:

A.  Effective for unimodal landscapes

B.  Good at finding local optima

C.  Efficient

D.  Local search methods

9.   The fitness score assigned to individual I in generation G of a GA's execution  is X before fitness sharing is applied but becomes Y afterwards. If Y<X which of the following statements is FALSE?

A.  Other individuals in G are similar to I

B.  I is suboptimal

C.  Fitness sharing has reduced the fitness score of other individuals in G

D.  none of the above (i.e. A, B and C are all true statements)

10. Which CS pioneer worked on which area of biology:

A.  Turing = Evolution; Babbage = Development; Von Neumann = Learning

B.  Turing = Development; Babbage = Evolution; Von Neumann = Learning

C.  Turing = Self-Reproduction; Babbage = Development; Von Neumann = Evolution

D.  Turing = Development; Babbage = Evolution, Von Neumann = Self- Replication

11. Proactive agents anticipate changes in the environment.

A.  TRUE

B.  FALSE


12. Consider a smart home as an agent. The smart home agent is programmed to   dim the lights in aroom when a person in the room stops reading a book and  turns on the TV. The behaviour that the smart agent exhibits is an example of areactive behaviour.

A.  TRUE

B.  FALSE

13. In a norm lifecycle, which of these is anon-terminal state?

A.  Violated

B.  Satisfied

C.  Expired

D.  Conditional

14. Which of these statements about the environment and environmental properties is FALSE?

1) The environment in a chess game is deterministic

2) For a card game in which each player draws one card in each round and the player drawing the highest card is declared the winner of the round, the  environment is episodic

3) The environment through which a space probe travels is dynamic

A. 1

B. 2

C. 3

D. None of the above (i.e. A, B and C are all true statements)

15. The government’s Christmas guidance for university students includes the following statement: “Universities should move learning online by 9

December so students can continue their education while also having the option to return home to study from there.”

Provide a normative representation (norm type, subject, object, antecedent, consequent) for the above-mentioned Christmas guidance statement.

A.  Authorization(Government, University, CurrentDate > 9 Dec 2020, Move-Learning-Online)

B.  Commitment(University, Student, True, Move-Learning-Online)

C.  Commitment(Student, University, CurrentDate > 9 Dec 2020, Move-Learning-Online)

D.  Commitment(University, Student, CurrentDate > 9 Dec 2020, Move-Learning-Online)

Part II - Answer TWO of the three questions. Each is worth 15 Marks.

II.1   Logic Programming

You are given the following Prolog program, which aims to characterise the parity of natural numbers represented in Peano notation - where successive   integers are denoted by the terms 0, s(0), s(s(0)), s(s(s(0))), … .

The program consists of one fact (stating that the number zero is even) and    two rules (one stating the double-successor of any even number is also even; and another stating that a number is odd is it is not even) :

even(0).

even(s(s(N))) :- even(N).

odd(N) :- \+ even(N).

a)   Draw an SLD tree for the query ?-odd(s(0)).  This query asks Prolog to verify that the number one is odd. You  should assume the default Prolog    search strategy and the standard "cut-fail" definition of negation as failure.  Clearly state whether the query succeeds or fails. [3 marks]

b)   Translate the above program into a well-formed formula First-Order Logic (FOL) in which each Prolog symbol is replaced by its closest classical counterpart (make sure your formula is correctly quantified and parenthesised, if necessary). [3 marks]

c)   By reasoning about the structure of the possible SLD trees that result when the predicate odd/1 is called with ground and variable arguments, respectively, highlight any potential pitfalls that users should be aware of when calling this predicate. [8 marks]

d)   Write down an alternative definition of odd/1 whose behaviour is always intuitively correct (irrespective of whether its argument is an input or an output). [1 mark]

II.2   Genetic Algorithms

Gary is interested in evolving images using a genetic algorithm. Each image is a  50-by-50 grid of coloured pixels. Each genotype is a one-dimensional array of N alleles that each explicitly specify one Red-Green-Blue colour component of

one pixel. The colour of one pixel is defined by three consecutive alleles on the genotype, specifying the red, green, and blue components of the pixel's colour,  respectively. Each allele can take a floating point value in the legal range [0,1]. The first three alleles in the genotype define the colour of the top-left pixel, the next three alleles define the colour of the pixel immediately to the right of this   first pixel. The final triple of alleles defines the colour of the bottom-right pixel in the image.

a)  If each allele can take one of 2^16 different values between 0 and 1, how many different images does the search space contain? [1 mark]

b)  Gary implements mutation in the following way. Each allele in the genotype of a new offspring image has independent probability m of being mutated.

When an allele is mutated, the parental value is perturbed by adding a value   drawn uniformly at random from the range [-0.1, +0.1]. If the new, perturbed value is outside the legal range of [0,1] it is truncated to the nearest legal

value.

When Gary runs his genetic algorithm, he is interested to see that images with  bright bold colours tend to be evolved. Explain how his mutation operator may be contributing to this result. [4 marks]

c)   Gary is thinking of implementing sexual recombination. He wants to combine  two high fitness parental images to create an offspring. He has considered one- point crossover at a randomly selected position on the genotype, but he isn't

convinced that this will be a good choice. Define a simple crossover operator that will take two parental genotypes and create a single offspring genotype.  The offspring genotype should comprise a rectangular section of one parent   replacing the equivalent part of the image provided by the second parent. [4 marks]

d)  Gary is a little disappointed with the results generated by his genetic

algorithm. The images in the population tend to be quite similar and it takes a longtime to discover interesting images. Gary has been told by Sue that his    "direct genotype-phenotype mapping might be too simplistic", but he has not  come across this idea before. Help Gary to understand the concept of a

genotype-phenotype mapping and explain how a less direct mapping could allow evolution to generate more diverse images more quickly. [6 marks]

II.3   Multi-Agent Systems

Consider a case in which two students (Grace and Judy) live together in a

rented house. They need to agree on which Internet service to sign up for from their local cable company (Example Media Co.). Grace will sign the contract   with the cable company and pay for the service but she would like to also sign a side contract with Judy in which Judy agrees to pay her share.

a)  List and describe the social norms needed to characterize the interactions in this setting. Use the commitment-based notation to define the identified norms. [6 marks]

b)  Describe a scenario in which one of these norms is violated. State the relevant event sequence using the notation from your answer to part (a) above. Who is accountable for this norm violation? [3 marks]

c)   Grace and Judy graduate. Grace (who signed the contract with the cable

company) leaves the city. Judy finds a job in the same city and continues to stay in the same rented house. Judy takes over the contract with Example

Media Co. from Grace. Olivia and Alice join Judy as her new housemates.  Olivia and Alice sign side contracts with Judy to pay their shares of the cost for the Internet service.

Refine the initial normative specification and produce the new normative specification for the new setting. You should describe the required

commitment changes and then use (some of) the ASSIGN, CANCEL,

CREATE, DECLARE, DELEGATE and RELEASE commitment operations to define the required refinement process. [6 marks]