public Chromosome tournementSelection(List<Chromosome> population){
        Random r= new Random();
        int i, j, k, l;
        Chromosome result, t1, t2;
        Chromosome indiv1, indiv2, indiv3, indiv4;
        i=j=k=l= r.nextInt(population.size());
        while (i==j)
            j=r.nextInt(population.size());
        while((i==k||k==l))
            k=r.nextInt(population.size());
        while((i==l)||(k==l)||(j==l))
            l=r.nextInt(population.size());
        indiv1=population.get(i);
        indiv2=population.get(j);
        indiv3=population.get(k);
        indiv4=population.get(l);
        if (isBetter(indiv1, indiv2))
            t1=indiv1;
        else t1=indiv2;
        if(isBetter(indiv3, indiv4))
            t2=indiv3;
        else t2=indiv4;
        if(isBetter(t1, t2))
            result=t1;
        else result=t2;
        return result;
    }