Is the way I'm implementing my genetic algorithm right?
Posted
by
Mhjr
on Programmers
See other posts from Programmers
or by Mhjr
Published on 2012-10-20T09:26:40Z
Indexed on
2012/10/20
11:19 UTC
Read the original article
Hit count: 247
algorithms
|genetic-algorithms
In my graduation project, I am asked to use a genetic algorithm (any variation of it can be chosen) to generate valid timetables. What I did was make a simple program that generates unique sequences representing genes, the sequence is described below: (sorry if it's mathematically incorrect)
The only variable in the sequence is the room element, so basically the program takes a tree that goes like this:
[Course]
-(contains)-> [Units]
-(contains)-> [Offerings]
-(contains)-> [Instructors]
-(contains)-> [Rooms]
- Each course can have n units (duplicates).
- Each unit can have n offerings (lectures,lab session, excercises,...).
- Each offering has only 1 instructor.
- Each instructor (or the whole lecture composed from the four elements of the sequence) has multiple rooms.
When a timetable is initialized, one of these sequences that differ in rooms will be taken into the timetable, so the difference in genes (sequences) of each timetable will be just the rooms random choice and the difference between chromosomes (timetables) will be time placements of these genes (sequences).
My question is, before I proceed in implementing what I described, is it valid? Is the representation used here for chromosomes a permutation representation?
© Programmers or respective owner