CS26520 – Artificial Intelligence Assignment
Myra Wilson – mxw
Release: Monday 17th Feb Submission: Friday 13th March at 13.00 Feedback: Friday 3rd April
Submission – Deadline 1pm Friday 13th March
This assignment on Knowledge Representation, Logic and Prolog will form 40% of the total marks for the module CS26520. This assignment will be marked out of 40.
Submit the assessment writeup in pdf format. Code segments and trace output should be included in the pdf report, not submitted separately. This should be submitted via Turnitin by 1pm on Friday 13th March. Multiple attempts will be allowed, but only the final submission will be assessed. If your account is locked at the time of submission, you should use an alternative email account and email a copy of your pdf file to Myra Wilson (mxw) by the time of the submission. This is an individual assignment and MUST be completed as a one-person effort by the student submitting the work (see Unacceptable Academic Practice in the student handbook) .
Part 1: Logics
1. The following two logic statements are given: (A ⇒ B) ⇒ C
(A ∧ ¬B) ∨ C
(a) Using a truth table for each statement, show that the two statements are equivalent.
[4 marks out of 40]
(b) Show that the two statements are equivalent using propositional logic. Clearly state which logical equivalences you are using at each stage during the evaluation. [4 marks out of 40]
2. The following are English statements:
1) Misty is a large dog.
2) Sausages are food.
3) If something can be carried, then someone will certainly steal it.
4) Large dogs can carry food.
(a) Translate the English statements into syntactically correct first order logic statements. [6 marks out of 40]
(b) Using first order logic, prove Misty stole the sausages, stating where you have made instantiations. [4 marks out of 40]
1
Part 2: Prolog
This section or the assignment will look at using Prolog to process facts using rules to generate new knowledge.
1. Write a set of Prolog facts (at least 10). e.g. parent(fred,bert). You should use at least 3 different function names. [4 marks out of 40]
2. Write a set of 3 prolog rules which use the above facts to generate new knowledge, e.g. sister(X,Y):- parent(Z.X),parent(Z,Y),female(X). One of your rules must use recursion, e.g. see the predecessor rule from the lectures for a recursive example. [10 marks out of 40]
3. Explain in detail how your recursive function works. Use the inbuilt “trace” Prolog function to help you explain. [8 marks out of 40]
No marks will be awarded for the re-use of examples from lectures
2