Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
METHODS OF ARTIFICIAL INTELLIGENCE WINTER TERM 2002/2003 KÜHNBERGER PROGRAMMING ASSIGNMENT 2 DEADLINE: 17.01.2003 Exercise 1 (CSP) Write a PROLOG program that solves the magic square puzzle for n = 5 using constraint satisfaction. Compare Exercise 1 of Assignment 4 for more information concerning the problem. (10 credits) Exercise 2 (Clauses) In the lecture, the transformation of predicate logic formulas into clauses was introduced. Write a PROLOG program that transforms a formula into clause form in the described eight steps: • • • • • • • • Remove implications Reduce scope of negation Skolemization Standardize variables Prenex-form CNF Eliminate conjunctions Eliminate universal quantifiers For an arbitrary predicate logic formula your program should give as output the clauses and the solutions for each single step in the transformation. (30 credits) Remark: It is recommended to use PROLOG as programming language. Other possibilities are functional languages like Scheme, Lisp, or ML. Java is not an optimal language for programming this task. If you want to program in Java please contact Bernd Pachur. He will provide a parser you can use for you solution. Date: 20.12.2002. 1