Assignment 5: Prolog and Predicate Logic | |
CSE 415: Introduction to Artificial Intelligence The University of Washington, Seattle, Winter 2005 | |
Write a Prolog program that answers queries about class and
classroom scheduling, as described below.
Due Tuesday, February 22, at 11:30 AM. A paper submission is due on Wednesday, February 23 in class as well (see Part B).
Turn in your source code by 11:30 using the
turnin server.
| |
Prolog Queries (100 points)
Create a Prolog program that maintains information about classes, classroom facilities and scheduling. You are handling class and classroom scheduling for the University of Washington. Thankfully, it's a rather large task, so your task will be limited to handling a handful of CSE classes, which all occur at the same time. However, you also get to assign to professors the classes they will teach. There are six rooms you must concern yourself with:
Part A. (50 points) Write a Prolog program that describes all of the constraints above as Horn clauses. Your program should have a well-designed structure and provide adequate representation of all the relevant entities and qualities mentioned. Call your program classes.pro. Part B. (20 points) Write Prolog queries to answer the following questions, and save a transcript of the results in a file called class-queries. Print this file out and hand it in in class the Wednesday after the turnin is due.
Part C. (30 points) Add another course and another interesting/relevant constraint to the above scenario. Write this in another file, myclass.pro. Think of three queries whose results are somehow affected by the presence of this new course and constraint, and perform them as well. Transcribe the results and append them to the results file you created in Part B.
| |
Questions and answers.:
Q: Can a small class be taught in a larger room? A: Yes. The order of room sizes is small, medium, large, and huge. Classes of size X may be taught in rooms of size X or larger. |