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

CS2IAI Introduction to Artificial Intelligence

Answer ALL questions

1.  In the context of AI, explain what is meant by the Turing test. Mention two capabilities required by a machine to pass the test. (4 marks)

2.  The use of artificial intelligence (AI) in medical image processing has played a     significant role in improving the computer aided diagnostic systems. A medical     image processing agent uses AI technology to extract relevant information from the image by highlighting some parts of the image that have biological relevance.

a.  Perform a PEAS analysis (i. e. Performance, Environment, Actuators,        Sensors) for the medical image processing intelligent agent? Name one item for each of the PEAS elements. (8 marks)

b.  Describe the agent’s (i.e., medical image processing) environment, it is Observable? Deterministic? Episodic? provide a justification of each description. (6 marks)

c.  Compare between Reflex Agents and Model-based agent? Which one requires full environment observability(6 marks)

3.  Consider the following map showing several towns and all roads between them together with their lengths in miles. An intelligent agent would like to travel from

city A to city M.

(START)

A

36

B

61

31

M     (END)

I

J

45

 

Use the following cost functions:

g(n) = Distances between cities in miles (shown on map).

h(n) = The straight-line distances between any city and city M. These distances are given in the table below.

M

0

a.  Provide a complete problem formulation for the travel problem using the five components required for problem formulation in AI. (10 marks)

b.  Your problem formulation should be abstracted from the real world, with          reference to the definition of abstraction, list ONE abstraction that was used in the above problem. (4 marks)

c.  Simulate how a computer would search for a path from city A to city M using the A* Algorithm. Show the path (i.e., the order in which the nodes were        explored), the search tree as well as the total cost that would be produced.  If there are any ties, assume alphabetical tiebreaking (i.e., nodes for states    earlier in the alphabet are expanded first in the case of ties). (11 marks)

4.  A real estate company requested an AI expert to design a machine learning model that can predict house prices. The company has gathered a large  dataset of previously sold houses alongside their description.

a.  What is the learning method that the AI expert would use in order to solve this problem, i.e., supervised learning or unsupervised learning? Justify your     answer? (4 marks)

b.  What is meant by feature selection in machine learning? Suggest three relevant features (predictive variable) that are significant in predicting the house price. (5 marks)

c.  Machine learning is subject to problems with overfitting, k-fold cross           validation is one key technique to prevent this problem. Explain briefly what overfitting is, and how k-fold cross validation works. (6 marks)

5.  Below is a diagram of a single artificial neuron (unit) with three inputs x  = (x1, x2, x3 ) that receive only binary signals (x1, x2, x3  ∈ {0,1}).

 

a.  How many different input patterns can this node receive? Give a formula that computes the number of binary input patterns for a given number of   inputs u? (4 marks)

b.  Suppose that the weights corresponding to the three inputs have the following values:

从1  = 2, 从2  = −4, 从3  = 1

and the activation of the unit is given by the step-function:

(a) = { 1,

if a ≥ 0

otherwise

Calculate what will be the output value y of the unit for each of the following input patterns P1-P4.

 

(4 marks)

c.  What should be the weights 从1, 从2, 从3  to implement the logical OR function of three variables x1 , x2 , x3 ? Logical OR function returns 1 (i.e., true) when at      least one of the arguments is 1. (4 marks)

6.  Lisp Programming questions:

a.  The (cl-defstruct NAME SLOTS...) is a lisp macro in Emacs that defines a new structure type NAME with the specified slots. Use this command to         define a structure type called Book that contains three slots Title,                   PublicationYear and Publisher(3 marks)

b.  set a suitable default value for each slot  to be used when that slot’s value is not specified. (3 marks)

c.  What is the output of the following Lisp command?

(cdr (cons 'alfa 'beta)) (2 marks)

d.  Write a recursive function in lisp to calculate the factorial value of an

integer n. To find the factorial of integer n, multiply n with the factorial value of the previous number (n-1). For example, factorial (5) will be evaluated as        (5*4*3*2*1), which evaluates to 120. Note that the factorial function calls itself recursively until it reaches the base case (i.e., in this case 1). (4 marks)

7.  Consider the following Python code

from sklearn.neighbors import KNeighborsClassifier import pandas as pd

data = {'Column1': [11, 12, 13],

'Column2': [21, 22, 23],

'Column3': [31, 32, 33]}

df = pd.DataFrame(data)

knn = KNeighborsClassifier()

# rest of the code has been omitted

a.  What is pandas, and how it is being used in the above code? (4 marks)

b.  Using the data frame df, call a Python function that will return the top 3 rows of the data frame df (2 marks)

c.  Using the data frame df, call a Python function that will return a statistical  summary of the data frame df (e.g. for each column: count, mean, median, minimum, maximum ..etc). (2 marks)

d.  What is sklearn, and how it is being used in the above code? (4 marks)