SlideShare a Scribd company logo
Class Schedule Using a Genetic
Algorithm
Presented by: Engr. Farhan Ghafoor
Engr. Ghulam Qasim
Abstract
 Time Table Scheduling is an NP-hard problem and hence
polynomial time verifiable using genetic algorithms.
 It a typical scheduling problem that appears to be a tedious
job in every academic institute once or twice a year.
 In earlier days, time table scheduling was done manually
with a single person or some group involved in task of
scheduling it manually, which takes a lot of effort and time.
Planning timetables is one of the most complex and error-
prone applications.
 Furthermore, Timetabling is the task of creating a timetable
while satisfying some constraints.
 There are basically two types of constraints, soft constraints
and hard constraints.
Abstract
 Soft constraints are those if we violate them in scheduling, the
output is still valid, but hard constraints are those which if we
violate them; the timetable is no longer valid.
 The search space of a timetabling problem is too vast, many
solutions exist in the search space and few of them are not
feasible.
 Feasible solutions here mean those which do not violate hard
constraints and as well try to satisfy soft constraints.
 We need to choose the most appropriate one from feasible
solutions.
 Most appropriate ones here mean those which do not violate soft
constraints to a greater extent.
 In this project hard-constraints have been taken care of strictly
and it has been ensured that soft-constraints are as well followed
as much as possible.
Introduction
 Making a class schedule is one of those NP hard
problems.
 The problem can be solved using a heuristic search
algorithm to find the optimal solution, but it only works
for simple cases.
 For more complex inputs and requirements, finding a
considerably good solution can take a while, or it may be
impossible.
 This is where genetic algorithms come in to the game to
solve the impossible problem and to make possible.
Background
 When you make a class schedule, you must take into
consideration many requirements as follows:
Number of professors
No of students
No of classes and classrooms
Size of classroom
Laboratory equipment in the classroom
And many others etc.
 These requirements can be divided into several groups
by their importance.
Background
 Hard requirements (if you break one of these, then the
schedule is infeasible):
A class can be placed only in a spare classroom.
No professor or student group can have more then
one class at a time.
A classroom must have enough seats to accommodate
all students.
To place a class in a classroom, the classroom must
have laboratory equipment (computers, in our case) if
the class requires it.
Background
 Some soft requirements (can be broken, but the
schedule is still feasible):
Preferred time of class by professors.
Preferred classroom by professors.
Distribution (in time or space) of classes for student
groups or professors.
 Hard and soft requirements, of course, depend on the
situation.
Objects of Class Schedule
 Professor
The Professor class has an ID and the name of the
professor. It also contains a list of classes that a
professor teaches.
 Students Group
The StudentsGroup class has an ID and the name of
the student group, as well as the number of students
(size of group). It also contains a list of classes that the
group attends.
 .
The Genetic Algorithm
• Step-1. Test each chromosome to see how good it is at solving the
problem at hand and assign a Fitness Score accordingly. The fitness
score is a measure of how good that chromosome is at solving the
problem to hand.
• Step-2. Select two members from the current population. The
chance of being selected is proportional to the chromosomes
fitness. Roulette Wheel Selection is a commonly used method.
• Step-3. Dependent on the Crossover rate crossover the bits from
each chosen chromosome at a randomly chosen point.
• Step-4. Step through the chosen chromosomes bits and flip
dependent on the Mutation rate.
• Step-5. Repeat step 2, 3, 4 until a new population of N members
has been created.
• Step-6. Keep repeating until required fitness is achieved.
Objects of Class Schedule
 Classroom
The Room class has an ID and the name of the
classroom, as well as the number of seats and
information about equipment (computers). If the
classroom has computers, it is expected that there is a
computer for each seat. IDs are generated internally
and automatically.
 Course
The Course class has an ID and the name of the
course.
Objects of Class Schedule
 Class
