## set_random_population
function [retval,min,nmin]=set_random_population(x,y,n)
  for i=1:n
    population(i)=set_integer_random_genotype(x,y,i);
  endfor
  total=0.0;
  min=realmax('double');
  for i=1:n
    xx=population(i).z;
    if xx<min
      min=xx;
      nmin=population(i).no;
    endif
    total=total+xx ;
  endfor
    for i=1:n
    population(i).RFitness= population(i).z/total;
  endfor
  retval=population;
endfunction
