diff --git a/population.py b/population.py index 3e78cc9abd6794c5e926e9ff50c58845a5f48241..424431216c8838e725049c0738c640b05fc479ab 100644 --- a/population.py +++ b/population.py @@ -15,7 +15,10 @@ class Population: self.indiv = liste_individus return self - def selection_p_best(self,p=self.n//2): + def selection_p_best(self,p=None): + if p==None: + p=(self.n)//2 + def tri_rapide_aux(tableau,debut,fin): if debut < fin-1: positionPivot=partitionner(tableau,debut,fin)