Once the scheduler has a compete schedule, it gets the score with evalSchedule, which just sums up the scores of the classes. The arguments to dpScheduler are the optimal schedule (a tuple of a list of classes and its score), the classes chosen so far, and how many classes are remaining to be chosen for the Fall 2011, Spring 2012, Fall 2012, and Spring 2013 semesters. I handle memoization with a dynamic predicate: :- dynamic(stored/6). The answers are correct, but the time spent is on the same order as the brute force algorithm. I'm having trouble getting my DP implementation to work on a nontrivial input. Currently, my database is around 60 classes, but I'd like the program to eventually be able to handle more. I'm trying to create a simple scheduler in Prolog that takes a bunch of courses along with the semesters they're offered and a user's ranking of the courses.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |