CS 371 - Introduction to Artificial Intelligence
Homework #3 |
1. The Channel Routing Problem (CRP):
2. Scheduling Problem: Apply simulated annealing to the following problem: Given a number of students wishing to take a number of classes which can be assigned to a number of time slots, assign classes to time slots in such a way as to minimize schedule conflicts. You will create a class SchedulingProblem which implements Annealable. Its constructor will take a number of students, the number of classes a student takes, a number of classes offered, and a number of time slots (e.g. 240 students with 5 classes each, 100 classes offered, 12 time slots). Each randomly generated instance of the problem will associate each student with the given number of different random classes. Each class will be associated with a random time slot. For the purposes of the Annealable interface, next causes a class to be randomly reassigned to a different time slot. Energy is the sum of the student conflicts. The number of conflicts for a student is the number of their classes they cannot attend given the current schedule. (For the example above, if all of a student's classes are scheduled at the same time, the student has 4 conflicts.)
With parameters that generate problems which will likely not have a zero-conflict schedule, demonstrate the performance of simulated annealing versus iterative improvement with only downhill steps.