EVOLUTIONARY RUIN AND STOCHASTIC RECREATE: A CASE STUDY ON THE EXAM TIMETABLING PROBLEM

This paper presents a new class of intelligent systems, called Evolutionary Ruin and Stochastic Recreate, that can learn and adapt to the changing enviroment. It improves the original Ruin and Recreate principle’s performance by incorporating an Evolutionary Ruin step which implements evolution within a single solution. In the proposed approach, a cycle of Solution Decomposition, Evolutionary Ruin and Stochastic Recreate continues until stopping conditions are reached. The Solution Decomposition step first uses some domain knowledge to break a solution down into its components and assign a score to each. The Evolutionary Ruin step then applies two operators (namely Selection and Mutation) to destroy a certain fraction of the entire solution. After the above steps, an input solution becomes partial and thus the resulting partial solution needs to be repaired. The repair is carried out by using the Stochastic Recreate step to reintroduce the removed items in a specific way (somewhat stochastic in order to have a better chance to jump out of the local optima), and then ask the underlying improvement heuristic whether this move will be accepted. These three steps are executed in sequence until a specific stopping condition is reached. Therefore, optimisation is achieved by solution disruption, iterative improvement and a stochastic constructive repair process performed within. Encouraging experimental results on exam timetabling problems are reported.


INTRODUCTION
Exam timetabling can be considered as the process of assigning a set of events (i.e.exams) into a limited number of timeslots subject to a set of constraints.The problem has attracted a significant level of research interest since the 1960's.The general timetabling problem comes in many different guises such as nurse rostering (Cheang et al. 2003;Li et al. 2012), sports timetabling (Easton et al. 2004), transportation timetabling (Kwan 2004) and educational timetabling (Carter and Laporte 1996;Schaerf 1999;Petrovic and Burke 2004;Qu et al. 2009).Educational timetabling problems are prob-ably the most widely studied.
Since exam timetabling problems are general NP-hard combinatorial problems which are unlikely to be solved optimally in polynomial time, various methods such as local search-based heuristics (Casey and Thompson 2004;Burke et al. 2004;Burke and Newall 2004), knowledge-based systems (Burke et al. 2006) and hyperheuristics (Qu and Burke 2009) have been studied.Over the past dec-ade, meta-heuristics have attracted the most attention, including genetic algorithms (Erben 2001;Paquete and Fonseca 2001), ant algorithms (Dowsland and Thompson 2005), tabu search (Burke et al. 2003;White et al. 2004), simulated annealing (Thompson and Dowsland 1998).A number of at-tempts have also been made using other meta-heuristics (Burke et al. 1996;Duong and Lam 2004).The methods and techniques that have been used over the years to tackle exam timetabling problems have tended to draw on problemspecific information and particular heuristics.In this paper, we are trying to deal with the goal of developing a new class of search systems.We use the well-studied exam timetable problem as the test bed.
The work that is presented here is based on the observation that, in most real world problems, the solutions consist of components which are intricately woven together.Each solution component may be a strong candidate in its own right, but it also has to fit well with other components in the enviroment.To deal with these components, Schrimpf et al. (2000) proposed a technique called Ruin and Recreate (R&R) principal, and claimed it could be a general approach for various combinatorial optimisation problems.In this paper, we further extend the idea by incorporating some evolutionary features into the searching process.We term the enhanced version Evolutionary Ruin and Stochastic Recreate (ER&SR).Its general idea is to break a solution down into its components and assign a score to each by an evaluation function working under dynamic environments.The scores are employed as fitness values which determine the chances for the components to survive in the current solution.
The Ruin and Recreate (R&R) method uses the concepts of simulated annealing (Kirkpatrick 1983) or threshold accepting (Dueck and Scheuer 1990) with large moves instead of smaller ones.For simple structured problems like the traveling salesman problem, the need of using large moves is not obvi-ous, because algorithms usually generate near optimal solutions with very small moves already.However, for complex problems like exam timetabling problems, difficulties arise if still using such small moves, because complex problems can often be seen as discontinuous: if walking one step from a solution to a neighbouring solution, the qualities of new solutions may be dramatically different, i.e., the landscapes of these problem areas can be very rugged.
Solutions of complex problems usually have many soft and/or hard constraints, which makes it dif-ficult to get just feasible solutions.Neighbouring solutions of complex schedules, for instance, are usually infeasible solutions.It may be very hard to walk in such a complex landscape from one feasi-ble solution to another neighboured feasible solution.The common method of avoiding the infeasibil-ity problem for many forms of the classical algorithms is to impose artificial penalty functions, but this method would typically make the algorithms get stuck in slightly infeasible solutions which might not be allowed at all.Naturally, one will think in a different paradigm: ruin and recreate.We ruin a quite large portion of the solution and try to rebuild the solution as best as we can, with the hope that the new solution is better than the previous one.The R&R approach is just based on the above idea which has shown an important advantage: if destroying a large part of the previous solution, we have more freedom to generate a new one, and thus it is more likely to find again a feasible solution in this larger solution space.Hence, it is reasonable to believe that problems with many side conditions, or with very complex objective functions, are more tractable using special large moves.
Based on the general R&R principal, this paper presents a more advanced technique called ER&SR which has never been reported in the literature before.The new technique applies two operators of Selection and Mutation as the ruining strategies, trying to mimic the evolution on single solutions.Each component in the solution has to continuously demonstrate its worthiness to stay in the solution.Hence in each iteration, a number of components will be deemed not worth keeping.The evolutionary strategy adopted may also throw out, with a low probability, some worthy components.Any destroyed component is then reintroduced by using a specific algorithm.Of key importance is that the admittance of a new component is determined by a dynamic evaluation function, which takes into account of how well the prospective component will fit in with others already in the solution.The above processes are iterated together with the remainder of the classical R&R.Thus the global optimisation procedure is based on solution disruption and iterative improvement, while a reconstructive process is performed within.
As outlined, our proposed ER&SR algorithm consists of the following three parts: Solution Decomposition, Evolutionary Ruin and Stochastic Recreate.It executes these parts in a loop on one solu-tion until a stopping condition reached.The first part of Solution Decomposition is based on the observation that in most real world combinatorial optimization problems, the solutions consist of components which are intricately woven together in a nonlinear, non-additive fashion.Each solution component may be a strong candidate in its own right, but it also has to fit well with other components.Its general idea is to use some expert's domain knowledge to break a solution down into its components and assign a score to each.The higher the score, the fitter the related component is.
The second part of Evolutionary Ruin is based on the consideration that the incumbent solution must be changed not only locally but also over a macroscopic scale, depending on the solution composition defined by the proceeding Solution Decomposition part.This part applies two operators of Selection and Mutation to destroy a certain fraction of the entire solution.The Selection operator removes some components based on Darwin's survival of the fitness mechanism, while the Mutation operator further removes some components in a totally random manner.Hence, the destroyed part of the solution would sometimes be large enough such that the impact of the "bomb" that is thrown on the solution will be noticeable not only locally but in the whole system.On the other hand, the destroyed part would sometimes be small enough so that at least a main portion of the solution (i.e. a skeleton) remains to facilitate the next solution rebuild.
The third part of Stochastic Recreate follows to reintroduce the removed items in a specific way (somewhat stochastic in order to have a better chance to jump out of the local optima), and then ask the underlying improvement heuristic (e.g.hill-climbing, simulated annealing, or great deluge) whether this move will be accepted.These three parts are executed in sequence until a specific stopping condition is reached.
The above mentioned model is a general framework and many well-known search methods belong to its special case.For example, assume at each iteration x components are removed from an n-component solution, and let p be the acceptance criterion.
• If x = 0, then it is a non-iterative method as only one single solution will be generated; • If x ≤ 3, then it is a local search method that uses small moves to change the configurations;

