Any computer scientists in here?
#5
GenericKen,Jan 1 2006, 09:13 AM Wrote:the roulette wheel implementation is O(n^2) iirc (or maybe O(n logn) if you cumulate the fitnesses and do a search on them).  I'd like a second opinion on this, though.
[right][snapback]98419[/snapback][/right]
If you keep them in a sorted list based on fitness (assuming that fitness is a calculation internal to an organism, (i.e. doesn't change when your list changes)) then it wouldn't be O(n^2)...you could also maintain the cumulative fitness of the population. It does however mean that you take a hit on insertion (& deletion) so the overall runtime may end up back looking like O(nlogn)?
Reply


Messages In This Thread
Any computer scientists in here? - by GenericKen - 12-31-2005, 08:27 AM
Any computer scientists in here? - by Kylearan - 12-31-2005, 03:58 PM
Any computer scientists in here? - by GenericKen - 12-31-2005, 08:13 PM
Any computer scientists in here? - by ima_nerd - 01-01-2006, 12:10 AM
Any computer scientists in here? - by whyBish - 01-03-2006, 11:00 AM
Any computer scientists in here? - by GenericKen - 01-03-2006, 05:30 PM
Any computer scientists in here? - by Pesmerga - 01-03-2006, 06:02 PM
Any computer scientists in here? - by GenericKen - 01-04-2006, 06:58 AM
Any computer scientists in here? - by Kylearan - 01-04-2006, 09:16 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)