


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Your answers to all the questions in this assignment should be stored in a single file called CLExOne.txt which has your name and matriculation.
Typology: Study Guides, Projects, Research
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Out on Friday 1st October 2004, due noon Friday 15th October 2004
Your answers to all the questions in this assignment should be stored in a single file called CLExOne.txt which has your name and matriculation number on the first line. If you use different files when working on this assessment then integrate them into CLExOne.txt before submission. Submit CLExOne.txt before the deadline using the following command: Shell> submit inf1 inf1a cl1 CLExOne.txt You may discuss this assignment with other students but your submission should be based on your own work. If you do include work carried out in collaboration with others you must properly attribute any contributions that they made to the work. Keep in mind that you are responsible for deriving educational value from your assignments.
In this exercise you will use a simple proof system. It is written in the Prolog programming language which you do not learn in this course, although we will mention it in a few weeks time. Prolog programs are run by providing goals for the system to solve, so when you are asked to “give a goal” to Prolog that means to type in an expression for Prolog to attempt to solve. Prolog then comes back with a yes (plus perhaps some values for variables) if it finds a solution or answers no if it cannot find a solution. You then press carriage return before giving further goals.
First copy the code for the proof system to the file prover.pl in your own directory by going to the Informatics 1 Computation and Logic Web page and downloading the file from the link on that page labeled “Prover for Assessed Exercise 1” (ask a demonstrator if you don’t know how to download a file from a Web page). You do not need to look at the contents of this file.
To start the proof system do the following:
Now try your first proof with this system. This will be the proof that the proposition b follows from the assumptions [a, a → b]. Give the following goal (by typing it in as given below). Rember the full stop and carriage return.
prove([a, a ---> b], b).
You should get the reply yes, meaning that this is provable. Had it not been provable the answer would have been no.
The table below shows the correspondence between the notation you use in the Prolog prover and the notation given in the lecture notes.
Lecture notes Prover F ` A prove(F, A) A and B A and B A or B A or B A → B A ---> B not(A) not(A)
(a) [a(1), a(X) → b(X)] b(Y ) (b) [a(1), a(2), b(2), a(X) and b(X) → c(X)]
c(Y ) (c) [r(a, b), r(b, c), r(c, d), r(X, Y ) → p(X, Y ), p(A, B) and r(B, C) → p(A, C)] ` p(a, d)
file to a new file and replace the third expression with one or more new axioms that provide a more sophisticated move strategy. It should be pos- sible for you to devise a strategy that guarantees that the starting player will not be beaten. You may find useful the additional (supplied) predi- cate completes_row(P, G, S) which is true when player P can in the next move complete three marks on a row, column or diagonal in board state G.