CourseClass holds a reference to the course to which
the class belongs, a reference to the professor who
teaches, and a list of student groups that attend the
class. It also stores how many seats (sum of student
groups' sizes) are needed in the classroom, if the class
requires computers in the classroom, and the duration
of the class (in hours).
Algorithm
i. First of all an initial generation of chromosomes is created randomly and their
fitness value is analyzed.
ii. ii. New Generations are created after this. For each generation, it performs
following basic operations:
a. First of all preserve few fittest chromosomes from the previous
generation as it is. This is called Elitism and is necessary to preserve
desired characteristics in the coming generations.
b. Randomly select a pair of chromosomes from the previous generation.
Roulette wheel selection method has been used here in this project.
c. Perform crossover depending on the crossover rate which is pretty high
usually. Here single point crossover has been used.
d. Perform mutation on the more fit chromosome so obtained depending
on the mutation rate which is kept pretty small usually.
iii. Now analyze the fitness of the new generation of chromosomes and order
them according to fitness values.
iv. Repeat creating new generations unless chromosomes of desired fitness
value i.e. fitness=1, are obtained.
Chromosome
 The first thing we should consider when we deal with
a genetic algorithm is how to represent our solution
in such a way that it is feasible for genetic
operations such as crossover and mutation.
 Also, we should know how to specify how good our
solution is. In other words, we should be able to
calculate the fitness value of our solution.
Representation
Chromosome Representation
Chromosomes are represented by the Schedule class, and it
stores the representation of a class schedule in these two
attributes:
Chromosome Representation
Additionally, the chromosome should store its fitness value
and the parameters which are used by genetic operations.
The fitness value is stored as follows:
Chromosome Representation
Chromosome parameters are declared as follows:
Fitness Function
 Now we need to assign a fitness value to the
chromosome.
 For only hard requirements is done firstly to calculate the
fitness of a class schedule.
Each class can have 0 to 5 points.
If a class uses a spare classroom, we increment its
score.
If a class requires computers and it is located in the
classroom with them, or it doesn't require them, we
increment the score of the class.
Fitness Function
 Now we need to assign a fitness value to the chromosome.
 For only hard requirements is done firstly to calculate the
fitness of a class schedule.
If a class is located in a classroom with enough available
seats, we increment its score.
If a professor has no other classes at the time, we
increment the class's score once again.
The last thing that we check is if any of the student
groups that attend the class has any other class at the
same time, and if they don't, we increment the score of
the class.
Fitness Function
 Now we need to assign a fitness value to the
chromosome.
 For only hard requirements is done firstly to calculate the
fitness of a class schedule.
If a class breaks a rule at any time-space slot that it
occupies, its score is not incremented for that rule.
The total score of a class schedule is the sum of points
of all classes.
The fitness value is calculated as
 schedule_score / maximum_score and
 maximum_score is number_of_classes*5.
Note: The fitness values are represented by single-precision floating point numbers (float) in the range 0 to 1.
Crossover
 A crossover operation combines data in the hash
maps of two parents, and then it creates a vector of
slots according to the content of the new hash map.
 A crossover 'splits' hash maps of both parents in
parts of random size.
 The number of parts is defined by the number of
crossover points (plus one) in the chromosome's
parameters.
 Then, it alternately copies parts form parents to the
new chromosome, and forms a new vector of slots.
Crossover
Crossover
Mutation
 A mutation operation is very simple.
 It just takes a class randomly and moves it to another
randomly chosen slot.
 The number of classes which are going to be moved in a
single operation is defined by the mutation size in the
chromosome's parameters.
Visual C++
// Performs mutation on chromosome
void Mutation();
Program Flow to Search
 The genetic algorithm is fairly simple. For each generation, it performs
two basic operations:
 Randomly selects N pairs of parents from the current population and
produces N new chromosomes by performing a crossover operation
on the pair of parents.
 Randomly selects N chromosomes from the current population and
replaces them with new ones. The algorithm doesn't select
chromosomes for replacement if it is among the best chromosomes
in the population.
 And, these two operations are repeated until the best chromosome
reaches a fitness value equal to 1 (meaning that all classes in the
schedule meet the requirement).
 As mentioned before, the genetic algorithm keeps track of the M best
chromosomes in the population, and guarantees that they are not going
to be replaced while they are among the best chromosomes.
Results
Results
Results
Results
Conclusion
 The process of Time Table generation has been fully
automated with this software.
 This application can now cater to multiple colleges,
universities which can rely on it for their Time Table
scheduling which earlier had to be done by hand.
Evaluation
 Using Genetics Algorithm, a number of trade-off
solutions, in terms of multiple objectives of the
problem, could be obtained very easily.
 Moreover, each of the obtained solutions has been
found much better than a manually prepared
solution which is in use.
Further Work
 Though this application serves as a basic time table generator,
there is a lot more which could be done to make this project
even better in terms of consideration of soft constraints like
professor giving preference to particular class.
 The up-gradations I look up to currently will be Classroom size
considerations, lab facility consideration and multiple subject
selection for faculty. I will try to bring the following up-
gradations very soon.
 More features such as schedule print for individual faculty etc.
would also be involved to make this more useful as a final
product.
 I will try to link our project to generate time table of
departments of CoE (Avionics, Electrical, Mechatronics and
Software Engineering)
Q&A
Thank You
Slide Title
• Make Effective Presentations
• Using Awesome Backgrounds
• Engage your Audience
• Capture Audience Attention
https://www.codeproject.com/Articles/23111/
Making-a-Class-Schedule-Using-a-Genetic-
Algorithm
Class Scheduling using Generative AI.pptx
Class Scheduling using Generative AI.pptx
Class Scheduling using Generative AI.pptx
Slide Title
Product A
• Feature 1
• Feature 2
• Feature 3
Product B
• Feature 1
• Feature 2
• Feature 3

More Related Content

Similar to Class Scheduling using Generative AI.pptx (20)

PDF
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
ijfcstjournal
 
PDF
Machine learning
business Corporate
 
DOC
Pso notes
Darshan Sharma
 
PDF
Genetic Algorithms in Artificial Intelligence
ritwijkp2
 
PDF
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
IOSR Journals
 
PDF
M017127578
IOSR Journals
 
PPTX
Time Table Management system
Shaswat Lovee
 
PPTX
Genetic algorithms in Data Mining
Atul Khanna
 
PDF
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
PPTX
Genetic Algorithm 2 -.pptx
TAHANMKH
 
PPTX
Particle swarm optimization (PSO) ppt presentation
LatestShorts
 
PPT
Genetic algorithm
garima931
 
PPT
AI_PPT_Genetic-Algorithms.ppt
HotTea
 
PPT
Genetic-Algorithms.ppt
Nipun85
 
PPT
Genetic-Algorithms-computersciencepptnew.ppt
Fitnessfreaksfam
 
PPT
Genetic-Algorithms for machine learning and ai.ppt
neelamsanjeevkumar
 
PPT
Genetic-Algorithms.ppt
ssuser2e437f
 
PPT
Genetic-Algorithms forv artificial .ppt
neelamsanjeevkumar
 
PDF
CI_L02_Optimization_ag2_eng.pdf
SantiagoGarridoBulln
 
PDF
Scheduling Courses Using Genetic Algorithms
Universitas Pembangunan Panca Budi
 
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
ijfcstjournal
 
Machine learning
business Corporate
 
Pso notes
Darshan Sharma
 
Genetic Algorithms in Artificial Intelligence
ritwijkp2
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
IOSR Journals
 
M017127578
IOSR Journals
 
Time Table Management system
Shaswat Lovee
 
Genetic algorithms in Data Mining
Atul Khanna
 
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
Genetic Algorithm 2 -.pptx
TAHANMKH
 
Particle swarm optimization (PSO) ppt presentation
LatestShorts
 
Genetic algorithm
garima931
 
AI_PPT_Genetic-Algorithms.ppt
HotTea
 
Genetic-Algorithms.ppt
Nipun85
 
Genetic-Algorithms-computersciencepptnew.ppt
Fitnessfreaksfam
 
Genetic-Algorithms for machine learning and ai.ppt
neelamsanjeevkumar
 
Genetic-Algorithms.ppt
ssuser2e437f
 
Genetic-Algorithms forv artificial .ppt
neelamsanjeevkumar
 
CI_L02_Optimization_ag2_eng.pdf
SantiagoGarridoBulln
 
Scheduling Courses Using Genetic Algorithms
Universitas Pembangunan Panca Budi
 

More from FarhanGhafoor7 (15)

PPTX
603848771-Lecture-1-Intro-to-Flutter-and-Dart.pptx
FarhanGhafoor7
 
PPT
eyeryeryeryeryeyeyeryeryyerye13872085.ppt
FarhanGhafoor7
 
PPT
Lecture-21a discrete structure and mathematics.ppt
FarhanGhafoor7
 
PPT
Lecture-20a discrete structure and mathematics.ppt
FarhanGhafoor7
 
PPT
Lecture-Discrete Structure and discrete Mathematics.ppt
FarhanGhafoor7
 
PPTX
Week 3-LectureA Object Oriented Programmings.pptx
FarhanGhafoor7
 
PPT
Programming Fundamentals - Lecture 1.ppt
FarhanGhafoor7
 
PPT
CCN - Lecture2 Cyber Security and Cryptology.ppt
FarhanGhafoor7
 
PPTX
ESD Lecture introduction to embedded systems -3.pptx
FarhanGhafoor7
 
PPTX
Android - Intents and Filters hgfh gfh.pptx
FarhanGhafoor7
 
PPTX
Lecture -Introduction to Flutter and Dart.pptx
FarhanGhafoor7
 
PPT
Assambly Language and Data Communication with Cell Phone
FarhanGhafoor7
 
PPT
Wireless Communication and Cellular Communication
FarhanGhafoor7
 
PPT
Fiber Optical Networks and Data Communication
FarhanGhafoor7
 
PPTX
Wired LANS - Ethernet and Computer Local Area Networks
FarhanGhafoor7
 
603848771-Lecture-1-Intro-to-Flutter-and-Dart.pptx
FarhanGhafoor7
 
eyeryeryeryeryeyeyeryeryyerye13872085.ppt
FarhanGhafoor7
 
Lecture-21a discrete structure and mathematics.ppt
FarhanGhafoor7
 
Lecture-20a discrete structure and mathematics.ppt
FarhanGhafoor7
 
Lecture-Discrete Structure and discrete Mathematics.ppt
FarhanGhafoor7
 
Week 3-LectureA Object Oriented Programmings.pptx
FarhanGhafoor7
 
Programming Fundamentals - Lecture 1.ppt
FarhanGhafoor7
 
CCN - Lecture2 Cyber Security and Cryptology.ppt
FarhanGhafoor7
 
ESD Lecture introduction to embedded systems -3.pptx
FarhanGhafoor7
 
Android - Intents and Filters hgfh gfh.pptx
FarhanGhafoor7
 
Lecture -Introduction to Flutter and Dart.pptx
FarhanGhafoor7
 
Assambly Language and Data Communication with Cell Phone
FarhanGhafoor7
 
Wireless Communication and Cellular Communication
FarhanGhafoor7
 
Fiber Optical Networks and Data Communication
FarhanGhafoor7
 
Wired LANS - Ethernet and Computer Local Area Networks
FarhanGhafoor7
 
Ad

Recently uploaded (20)

PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Dimensions of Societal Planning in Commonism
StefanMz
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Ad

Class Scheduling using Generative AI.pptx

  • 1. Class Schedule Using a Genetic Algorithm Presented by: Engr. Farhan Ghafoor Engr. Ghulam Qasim
  • 2. Abstract  Time Table Scheduling is an NP-hard problem and hence polynomial time verifiable using genetic algorithms.  It a typical scheduling problem that appears to be a tedious job in every academic institute once or twice a year.  In earlier days, time table scheduling was done manually with a single person or some group involved in task of scheduling it manually, which takes a lot of effort and time. Planning timetables is one of the most complex and error- prone applications.  Furthermore, Timetabling is the task of creating a timetable while satisfying some constraints.  There are basically two types of constraints, soft constraints and hard constraints.
  • 3. Abstract  Soft constraints are those if we violate them in scheduling, the output is still valid, but hard constraints are those which if we violate them; the timetable is no longer valid.  The search space of a timetabling problem is too vast, many solutions exist in the search space and few of them are not feasible.  Feasible solutions here mean those which do not violate hard constraints and as well try to satisfy soft constraints.  We need to choose the most appropriate one from feasible solutions.  Most appropriate ones here mean those which do not violate soft constraints to a greater extent.  In this project hard-constraints have been taken care of strictly and it has been ensured that soft-constraints are as well followed as much as possible.
  • 4. Introduction  Making a class schedule is one of those NP hard problems.  The problem can be solved using a heuristic search algorithm to find the optimal solution, but it only works for simple cases.  For more complex inputs and requirements, finding a considerably good solution can take a while, or it may be impossible.  This is where genetic algorithms come in to the game to solve the impossible problem and to make possible.
  • 5. Background  When you make a class schedule, you must take into consideration many requirements as follows: Number of professors No of students No of classes and classrooms Size of classroom Laboratory equipment in the classroom And many others etc.  These requirements can be divided into several groups by their importance.
  • 6. Background  Hard requirements (if you break one of these, then the schedule is infeasible): A class can be placed only in a spare classroom. No professor or student group can have more then one class at a time. A classroom must have enough seats to accommodate all students. To place a class in a classroom, the classroom must have laboratory equipment (computers, in our case) if the class requires it.
  • 7. Background  Some soft requirements (can be broken, but the schedule is still feasible): Preferred time of class by professors. Preferred classroom by professors. Distribution (in time or space) of classes for student groups or professors.  Hard and soft requirements, of course, depend on the situation.
  • 8. Objects of Class Schedule  Professor The Professor class has an ID and the name of the professor. It also contains a list of classes that a professor teaches.  Students Group The StudentsGroup class has an ID and the name of the student group, as well as the number of students (size of group). It also contains a list of classes that the group attends.  .
  • 9. The Genetic Algorithm • Step-1. Test each chromosome to see how good it is at solving the problem at hand and assign a Fitness Score accordingly. The fitness score is a measure of how good that chromosome is at solving the problem to hand. • Step-2. Select two members from the current population. The chance of being selected is proportional to the chromosomes fitness. Roulette Wheel Selection is a commonly used method. • Step-3. Dependent on the Crossover rate crossover the bits from each chosen chromosome at a randomly chosen point. • Step-4. Step through the chosen chromosomes bits and flip dependent on the Mutation rate. • Step-5. Repeat step 2, 3, 4 until a new population of N members has been created. • Step-6. Keep repeating until required fitness is achieved.
  • 10. Objects of Class Schedule  Classroom The Room class has an ID and the name of the classroom, as well as the number of seats and information about equipment (computers). If the classroom has computers, it is expected that there is a computer for each seat. IDs are generated internally and automatically.  Course The Course class has an ID and the name of the course.
  • 11. Objects of Class Schedule  Class CourseClass holds a reference to the course to which the class belongs, a reference to the professor who teaches, and a list of student groups that attend the class. It also stores how many seats (sum of student groups' sizes) are needed in the classroom, if the class requires computers in the classroom, and the duration of the class (in hours).
  • 12. Algorithm i. First of all an initial generation of chromosomes is created randomly and their fitness value is analyzed. ii. ii. New Generations are created after this. For each generation, it performs following basic operations: a. First of all preserve few fittest chromosomes from the previous generation as it is. This is called Elitism and is necessary to preserve desired characteristics in the coming generations. b. Randomly select a pair of chromosomes from the previous generation. Roulette wheel selection method has been used here in this project. c. Perform crossover depending on the crossover rate which is pretty high usually. Here single point crossover has been used. d. Perform mutation on the more fit chromosome so obtained depending on the mutation rate which is kept pretty small usually. iii. Now analyze the fitness of the new generation of chromosomes and order them according to fitness values. iv. Repeat creating new generations unless chromosomes of desired fitness value i.e. fitness=1, are obtained.
  • 13. Chromosome  The first thing we should consider when we deal with a genetic algorithm is how to represent our solution in such a way that it is feasible for genetic operations such as crossover and mutation.  Also, we should know how to specify how good our solution is. In other words, we should be able to calculate the fitness value of our solution.
  • 15. Chromosome Representation Chromosomes are represented by the Schedule class, and it stores the representation of a class schedule in these two attributes:
  • 16. Chromosome Representation Additionally, the chromosome should store its fitness value and the parameters which are used by genetic operations. The fitness value is stored as follows:
  • 18. Fitness Function  Now we need to assign a fitness value to the chromosome.  For only hard requirements is done firstly to calculate the fitness of a class schedule. Each class can have 0 to 5 points. If a class uses a spare classroom, we increment its score. If a class requires computers and it is located in the classroom with them, or it doesn't require them, we increment the score of the class.
  • 19. Fitness Function  Now we need to assign a fitness value to the chromosome.  For only hard requirements is done firstly to calculate the fitness of a class schedule. If a class is located in a classroom with enough available seats, we increment its score. If a professor has no other classes at the time, we increment the class's score once again. The last thing that we check is if any of the student groups that attend the class has any other class at the same time, and if they don't, we increment the score of the class.
  • 20. Fitness Function  Now we need to assign a fitness value to the chromosome.  For only hard requirements is done firstly to calculate the fitness of a class schedule. If a class breaks a rule at any time-space slot that it occupies, its score is not incremented for that rule. The total score of a class schedule is the sum of points of all classes. The fitness value is calculated as  schedule_score / maximum_score and  maximum_score is number_of_classes*5. Note: The fitness values are represented by single-precision floating point numbers (float) in the range 0 to 1.
  • 21. Crossover  A crossover operation combines data in the hash maps of two parents, and then it creates a vector of slots according to the content of the new hash map.  A crossover 'splits' hash maps of both parents in parts of random size.  The number of parts is defined by the number of crossover points (plus one) in the chromosome's parameters.  Then, it alternately copies parts form parents to the new chromosome, and forms a new vector of slots.
  • 24. Mutation  A mutation operation is very simple.  It just takes a class randomly and moves it to another randomly chosen slot.  The number of classes which are going to be moved in a single operation is defined by the mutation size in the chromosome's parameters. Visual C++ // Performs mutation on chromosome void Mutation();
  • 25. Program Flow to Search  The genetic algorithm is fairly simple. For each generation, it performs two basic operations:  Randomly selects N pairs of parents from the current population and produces N new chromosomes by performing a crossover operation on the pair of parents.  Randomly selects N chromosomes from the current population and replaces them with new ones. The algorithm doesn't select chromosomes for replacement if it is among the best chromosomes in the population.  And, these two operations are repeated until the best chromosome reaches a fitness value equal to 1 (meaning that all classes in the schedule meet the requirement).  As mentioned before, the genetic algorithm keeps track of the M best chromosomes in the population, and guarantees that they are not going to be replaced while they are among the best chromosomes.
  • 30. Conclusion  The process of Time Table generation has been fully automated with this software.  This application can now cater to multiple colleges, universities which can rely on it for their Time Table scheduling which earlier had to be done by hand.
  • 31. Evaluation  Using Genetics Algorithm, a number of trade-off solutions, in terms of multiple objectives of the problem, could be obtained very easily.  Moreover, each of the obtained solutions has been found much better than a manually prepared solution which is in use.
  • 32. Further Work  Though this application serves as a basic time table generator, there is a lot more which could be done to make this project even better in terms of consideration of soft constraints like professor giving preference to particular class.  The up-gradations I look up to currently will be Classroom size considerations, lab facility consideration and multiple subject selection for faculty. I will try to bring the following up- gradations very soon.  More features such as schedule print for individual faculty etc. would also be involved to make this more useful as a final product.  I will try to link our project to generate time table of departments of CoE (Avionics, Electrical, Mechatronics and Software Engineering)
  • 33. Q&A
  • 35. Slide Title • Make Effective Presentations • Using Awesome Backgrounds • Engage your Audience • Capture Audience Attention https://www.codeproject.com/Articles/23111/ Making-a-Class-Schedule-Using-a-Genetic- Algorithm
  • 39. Slide Title Product A • Feature 1 • Feature 2 • Feature 3 Product B • Feature 1 • Feature 2 • Feature 3