EXAM TIMETABLING
Exam timetabling can be considered to be the process of assigning a set of events (i.e.exams) into a limited number of timeslots subject to a set of constraints.
Constraints are usually divided into two types: hard and soft.A hard constraint cannot be violated under any circumstances.A typical example is two exams with common students involved cannot be scheduled into the same timeslot.A soft constraint is one that should be satisfied if possible but its satisfaction is not essential.A typical example is exams taken by common students should be spread out over the available timeslots so that students do not have to sit two exams that are too close to each other.Solutions with no violations of hard constraints are called feasible solutions.How much the soft constraints are satisfied gives an indication of how good the solutions (timetables) are.
In a simplified timetabling problem, if we are only concerned with hard constraints, the problem can be represented by a graph colouring model.Vertices in the graph represent exams in the problem, and edges representing the conflicts between exams (i.e. with common students).The problem is to minimise the colours used to colour all vertices, while avoiding the assignment of two adjacent vertices to the same colour.
Graph colouring problems are among the most important problems in graph theory and are known to be NP-hard (Karp 1972).
The following objective function is used in (Burke et al. 2007) and many other papers in the literature to calculate the cost of an obtained feasible solution x: where s kl is the number of students involved in both exams e k and e l , if i = |t l -t k | < 5; w i = 2 4-i is the cost of assigning two conflicted exams e k and e l with i timeslots apart, if i = |t l -t k | < 5 (i.e.w 1 = 16, w 2 = 8, w 3 = 4, w 4 = 2, w 5 = 1; t l and t k as the timeslots of e l and e k , respectively); m is the number of exams in the problem; S is the number of students in the problem.

ER&SR FOR EXAM TIMETABLING
This section presents an ER&SR for exam timetabling.Starting from a randomly generated initial timetable, the steps described in section 4.1 to 4.3 are executed in sequence in a loop until a user specified parameter (e.g.CPU-time or solution quality) is reached or no improvement has been achieved for a certain number of iterations.During each iteration, an unfit portion of the working timetable is removed.Broken timetables are repaired by the constructing heuristic.Throughout the iterations, the best is retained and finally returned as the preserved timetable.

Solution Decomposition
and where C t (e k ) is the cost value brought by event e k , and w i uses the same definition as in Equation (1).

