-
Notifications
You must be signed in to change notification settings - Fork 3
Schedule Algo Design
Ryan WU edited this page Dec 5, 2023
·
3 revisions
Naive Algorithm for Course Scheduling
- Input: Courses and preferences.
- Process:
- Generate all possible combinations of elective courses.
- For each combination, enumerate every possible section arrangement.
- Assess each potential schedule based on the given preferences.
- Output: The schedule that attains the highest preference score.
Enhanced Algorithm for Optimized Course Scheduling
- Input: Courses and preferences.
- Process:
- Enumerate all combinations of elective courses.
- Innovatively search through potential schedules:
- Prioritize sections using heuristic methods, such as selecting single-section classes first.
- Implement various pruning techniques:
- Partially evaluate schedules even if not all sections are finalized.
- Discontinue search if hard preferences are breached.
- Halt if no further potential schedule can surpass the current highest score.
- Output: The most optimal schedule based on preference scoring.
Advanced Algorithm with Heuristics and Coroutines
- Input: Courses and preferences.
- Initial Steps:
- Make random course and section selections to establish a baseline score for schedules, aiding in efficient pruning.
- Combine each elective with mandatory courses and rank them in descending order based on scores to prioritize higher scoring schedules.
- Process:
- Systematically enumerate course combinations, employing coroutines for efficient processing.
- Conduct a detailed search through potential schedules:
- Apply heuristic ordering for section selection.
- Utilize advanced pruning strategies:
- Continuously evaluate schedules, even if incomplete.
- Order potential combinations by descending score for earlier discovery of higher-scoring schedules.
- Cease searching if hard preferences are not met or if no better schedule can be derived.
- Output: The highest-scoring, preference-aligned schedule.
On the same set of some intensive input, here are the performances:
- Naive: 300s+
- Enhanced: ~25s
- Advanced: ~2s