function TV=step3d_autotlbo(population,k,n,iter,tmax)
[np,pp]=size(population);
n=1;
DV=zeros(np,k+k*n);
TV=zeros(np,k+k*n);
%f=0.8
f =0.5*(1+rand(1));
%CR=0.2
CR=0.5*(tmax-iter)/tmax;

for i=1:np
    randvec=zeros(1,3);
    v=randperm(np);
    kk=1;
    while kk<=3
      if v(1)~=i
          randvec(kk)=v(1);
          kk=kk+1;
      end
      v=v(1,2:length(v));
    end
    DV(i,:)=population(randvec(1),:)+f*(population(randvec(2),:)-population(randvec(3),:));
end
for i=1:np
    for j=1:k+k*n%pp
        if rand(1)<CR
            TV(i,j)=DV(i,j);
        else
            TV(i,j)=population(i,j);
        end
    end
end
