Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
MISTA 2009
Evolving Hyper-Heuristics for the Uncapacitated Examination Timetabling Problem Nelishia Pillay
Abstract This paper presents a genetic programming (GP) hyper-heuristic approach that optimizes a search space of functions to assess the difficulty of allocating an examination during the timetable construction process. Each function is a heuristic combination of lowlevel construction heuristics combined by logical operators. The approach is tested on a set of five benchmark problems of varying difficulty to evaluate its ability to generalize. The GP hyper-heuristic approach was found to generalize well over the five problems and performed comparably to other hyper-heuristic approaches combining low-level construction heuristics. 1
Introduction
Much of the research in the domain of examination timetabling has been aimed at developing methodologies that produce the best quality timetables for a problem [21]. A more recent direction of research in this field, namely, hyper-heuristic methods, focuses on creating algorithms that generalize well over a set of problems. A common approach taken by hyperheuristic methods involves combining low-level heuristics. This paper presents a genetic programming hyper-heuristic approach for evolving heuristic combinations in the form of a function comprised of a combination of low-level constructive heuristics and logical operators. This approach was tested on a set of five benchmark problems of differing difficulty. The approach was found to generalize well and produced results comparable to other hyperheuristic approaches combining low-level heuristics. The following section provides an overview examination timetabling. Section 3 examines the use of hyper-heuristic approaches in the domain of examination timetabling. A genetic programming approach for inducing “hierarchical” combinations of low-level construction heuristics is proposed in section 4. The methodology employed for evaluating this approach is described in section 5. Section 6 discusses the performance of the GP hyperheuristic approach on the set of five benchmark problems. The results of the study and future extensions of this work are summarized in section 7.
Nelishia Pillay School of Computer Science, University of KwaZulu-Natal, KwaZulu-Natal, South Africa E-mail:
[email protected] 447
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
2
Examination Timetabling
The examination timetabling problem is a well-researched domain [21]. The problem requires a set of examinations to be allocated to a given set of examination periods. The timetable generated must meet the hard constraints of the problem. The hard constraints are those requirements that must be satisfied by a timetable in order for it to be operable, e.g. no student must be scheduled to write more than one examination during the same period. A timetable meeting the hard constraints of the problem is called a feasible timetable. Each examination timetabling problem also has a set of soft constraints. Soft constraints are constraints that we would like the timetable to meet, but which may not always be possible, e.g. examinations must be well-spaced over the examination session for all students. Thus, we attempt to minimize the soft constraint cost, i.e. the number of soft constraints violated. Room capacities are not taken into consideration in the uncapacitated version of the problem. The capacitated version of the problem has an additional hard constraint requiring room capacities to be satisfied for each period. Research in the area of examination timetabling was initiated by Carter et al. [12] in 1996 and since then numerous methodologies have been applied to this problem. A set of 13 benchmark problems proposed by Carter et al. [12] have been used to compare the performance of the different methodologies in solving the examination timetabling problem. A later set of benchmarks have also been made available as part of the international timetabling competition [16]. This is a more constrained set of problems than the Carter benchmark set. The study presented in this paper focuses on the Carter benchmark set. A number of methodologies have been cited in the literature as producing the best quality timetables for one or more problems in the benchmark set. The sequential construction method employed by Caramia et al. [11] has produced the best quality timetables for 5 of the problems. This methodology uses a greedy scheduler to firstly obtain a feasible timetable. A penalty decreaser and penalty trader are then used to further improve the quality of the timetable. The algorithm developed by Burke et al. [7] combining the use of variable neighbourhood search and a genetic algorithm has also produced a best quality timetable. Burke et al. [9] introduce the concept of a “late acceptance strategy”. In this approach the hill-climbing algorithm implemented compares a candidate solution with the best solution obtained a few iterations back instead of the current best solution. This algorithm has produced the best quality timetables for four of the benchmark problems. The results obtained by these methodologies are presented in section 6. Instead of developing methods that produce the best quality timetable for one or more of a set of benchmark problems, research in the domain of examination timetabling is moving towards developing approaches that generalize well over a set of problems. This has led to the creation of hyper-heuristic algorithms. Examination timetables are generally constructed by sorting the examinations according to their difficulty and allocating examinations, in order, to the minimum penalty timetable slot ([12], [21]). A low-level heuristic measures the difficulty of examinations. A hyper-heuristic algorithm is used to determine which low-level heuristic or combination of heuristics to use in deciding on which examination should be allocated next. In addition to constructive heuristics, hyper-heuristic approaches can also generate or combine improvement, perturbative, or hill-climber ([5], [10], [13] and [14]) heuristics. The study presented in this paper is limited to constructive heuristics and previous work focusing on construction heuristics are described in the following section. 3
Hyper-Heuristics and Examination Timetabling
One of two approaches is generally taken by hyper-heuristic algorithms. The first adapts an existing heuristic or determines which single low-level heuristic to use. The second approach combines low-level heuristics in some way. This is achieved by applying a function
448
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
to two or more heuristics or searching a space of heuristic combinations. The study presented in this paper employs the second approach and thus this section summarizes previous work evaluating hyper-heuristic algorithms taking this approach in the domain of examination timetabling. Furthermore, all these algorithms have been tested on the same version of the Carter benchmark problems used in this study. Qu et al. [19] implemented a variable neighbourhood search (VNS) to optimize a search space of heuristic combinations consisting of two or more low-level graph colouring heuristics. Each heuristic in the heuristic combination produced by the VNS is used to schedule two examinations. Earlier research conducted by Burke et al. [6] applied a Tabu search to the space of heuristic combinations comprised of the saturation and largest degree low-level heuristics. The algorithm was tested on four of the Carter benchmark problems. This work was extended in later research conducted by Burke et al. [8] which employed a Tabu search to explore a search space of heuristic combinations comprised of two or more low-level graph colouring heuristics. Each heuristic is used to allocate two examinations. A further extension of this work used the Tabu search algorithm to produce heuristic combinations that construct feasible timetables [20]. These combinations are then further analysed to determine the most effective distribution pattern of low-level heuristics, for example a particular heuristic may produce better solutions when applied at the beginning of the construction process, i.e. it occurs at the beginning or the end of the combination string. The analyses revealed that the best approach would be to start off with the heuristic combination consisting only of the saturation degree and hybridizing the largest weighted degree heuristic into the combination during the timetable construction process. Asmuni et al. [1] used a fuzzy logic approach to combine two of three low-level graph colouring heuristics. The fuzzy logic algorithm combines the two low-level heuristics into a single value which is used to estimate the difficulty of allocating an exam. The examinations are sorted according to this fuzzy value and scheduled accordingly. In later work [3], Asmuni et al. [3] consider more combination pairs of the three low-level heuristics. In another study Asmuni et al. [2] combine three low-level heuristics in the same way and tune the fuzzy rules instead of keeping them fixed to produce better quality timetables. Pillay et al. [17] employ a genetic programming algorithm to optimize a search space of heuristic combinations. Each combination is essentially a sequential list of low-level heuristics. The number of low-level heuristics comprising each combination is randomly chosen to be within the range of a preset maximum. An initial population of heuristic combinations is randomly created and the mutation and crossover operators are used to create successive generations. Tournament selection is used to choose the parents that these operators are applied to. Pillay et al. [18] propose an alternative approach to combining low-level heuristics. Instead of combining and applying low-level heuristics sequentially, heuristics are combined hierarchically and applied simultaneously. Each combination consists of two or more primary heuristics, with one of the primary heuristics denoted as a priority heuristic to deal with conflicts. The combination may also contain a secondary heuristic which is used to break ties. The heuristics are applied simultaneously by combining the heuristics with logical operators. Four such heuristic combinations are created and tested on the Carter benchmark set. Section 6 compares the performance of the genetic programming hyper-heuristic approach presented in this paper to the results obtained by the algorithms described in this section. 4
The Genetic Programming Hyper-Heuristic Approach
The study presented in this paper takes a similar approach to that presented in [18] in that lowlevel heuristics are combined hierarchically and applied simultaneously instead of sequentially. Genetic programming (GP) is used to explore a space of such combinations. Genetic programming is an evolutionary algorithm based on Darwin’s theory of evolution [15]. GP
449
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
iteratively refines a program space rather than a solution space. The optimal program found by a GP system is then implemented to find a solution. Genetic programming has been applied successfully to various domains ([4] and [15]). The GP system implemented in this study is strongly-typed and employs the generational control model. An overview of the algorithm is depicted in Figure 1. An initial population is created by randomly constructing heuristic combinations. This initial population is then iteratively refined through the processes of evaluation, selection and recreation. These processes are described in the sections that follow. Create the initial population Repeat Evaluate the population Apply crossover and mutation operators to chosen parents Until the maximum number of generations is reached
Figure 1. Genetic programming algorithm 4.1
Population Representation and Generation
Each element of the population is represented as a parse tree. An example is illustrated in Figure 2.
if
e2
and > h1
if
!= h2
w2
< w1
s1
e2
e1
s2
Figure 2. An example of an element of the population A depth limit is set on the overall tree, and subtrees for the operators. This is to prevent the growth of redundant code. The root node of each individual is the if operator. This operator takes three arguments. The first child represents a condition. This node can be an and operator or one of the arithmetic logic operators, greater than (>), less than ( operator with the first child chosen to represent the highest cost of the first examination and the second child the highest cost of the second examination. The second and third child of the if operator can be another if operator, if the depth limit of the subtree has not been reached, or an examination node. An examination node is denoted by e1 or e2 representing the first or second examination respectively. Thus, the output of an individual is e1 or e2 indicating which of the two exams should be given priority to be scheduled. An initial population of m combinations is created, where m is a genetic parameter, i.e. its value is problem dependant. 4.2
Fitness evaluation and selection
Each individual is evaluated by using it to construct a timetable. Consider the three examinations in Table 1 and their corresponding saturation degree, s, and weighted degree, w, heuristic values: Table 1. Exam example Exam s value w value E1 4 5 E2 2 20 E3 7 20 If the individual in Figure 3 is used to order the examinations during timetable construction, the exams will allocated in the following order: E2, E3, E1.
if
e2
> w2
if
5, w(n) =0 Table 2. Five Carter benchmarks Problem ear-f-83 I hec-s-92 I sta-f-83 I ute-s-92 yor-f-83 I
Institution Earl Haig Collegiate Institute, Toronto Ecole des Hautes Etudes Commerciales, Montreal St Andrew’s Junior High School, Toronto Faculty of Engineering, University of Toronto York Mills Collegiate Institute, Toronto
Periods
No. of Exams
No. of Students
Density of Conflict Matrix
24
190
1125
0.27
18
81
2823
0.42
13
139
611
0.14
10
184
2749
0.08
21
181
941
0.29
The values of the genetic parameters are listed in Table 3. These values were obtained empirically by performing trial runs. Table 3: Genetic parameter values Parameter Value Number of generations 50 Population size 500 If-subtree depth limit 3 Operator subtree depth limit 2 Tournament size 4 Crossover rate 0.3 Mutation rate 0.7 Maximum offspring size 100 The algorithm was implemented in Java using JDK 1.6.0 and simulations were run on an Intel Core 2 Duo processor with Windows XP. Ten runs, each using a different random number generator seed, were performed for each of the five benchmarks. 6
Results and Discussion
A heuristic combination that produces a feasible timetable was found for all five data sets. Figure 4 depicts the heuristic combination that has produced the best soft constraint cost for the hec-s-92I data set. Note that the redundant code has been removed. The saturation degree heuristic has priority. Examinations with the lowest saturation degree are scheduled first. If an examination has an equivalent or higher saturation degree its largest weighted degree is examined. The next part of the evolved function is not typical of a human created function. If the largest weighted degree of an examination is higher and it has an equivalent highest cost value it is scheduled next. The best soft constraint cost, the average soft constraint cost and the average runtime for the five problems are listed in Table 4.
453
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
if
e2
< s2
if
s1
if
> w2
w1
!=
h1
e1 e1
e2
h2
Figure 4. A heuristic combination for the hec-s-92I data set Table 4. Soft constraint costs and runtime Data Set ear-f-83 I hec-s-92 I sta-f-83 I ute-s-92 yor-f-83 I
Best Cost
Average Cost
37.39
37.85
11.43 158.38 27.31 39.96
11.67 158.69 28.02 40.58
Average Runtime 16 hrs 50 mins 5 hrs 8 hrs 14 hrs
The main objective of a hyper-heuristic algorithm is to generalize well over a set of problems rather than produce the best quality timetable for one or two of the problems. Hence, assessing the performance of the GP approach presented in this paper by a direct comparison with the quality of timetables produced by other hyper-heuristic approaches for the five problems will not be meaningful. Instead the performance over all five problems is evaluated and compared. This is achieved by calculating the distance the soft constraint cost is from the best reported in the literature for each problem and summing these values to get an idea of how each hyper-heuristic approach performed over all five problems. These five problems were chosen so as to represent problems of differing difficulty as indicated by the density of the conflict matrix for each problem. The best results cited in the literature for each of the five problems are listed in Table 5. These include the sequential construction method implemented by Caramia et al. [11], the variable neighbourhood search incorporating the use of genetic algorithms developed by Burke et al. [7] and the hill-climbing with a late acceptance strategy used by Burke et al. [9]. These algorithms are described in section 2.
454
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
Table 5. Best results cited for the Carter benchmarks Data Set ear-f-83 I hec-s-92 I sta-f-83 I ute-s-92 yor-f-83 I
DA 35.09 11.08 157.28 26.5 39.4
Caramia et a. [11] 29.3 9.2 158.2 24.4 36.2
Burke et al. [7] 32.8 10.0 156.9 24.8 34.9
Burke et. al. [9] 32.65 10.06 157.03 24.79 34.78
Table 6 lists the soft constraint cost for each of the data sets for the GP approach presented in this paper and for the following hyper-heuristic approaches (an overview of these approaches have been provided in section 3): (1) (2) (3) (4) (5) (6) (7) (8)
The variable neighbourhood search implemented by Qu et al. [19] The fuzzy logic expert algorithm developed by Asmuni et al. [1] The fuzzy logic expert algorithm with fine tuning (Asmuni et al. [2]) The extended fuzzy logic algorithm with additional models tested by Asmuni et al. [3] The tabu search employed by Burke et al. [8] The adaptive automated construction approach used by Qu et al.[20] The evolutionary algorithm tested by Pillay et al.[17] The heuristic combinations evaluated by Pillay et al.[18]
These approaches were chosen for comparison as they take the same approach as the GP algorithm presented in this study, namely, either search a space of heuristic combinations or combine low-level heuristics by means of a function. In all cases the hard constraint cost is zero, i.e. feasible timetables were found for all five problems by all of the hyper-heuristic approaches. Table 7 tabulates the distance from the best cited results for each of the five problems and sum of these values for the GP approach and the approaches listed above. Table 6. Soft constraint costs for the different hyper-heuristic approaches Problem GP (1) (2) (3) (4) (5) (6) (7) ear-f-83 I 37.39 37.29 37.02 36.64 37.02 38.19 35.56 36.94 hec-s-92 I 11.43 12.23 11.78 11.6 11.78 12.72 11.62 11.55 sta-f-83 I 158.38 158.8 160.42 160.79 160.42 158.19 158.88 158.22 ute-s-92 27.31 29.68 27.78 27.55 28.07 31.65 28 26.65 yor-f-83 I 39.96 43 40.66 39.79 39.8 40.13 40.71 41.57
(8) 36.86 11.85 158.33 28.88 40.74
Table 7. Comparison of the performance of hyper-heuristic approaches over the five problems Problem GP (1) (2) (3) (4) (5) (6) (7) (8) ear-f-83 I 8.09 7.99 7.72 7.34 7.72 8.89 6.26 7.64 7.56 hec-s-92 I 2.23 3.03 2.58 2.4 2.58 3.52 2.42 2.35 2.65 sta-f-83 I 1.48 1.9 3.52 3.89 3.52 1.29 1.98 1.32 1.43 ute-s-92 2.91 5.28 3.38 3.15 3.67 7.25 3.6 2.25 4.48 yor-f-83 I 5.18 8.22 5.88 5.01 5.02 5.35 5.93 6.79 5.96 Total 19.89 26.42 23.08 21.79 22.51 26.3 20.19 20.35 22.08 It is evident from Table 6 and Table 7 that the performance of the GP hyper-heuristic algorithm is comparable to other hyper-heuristic approaches. Furthermore, this algorithm generalizes well over all five problems with the lowest total distance from the best results cited in the literature for each of the problems.
455
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
7
Conclusion and Future Work
The study presented in this paper implements a genetic programming approach to evolve functions that calculate the difficulty of scheduling an examination during the timetable construction process. These functions combine low-level construction heuristics and apply them simultaneously. The hyper-heuristic algorithm was tested on a set of five benchmark problems of differing difficulty to assess its ability to generalize. The heuristic combinations generated by the GP algorithm produced feasible timetables for all five problems. The quality of the timetables produced by the GP-based hyper-heuristic approach was comparable to other hyper-heuristic approaches and was found to generalize well over the five problems. Given the success of the approach with the five problems, future work will include applying the algorithm to additional problems of differing difficulty and characteristics. This will include extending the algorithm for evaluation with the data sets from the international timetabling problem. Future extensions of the algorithm will also investigate the effect of using additional logical and arithmetic logical operators in the heuristic combinations and testing a more structured syntax for hierarchical heuristic combinations, similar to that proposed in [18]. Acknowledgements The author would like to thank the reviewers for their helpful comments. References 1.
2.
3. 4. 5.
6.
7. 8. 9.
Asmuni H., Burke E. K., and Garibaldi J. M., Fuzzy Multiple Ordering Criteria for Examination Timetabling, in Burke E.K., Trick M. (eds.), selected Papers from the 5th International Conference on the Theory and Practice of Automated Timetabling (PATAT 2004)- The Theory and Practice of Automated Timetabling V, Lecture Notes in Computer Science, 3616, 147–160 (2005) Asmuni H., Burke E.K., Garibaldi J. M., and McCollum B., Determining Rules in Fuzzy Multiple Heuristic Orderings for Constructing Examination Timetables, Proceedings of the 3rd Multidisciplinary International Scheduling: Theory and Applications Conference (MISTA 2007), 59-66 (2007) Asmuni H., Burke E.K., Garibaldi J. M.,McCollum B., and Parkes A. J., An Investigation of Fuzzy Multiple Heuristic Orderings in the Construction of University Examination Timetables, Computers and Operations Research, Elsevier, 36(4), 981-1001 (2009) Banzhaf W., Nordin P., Keller R.E., Francone F.D., Genetic Programming - An Introduction - On the Automatic Evolution of Computer Programs and its Applications. Morgan Kaufmann Publishers, Inc. (1998) Biligan B., Ozcan E., and Korkmaz E.E., An Experimental Study on Hyper-Heuristics and Exam Timetabling, in: Burke EK, Rudova H (eds.), Practice and Theory of Automated Timetabling VI: Selected Papers from the 6th International Conference, PATAT 2006, Lecture Notes in Computer Science, 3867, 394 – 412 (2007) Burke E. K. , Dror M. , Petrovic S., and Qu R, Hybrid Graph Heuristics with a HyperHeuristic Approach to Exam Timetabling Problems, in Golden B.L., Raghavan S., Wasil E.A. (eds.), The Next Wave in Computing, Optimization, and Decision Technologies – Conference Volume of the 9th Informs Computing Society Conference, 79 -91 (2005) Burke, E. K., Eckersley, A., McCollum, B., Petrovic, B., and Qu, R., Hybrid Variable Neighborhood Approaches to University Exam Timetabling. Accepted for publication in the European Journal of Operational Research (EJOR). (2009) Burke E.K., McCollum B., Meisels A., Petrovic S., and Qu R, A Graph-Based HyperHeuristic for Educational Timetabling Problems, European Journal of Operational Research (EJOR), 176, 177 – 192 (2007). Burke E. K., and Bykov Y., A Late Acceptance Strategy in Hill-Climbing for Examination Timetabling Problems in the Proceedings of the conference on the Practice and Theory of Automated Timetabling (PATAT 2008), (2008).
456
Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA 2009) 10-12 August 2009, Dublin, Ireland
10. Burke E. K., Misir M., Ochoa G., and Ozcan E., Learning Heuristic Selection for Hyperheuristics for Examination Timetabling, in the Proceedings of the conference on the Practice and Theory of Automated Timetabling (PATAT 2008), (2008) 11. Caramia, M., Dell Olmo, P., Italiano, G. F., Novel Local-Search-Based Approaches to University Examination Timetabling, INFORMS Journal of Computing, 20(1), 86-99, (2008) 12. Carter M. W., Laporte G., Lee S.Y., Examination Timetabling: Algorithmic Strategies and Applications, The Journal of the Operational Research Society, 47(3), 373-383 (1996) 13. Ersoy E., Ozcan E., and Uyar S., Memetic Algorithms and Hill-Climbers, In: Baptiste P, Kendall G, Kordon AM, Sourd F (eds.), Proceedings of the 3rd Multidisciplinary International Conference on Scheduling: Theory and Applications Conference (MISTA 2007), 159–166 (2007) 14. Kendall G., and Hussin N.M., An Investigation of a Tabu Search Based on HyperHeuristics for Examination Timetabling, in Kendall G., Burke E.K., Petrovic S. (eds), Proceedings of the 2nd Multidisciplinary Scheduling: Theory and Applications Conference (MISTA 2005), 309–328 (2005) 15. Koza J. R., Genetic Programming I: On the Programming of Computers by Means of Natural Selection. MIT Press (1992) 16. McCollum B., McMullan P., Paechter B., Lewis R., Schaerf A., Di Gapsero L., Parkes A. J., Qu R., and Burke E.K., Setting the research agenda in automated timetabling: the second international timetabling competition. Submitted to INFORMS. Retrieved June 28, 2008, from http://www.cs.qub.ac.uk/itc2007/winner/finalorder.htm (2008) 17. Pillay N., and Banzhaf W., A Genetic Programming Approach to the Generation of Hyper-Heuristics for the Uncapacitated Examination Timetabling Problem, in Neves et al. (eds.), Progress in Artificial Intelligence, Lecture Notes in Artificial Intelligence, 4874, 223-234 (2007) 18. Pillay N., and Banzhaf W., A Study of Heuristic Combinations for Hyper-Heuristic Systems for the Uncapacitated Examination Timetabling Problem, to appear in the European Journal of Operational Research(EJOR), doi:10.1016/j.ejor.2008.07.023 (2008) 19. Qu R., Burke E.K., Hybrid Neighbourhood HyperHeuristics for Exam Timetabling Problems, in Proceedings of the MIC2005: The Sixth Metaheuristics International Conference, Vienna, Austria (2005) 20. Qu R., Burke E. K., and McCollum B., Adaptive Automated Construction of Hybrid Heuristics for Exam Timetabling and Graph Colouring Problems, to appear in the European Journal of Operational Research (EJOR), doi:10.1016/j.ejor.2008.10.001 (2008). 21. Qu R., Burke E. K., McCollum B., Merlot L.T.G., and Lee S.Y., A Survey of Search Methodologies and Automated System Development for Examination Timetabling, to appear in the Journal of Scheduling, doi: 10.1007/s10951-008-0077-5 (2008).
457