Evolutionary Ruin
This step is to decide whether a component (i.

Stochastic Recreate
The Stochastic Recreate task is to rebuild a partial timetable by assigning unscheduled events to available timeslots.Once a specific event has been determined, the following two steps will be executed: Step 1 finds all its available timeslots without any conflict exams; Step 2 chooses the timeslot with the smallest increase on the overall cost defined by Equation (1).
Based on the domain knowledge of timetabling, there are many heuristics that can be used to determine the order for the events to be rescheduled.Here we use the following four graph-based heuristics reported in (Qu and Burke 2009): largest degree first (H 1 ), largest weighted degree first (H 2 ), largest color degree first (H 3 ) and least saturation degree first (H 4 ).Let .
The H 1 heuristic orders events in descending order by the number of conflicts they have with other exams.This heuristic aims to schedule first those events which have the most conflicts.It first goes through the conflict values (which are precalculated) for the unscheduled events, and then proceeds to Steps 1 and 2.
The H 2 heuristic orders events in descending order by the number of conflicts, each of which is weighted by the number of students involved.Among events with the same degree, this heuristic gives higher priority to those with a larger number of students involved.Like H 1 , it first goes through the weighted conflict values for the unscheduled exams, and then proceeds to Steps 1 and 2.
The H 3 heuristic orders events in a descending order in terms of the number of conflicts with the other events that have already been placed in the timetable.The degrees of the events not yet scheduled are changed according to the situations encountered at each step of the solution construction.Unlike H 1 and H 2 , the conflict value for each exam needs to be firstly updated before scheduling an exam.This involves updating an ancillary matrix that contains the conflict values between any pairs of an unscheduled exam and a scheduled exam.H 3 then goes through the new conflict values for the unscheduled exams, and next proceeds to Steps 1 and 2.
The H 4 heuristic orders events in ascending order in terms of the number of available timeslots that can be selected without violating hard constraints.The priorities of events to be ordered and scheduled are changed dynamically as the solution is constructed.The number of available timeslots for each event needs to be firstly calculated before rescheduling an event.This process can be regarded as executing Step 1 repeatedly for all unscheduled exams.H 4 then goes through the saturation degree numbers for all the unscheduled events, and next proceeds to Steps 1 and 2.

EXPERIMENTAL RESULTS
The It can be observed that the best results reported in the literature were obtained by different approaches over the years.Among the 8 approaches compared (which have obtained the best results in the literature on the benchmarks), our ER&SR obtained competitive results.However, the most important point to make here is that all of the other approaches were specifically designed for the exam timetabling problem.

CONCLUSIONS
This paper presents a new approach to solve timetabling problems based on the original idea of R&R, by incorporating two operators of Selection and Mutation in its Evolutionary Ruin step.In our proposed ERSR, a cycle of Solution Decomposition, Evolutionary Ruin and Stochastic Recreate continues until stopping conditions are reached.Taken as a whole, the ER&SR implements evolution within a single solution and carries out search by solution disruption, iterative improvement and a stochastic constructive process.The experiments have demonstrated that the proposed approach performs very efficiently and competitively.
The architecture of the ER&SR is innovative, and thus there is still some room for further improvement.In the Solution Decomposition part, we will study the formulation of domain knowledge for different types of other problems and the influence of different evaluation rules.In the Evolutionary Ruin part, we will study the suitable range for the number of components to be destroyed and the condition of applying a large move or a small move.For the Stochastic Recreate part, we will study the types of reconstruction methods that are unsuited for generating optimum or near-optimum results.Furthermore, we will evaluate the proposed algorithm with different operators applied in its three parts and the best combination we should try.
probabilities of using heuristics H 1 , H 2 , H 3 and H 4 respectively for the rescheduling of event e k .These heuristics are alternatively used in each step of recreate will remain in its present allocation, otherwise e k will be removed from the current timetable.By using Selection, an event e k with larger fitness value F t (e k ) has a higher probability to survive in the current timetable.The Mutation operator follows to mutate the retained events e k , i.e.

Table 2 :
(Carter et al. 1996)blems we tested in this paper were first introduced in(Carter et al. 1996), and have been widely tested by a number of approaches during the last ten years.The dataset consists of 13 problems from different institutions, among which 11 have been more heavily investigated because of errors in the other two problems.A more detailed discussion of those datasets (and the difficulties caused by different instances circulating under the same name) was given in(Qu et al. 2009).Our aim with these experiments is not to beat the state-of-the-art approaches in the literature (although the results are competitive with the best results reported), but to present the potential of this more generic methodology to be easily employed and to perform adaptively on a range of different timetabling or optimisation problems.Table2presents the 20 runs' results on the benchmark exam timetabling problems of the original R&R and the enhanced ER&SR.For comparison, it also lists the results of the state-of-the-art approaches in the literature.The best results among all of the approaches are highlighted.Both algorithms were coded in C++ and implemented on an Intel Core 2 Duo 1.86GHz machine with 2.0GB of RAM under Window XP.The stopping condition is no improvement has been made after 1000 iterations.We can see that the ER&SR outperforms the R&R over all of the problems in terms of best and average results.It is also very consistent on all of the runs with distinct random seeds.Comparison Results on Benchmark Problems.