A.I. (Prolog – Constraint Satisfaction Problems)

A.I. (Prolog – Constraint Satisfaction Problems)

Please set me up with a mentor who is familiar with the subject Artificial Intelligence. My assignment deals with Prolog programming (CSPs). I have attached the materials in the link below with the requirements pdf included in the A3.zip file. All the contents of the problem are to be kept strictly confidential. In the instructions it asks about what was mentioned in class, so I will provide this upon request.

Document Preview:

a3 q&a.url
a3.pdf
Artificial Intelligence -Assignment 3 YOU SHOULD NOT USE ”;” , ”!” AND ”–>” IN YOUR PROLOG RULES. This assignment will exercise what you have learned about constraint satisfaction problems (CSPs). In the following questions, you will be using Prolog to solve such problems, as we did in class. For each of the questions below, you should create a separate file containing rules for the solve predicate and any other predicates you might need. Note that it is your programs that have to solve each of the problems in this assignment, not you! You lose marks, if you attempt to solve a problem (or any part of the problem) yourself, and then hack a program that simply prints a solution. All work related to solving a problem should be done by your Prolog program, not by you.
1 (40 points). Use Prolog to solve the following crypt-arithmetic puzzle involving multiplication and addition: G E T * B Y ———B A B E + G E T ———–B E A R E In other words, Y*GET = BABE, BABE+GET*10 = BEARE. Assume that each letter stands for a distinct digit and that leading digits are not zeroes (do not try to guess them yourself!). First, you can try to solve this problem using pure generate and test technique, without any interleaving, and notice how much time it takes. (Warning: it can take several minutes depending on your computer.) Determine how much computer time your computation takes using the following query: ?-X is cputime, , Y is cputime, Z is Y -X. The value of Z will be the time taken. Keep this “pure generate and test” version of your program in the file puzzle1.pl You lose marks if you do not provide a working version of this program. Next, solve this problem using smart interleaving of generate and test approach, as discussed in class. Keep this program in the file puzzle2.pl and make sure that the TA can compile this file, and run this program using either the main predicate solve(L) or print_solution(List). Write comments in your program…

Attachments: