Jump to content

Talk:Selection (evolutionary algorithm)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nocklas (talk | contribs) at 23:09, 26 February 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

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)[reply]
I also see no need to sort the individuals.