This project is a Genetic Algorithm-based timetable generator for schools. It ensures that subjects are assigned optimally based on weekly constraints while preventing subject repetition within a day.
- Generates optimal school timetables using genetic algorithms.
- Ensures each subject gets allocated as per weekly constraints.
- Assigns teachers to subjects.
- Displays a progress bar for real-time tracking.
- Supports mutation and crossover for optimized scheduling.
Ensure you have Python installed. Install dependencies using:
pip install tqdm
Run the script using:
python timetable_generator.py
Modify the weekly subject constraints and teacher assignments in the if __name__ == "__main__":
section to fit your needs.
- Subjects: Defined in
subjects
list. - Weekly Allocation: Defined in
weekly_constraints
dictionary. - Teachers: Defined in
teachers
dictionary. - Days & Periods: Defined in
days
andperiods_per_day
.
Monday: Bengali (RKM), Math (TS), English (DKD), History (SPB)...
Tuesday: Geography (NKS), Life Science (APD), Math (TS), Computer (SKB)...
...
- Modify subjects, teachers, and constraints in the script.
- Adjust mutation and crossover probabilities for different results.
This project is open-source and free to use.