CPSC 433: Artificial Intelligence - Assignment Search Problem - Input and Output Definition

Your system should read the input from which you will generate a search instance out of a text file, that contains a few key words and then describes the information as tables. Each line in the input file (that is not a key word line) is a row in such a table. The fields within such a row are separated by commata! The general scheme of the text file is as follows:

Name:
Example-name

Course slots:
Day, Start time, coursemax, coursemin

Lab slots:
Day, Start time, labmax, labmin

Courses:
Course Identifier 

Labs:
Lab Identifier

Not compatible:
Course Identifier, Course Identifier
Course Identifier, Lab Identifier
Lab Identifier, Lab Identifier

Unwanted:
Course Identifier, Slot day, Slot time
Lab Identifier, Slot day, Slot time

Preferences:
Slot day, Slot time, Course Identifier, Preference value
Slot day, Slot time, Lab Identifier, Preference value

Pair:
Course Identifier, Course Identifier
Course Identifier, Lab Identifier
Lab Identifier, Lab Identifier

Partial assignments:
Course Identifier, Slot day, Slot time
Lab Identifier, Slot day, Slot time

Naturally, this requires some additional explanations:

Some of the questions regarding input-files from previous years were: is the format static, i.e. do the key words occur in the given sequence, which is the case, what to do with additional blanks in inputs (your parser should filter them out) and what kind of GUI do I expect. For the later, I do not require much: I am already satisfied, if you start the system with command line parameters and regarding your output, see below. The command line parameters will mostly have to be concerned with the various parameters that deal with the soft constraints and essentially for the function Eval. I would like you to define Eval using four subfunctions Evalminfilled, Evalpref, Evalpair and Evalsecdiff that are producing a value for each of the 4 types of soft constraints. Then we have
    Eval(assign) = Evalminfilled(assign) * wminfilled + Evalpref(assign) * wpref + Evalpair * wpair + Evalsecdiff(assign) * wsecdiff
with wminfilled, wpref, wpair and wsecdiff being weights that tell the system how important the different soft constraints are. Note that I will have examples that require as values for these weights a 0!

The following is a short example input file that your parser should be able to parse without error:

Name:
ShortExample

Course slots:
MO, 8:00, 3, 2
MO,9:00,3,2
TU, 9:30, 2,  1

Lab slots:
MO, 8:00, 4, 2
TU, 10:00,2,1
FR, 10:00, 2, 1

Courses:
CPSC 433 LEC 01
CPSC 433 LEC 02
SENG 311  LEC  01
CPSC 567 LEC 01

Labs:
CPSC 433 LEC 01 TUT 01
CPSC 433 LEC  02 LAB   02
SENG 311 LEC 01 TUT 01
CPSC 567 TUT 01

Not compatible:
CPSC 433 LEC 01 TUT 01, CPSC 433 LEC 02 LAB 02
CPSC 567 LEC 01, CPSC 433 LEC 01
CPSC 567 LEC 01, CPSC 433 LEC 02
CPSC 567 TUT 01, CPSC 433 LEC 02
CPSC 433 LEC 01, CPSC 567 TUT 01

Unwanted:
CPSC 433 LEC 01, MO, 8:00

Preferences:
TU, 9:00, CPSC 433 LEC 01, 10
MO, 8:00, CPSC 433 LEC 01 TUT 01, 3
TU, 9:00, CPSC 433 LEC 02, 10
TU, 10:00, CPSC 433 LEC 01 LAB 01, 5
MO, 8:00, CPSC 433 LEC 02 LAB 02, 1
MO, 10:00, CPSC 433 LEC 02 LAB 02, 7

Pair:
SENG 311 LEC 01, CPSC 567  LEC    01

Partial assignments:
SENG 311 LEC 01, MO, 8:00
SENG 311 LEC 01 TUT 01, FR, 10:00

As output from your system I expect an assignment presented in the following form and also the Eval-value that your system assigns to the assignment. There are several ways how we could output an assignment, but I prefer it ordered by courses. This means that we order the courses alphabetically, add after each course the labs/tutorials for the course (also alphabetically) and then output the assigned days and times for the courses in this order. Here is an example:

Eval-value: 30
CPSC 433 LEC 01             : MO, 10:00
CPSC 433 LEC 01 TUT 01      : TU, 10:00
CPSC 433 LEC 02             : MO, 14:00
CPSC 433 LEC 02 LAB 02      : MO,  8:00
CPSC 567 LEC 01             : TU,  9:30
CPSC 567 TUT 01             : MO,  8:00
SENG 311 LEC 01             : MO,  8:00
SENG 311 LEC 01 TUT 01      : FR, 10:00