This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Q5. Please refer to the operation on Roulette Wheel Selection. The following is an example: sum=0; for i=1:N, sum = sum+FitV[i]; end; r = floor(rand() * sum) + 1; // rand is assumed to be from 0 to 1, exclusive accSum = 0; j=0; While (accSum < r) j=j+1; accSum = aAccSum + FitV[j]; end; p = j; // p is the parent...
View Full Document
This note was uploaded on 04/10/2011 for the course EE 4047 taught by Professor Kitsangtsang during the Spring '09 term at City University of Hong Kong.
- Spring '09