Creating timetables for a training institution can be an extremely tedious task.
In a typical school, if you had five different grades, with about three classes per grade, with about 6 subjects per grade, and assuming that each period was 45 minutes long, based on a weekly cycle from 8:00am to 2:00pm (don't forget the breaks), you would have about 40 periods per cycle to fill per class. This would work out to (5 grades) * (3 classes) * (6 subjects) * (40 periods) = 3600 slots that you need to fill per cycle. You also have to ensure that the teachers as well as the classes are not double booked. This allows for 3600 factorial (3600 times 3599 times 3598 repeated all the way to 3 times 2 times 1) or about is 2.547 times 10 to the power of 11241 different combinations. Actually it is a bit more complex than that, once you take each day individually.
This program attempts to solve this problem in a logical manner while still attempting to ensure that no two days are similar thus providing the learners with varied days.
The program learns as it attempts to solve your problem and, taking this knowledge, it starts from scratch every now and then as a new approach so that it does not get stuck in an unsolvable loop.
This dynamic approach ensures that it will be extremely unlikely that the program will provide an identical solution on any successive run.