Talk:Selection (genetic algorithm)

From Wikipedia, the free encyclopedia

What is gained by sorting the population by the value of the fitness function? Molinari 01:07, 29 July 2005 (UTC)

After sorting, binary search can be used, leading to a time complexity of O(n log n) for the whole selection process, whereas if you donĀ“t you will have to search through all elemetns for each selection, leading to a time complexity of O(n^2). AB

I must be missing something. What does one search for (using binary search)? We need to find the individual whose _accumulated_ fitness function exceeds the random value. To do this there is no need to sort the individuals by fitness: just compute the accumulated values in linear time (go through the array) and the accumulated values are automatically in ascending order. Perhaps I do not understand step 5. Molinari 02:51, 31 October 2006 (UTC)
I also see no need to sort the individuals.

[edit] Merge

It seems to me that this should be merged in to the main article. -- Craigtalbert 05:13, 25 March 2007 (UTC)