diff --git a/README.md b/README.md
index f18054be9d47027bfb4d1f5c892c9d55bce0aad4..5e3ad594798d420817138bfe47201f841ad8c1d3 100644
--- a/README.md
+++ b/README.md
@@ -36,3 +36,13 @@ Sont fournis :
 - le fichier <tt>Main.py</tt> illustrant un exemple d'utilisation de la classe Traj3D,
 - deux fichiers <tt>.fasta</tt> contenant les séquences de deux plasmides de longueur différente (8 000 dans un cas et 180 000 dans l'autre).
 
+
+## Instructions
+
+Le groupe est composé de Loïc Busson, Claire Zhao, Sandra Ayumi, Rodrigo Kappes, Solal O'Sullivan, Chloé Muller, Gauthier Roy et Carlos Santos Garcia.
+Pour utiliser notre algorithme génétique, appeler la fonction main() du fichier algogenetique.py en introduisant le nombre d'individus par générations, le nombre de générations, la probabilité de mutation et le nombre d'individus séléctionnés à chaque itération. L'algorithme évalue les individus sur la séquence de nucléotides choisie. Il affiche aussi la trajectoire de la séquence voulue avec la meilleure table de rotations générée par l'algorithme à la dernière étape.
+Les fichiers introduits par nous sont:
+- individu.py: Création de la classe Individu (attributs et méthodes) qui permettent de donner un score à chaque table de rotations et l'apparition de mutations.
+- population.py: Création de la classe Population. Une population à un attribut "indiv" qui est une liste d'individus, chacun caractérisé par sa table de rotations. Cette classe permet de faire la séléction des individus à garder à chaque itération par de différentes méthodes et d'actualiser la population.
+- algogenetique.py : Rassemble les fonctionnalités des autres algorithmes pour faire tourner l'algorithme génétique et afficher la trajectoire après l'algorithme génétique.
+- croisement.py : Fonctions de croisement utilisées pour la génération des enfants au moment de la 
diff --git a/algogenetique.py b/algogenetique.py
index 3122ce1aee6097e74f29ccedf4d4a90d995fbf85..10427a02fcc4012bda87f18c8790bb709fb0c2b8 100644
--- a/algogenetique.py
+++ b/algogenetique.py
@@ -50,6 +50,9 @@ def main(N,tmax,pmutation, proportion, indice_selection, population_initiale, en
             if individu.score<mini:
                 best=individu
                 mini=individu.score
+        
+        S2=[individu.score for individu in People.indiv]
+        avg = sum(S2)/len(S2)
         L.append(mini)
 
     # plt.subplot(221)
diff --git a/croisement.py b/croisement.py
index 96f85a8a89e1dcaa97cbed0f06233942ee36f211..95119ecfe8ad91ea23492e9e9eab8fb3ced18b09 100644
--- a/croisement.py
+++ b/croisement.py
@@ -23,11 +23,14 @@ ROT_TABLE = {\
 
 
 def croisement_un_point(parent1, parent2):
+    '''Croise les tables de rotation des parents pour former deux enfants en respectant les symétries du problème'''
+    ''' Retourne deux enfants'''
     enfant1 = Individu(RotTable())
     enfant2 = Individu(RotTable())
     comp = 0
     point_crois= numpy.random.random_integers(0,8)
-    for doublet in ROT_TABLE:
+    list_dinucleotides = sorted(ROT_TABLE)
+    for doublet in list_dinucleotides:
         if doublet == "GA":
             break
         if comp < point_crois:
@@ -57,12 +60,15 @@ def croisement_un_point(parent1, parent2):
 
 
 def croisement_deux_points(parent1, parent2):
+    ''' Croise les tables de rotationd des deux parents en croisant à deux points et respectant les symétries du problème'''
+    ''' Retourne deux enfants'''
     enfant1 = Individu(RotTable())
     enfant2 = Individu(RotTable())
     comp = 0
     point_crois1= numpy.random.random_integers(0,8)
     point_crois2= numpy.random.random_integers(0,8)
-    for doublet in ROT_TABLE:
+    list_dinucleotides = sorted(ROT_TABLE)
+    for doublet in list_dinucleotides:
         if comp < min(point_crois1,point_crois2) or comp > max(point_crois1,point_crois2):
             enfant1.table.rot_table[doublet] = parent1.table.rot_table[doublet]
             correspondent_doublet1 = enfant1.table.corr()[doublet]
diff --git a/individu.py b/individu.py
index 2047877d6cc77b7c7f687f6568aa7f819ec3a6a0..c68b98bc41602063fbc295c26ca2c54d4935c35e 100644
--- a/individu.py
+++ b/individu.py
@@ -2,12 +2,12 @@ from RotTable import RotTable
 from Traj3D import Traj3D
 import numpy as np
 from math import sqrt, inf
-from random import random
+from random import random, choice
 
 P1 = 0.015
 
 class Individu():
-
+    ''' Un individu est caractérisé par sa table de rotations (individu.table)'''
     def __init__(self, table):
         lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")]
         brin = ''.join(lineList[1:])
@@ -15,9 +15,12 @@ class Individu():
         lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")]
         self.brin = ''.join(lineList[1:])
         #self.brin = "AAAGGATCTTCTTGAGATCCTTTTTTTCTGCGCGTAATCTGCTGCCAGTAAACGAAAAAACCGCCTGGGGAGGCGGTTTAGTCGAA"
-        self.score = self.evaluate()
+        self.score = None
 
     def evaluate(self):
+        ''' Evalue le score d'un individu sur un nombre numb_ajout de points'''
+        
+        
         traj = Traj3D()
 
         numb_ajout = 6
@@ -26,12 +29,12 @@ class Individu():
         last_seq = self.brin[-numb_ajout:]
 
         traj.compute(last_seq + self.brin + fisrt_seq, self.table)
-        traj_array = np.array(traj.getTraj())
+        traj_array = traj.getTraj()
 
         list_distance = []
 
-        begining = traj_array[0:2*numb_ajout, 0:3]
-        end = traj_array[-2*numb_ajout:, 0:3]
+        begining = traj_array[0:2*numb_ajout]
+        end = traj_array[-2*numb_ajout:]
 
         for i in range(numb_ajout):
 
@@ -48,7 +51,7 @@ class Individu():
 
     def mutation(self, proba = P1):
         table_rotations = self.table.rot_table
-        for doublet in table_rotations :
+        for doublet in sorted(table_rotations.keys()) :
             for coord in range(3):
                 tir = random()
                 if tir < proba :
@@ -60,17 +63,18 @@ class Individu():
                         #sur l'axe z il y a un moins
                         table_rotations[doublet2][coord] = - table_rotations[doublet][coord]
 
-    def mutation_with_numbers(self, proba = P1, number_of_mutations = 5):
+    def mutation_with_numbers(self, proba = P1, number_of_mutations = 1):
         table_rotations = self.table.rot_table
-        for i in range(0,number_of_mutations):
-            tir = random()
-            if tir < proba :
-                doubletNumber = randrange(0,8)
-                counter = 0
-                for doublet in table_rotations:
-                    if counter==doubletNumber:
-                        break
-                    counter+=1
+        table_rotation_not_seen = [i for i in sorted(table_rotations.keys())]
+        table_rotation_not_seen = table_rotation_not_seen[:8]
+
+        tir = random()
+        if tir < proba :
+            for i in range(0,number_of_mutations):
+                
+                doublet = choice(table_rotation_not_seen)
+                table_rotation_not_seen.remove(doublet)
+
                 for coord in range(3):
                     table_rotations[doublet][coord] =np.random.uniform(low = self.table.orta()[doublet][coord] - self.table.orta()[doublet][coord + 3], high = self.table.orta()[doublet][coord] + self.table.orta()[doublet][coord + 3])
                     doublet2 = self.table.corr()[doublet]
@@ -80,6 +84,34 @@ class Individu():
                         #sur l'axe z il y a un moins
                         table_rotations[doublet2][coord] = - table_rotations[doublet][coord]
 
+
+    def mutation_close_values(self, proba = P1, number_of_mutations = 1):
+        table_rotations = self.table.rot_table
+        table_rotation_not_seen = [i for i in sorted(table_rotations.keys())]
+        table_rotation_not_seen = table_rotation_not_seen[:8]
+
+        tir = random()
+        if tir < proba :
+            for i in range(0,number_of_mutations):
+
+                doublet = choice(table_rotation_not_seen)
+                table_rotation_not_seen.remove(doublet)
+
+                for coord in range(3):
+                    value = table_rotations[doublet][coord] + np.random.normal(0, self.table.orta()[doublet][coord + 3]/15)
+                    if value > self.table.orta()[doublet][coord] + self.table.orta()[doublet][coord + 3]:
+                        value = self.table.orta()[doublet][coord] + self.table.orta()[doublet][coord + 3]
+                    elif value < self.table.orta()[doublet][coord] - self.table.orta()[doublet][coord + 3]:
+                        value = self.table.orta()[doublet][coord] - self.table.orta()[doublet][coord + 3]
+                    table_rotations[doublet][coord] = value
+                    
+                    doublet2 = self.table.corr()[doublet]
+                    if coord == 0 or coord == 1 :
+                        table_rotations[doublet2][coord] = table_rotations[doublet][coord]
+                    else :
+                        #sur l'axe z il y a un moins
+                        table_rotations[doublet2][coord] = - table_rotations[doublet][coord]
+
 # individu1 = Individu(RotTable())
 # print(individu1.table.rot_table)
 # individu1.mutation()
diff --git a/inutile.py b/inutile.py
deleted file mode 100644
index 420a646fc6e25c17b5aec102de8321736ae1ebaf..0000000000000000000000000000000000000000
--- a/inutile.py
+++ /dev/null
@@ -1,38 +0,0 @@
-import numpy
-
-ORIGINAL_ROT_TABLE = {\
-        "AA": [35.62, 7.2, -154, 0.06, 0.6, 0],\
-        "AC": [34.4, 1.1, 143, 1.3, 5, 0],\
-        "AG": [27.7, 8.4, 2, 1.5, 3, 0],\
-        "AT": [31.5, 2.6, 0, 1.1, 2, 0],\
-        "CA": [34.5, 3.5, -64, 0.9, 34, 0],\
-        "CC": [33.67, 2.1, -57, 0.07, 2.1, 0],\
-        "CG": [29.8, 6.7, 0, 1.1, 1.5, 0],\
-        "CT": [27.7, 8.4, -2, 1.5, 3, 0],\
-        "GA": [36.9, 5.3, 120, 0.9, 6, 0],\
-        "GC": [40, 5, 180, 1.2, 1.275, 0],\
-        "GG": [33.67, 2.1, 57, 0.07, 2.1, 0],\
-        "GT": [34.4, 1.1, -143, 1.3, 5, 0],\
-        "TA": [36, 0.9, 0, 1.1, 2, 0],\
-        "TC": [36.9, 5.3, -120, 0.9, 6, 0],\
-        "TG": [34.5, 3.5, 64, 0.9, 34, 0],\
-        "TT": [35.62, 7.2, -154, 0.06, 0.6, 0]\
-            }
-
-class rotation:
-    def __init__(self,doublet):
-        self.x = numpy.random.uniform(low = ORIGINAL_ROT_TABLE[doublet][0] - ORIGINAL_ROT_TABLE[doublet][3], high = ORIGINAL_ROT_TABLE[doublet][0] + ORIGINAL_ROT_TABLE[doublet][3])
-        self.y = numpy.random.uniform(low = ORIGINAL_ROT_TABLE[doublet][1] - ORIGINAL_ROT_TABLE[doublet][4], high = ORIGINAL_ROT_TABLE[doublet][1] + ORIGINAL_ROT_TABLE[doublet][4])
-        self.z = ORIGINAL_ROT_TABLE[doublet][2]
-        self.doublet = doublet
-
-class table_rotation(rotation):
-    def __init__(self):
-        self.dict = {doublet : rotation(doublet) for doublet in ORIGINAL_ROT_TABLE}
-
-table1 = table_rotation()
-# print(table1.dict["AA"].x)
-
-#table1.dict --> {'AA': <__main__.rotation object at 0x000001A722E1BAC8>, 'AC': <__main__.rotation object at 0x000001A722E1BB00>, 'AG': <__main__.rotation object at 0x000001A729A66A58>, 'AT': <__main__.rotation object at 0x000001A729A66A20>, 'CA': <__main__.rotation object at 0x000001A729A669E8>, 'CC': <__main__.rotation object at 0x000001A729A66A90>, 'CG': <__main__.rotation object at 0x000001A729A66B00>, 'CT': <__main__.rotation object at 0x000001A729A66B70>, 'GA': <__main__.rotation object at 0x000001A729B88D68>, 'GC': <__main__.rotation object at 0x000001A729B88DA0>, 'GG': <__main__.rotation object at 0x000001A729B88DD8>, 'GT': <__main__.rotation object at 0x000001A729B88E10>, 'TA': <__main__.rotation object at 0x000001A729B88E48>, 'TC': <__main__.rotation object at 0x000001A729B88E80>, 'TG': <__main__.rotation object at 0x000001A729B88EB8>, 'TT': <__main__.rotation object at 0x000001A729B88EF0>}
-#table1.dict["AA"] ---> <__main__.rotation object at 0x000001A722E1BAC8> (qui est l'object rotation)
-#table1.dict["AA"].x ---> 35.67097790545279 (rotation selon x de AA)
\ No newline at end of file
diff --git a/population.py b/population.py
index 43e376243cc37465be7f0bbc2c925033f79a966b..ac2fba17b0c4d08ed24302b06e3ccbdff4a0c9d5 100644
--- a/population.py
+++ b/population.py
@@ -1,4 +1,3 @@
-
 from random import *
 from individu import Individu
 from RotTable import RotTable
@@ -14,9 +13,6 @@ class Population:
         """Fonction qui renvoie une nouvelle instance de population a partir d'une liste d'individus"""
         self.n = len(liste_individus)
         self.indiv = liste_individus
-        for i in range(0,self.n):
-            self.indiv[i].evaluate()
-
         return self
 
     def selection_p_best(self,p=None):
@@ -73,7 +69,7 @@ class Population:
             
             x=self.indiv[m]
             y=self.indiv[t]
-            if x.score<=y.score:
+            if x.score<y.score:
                 newself.append(x)
             else:
                 newself.append(y)
@@ -142,7 +138,7 @@ class Population:
             for child in couple_enfant :
                 lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")]
                 brin = ''.join(lineList[1:])
-                child.mutation(proba_mutation)
+                child.mutation_close_values(proba_mutation, number_of_mutations = 2)
                 child.evaluate()
             newself.append(couple_enfant[0])
             newself.append(couple_enfant[1])
@@ -191,5 +187,6 @@ def test2():
 
 
 
+