private void addNewNeuron(){
    	
    	Neuron worst_neuron1=null, worst_neuron2=null;
		
		/*
		 * We search for the worst neuron
		 */
		double worst_dist1  =  erreurs.get(0);
		worst_neuron1 = neurons.get(0).get(0);
		
		for (int i = 1 ; i < neurons.get(0).size() ; i++) {
			
		    if (erreurs.get(i) > worst_dist1) {
		    	worst_dist1 = erreurs.get(i);
				worst_neuron1 = neurons.get(0).get(i);
		    }	
		    
		}
		
		/*
		 * We search for the worst neighbor of this neuron
		 */
		double worst_dist2  = 0;
		worst_neuron2 = neurons.get(0).get(1);
		
		for (Neuron neighbor : worst_neuron1.getNeighbors()) {
			
			int index_neighbor = neurons.get(0).indexOf(neighbor);
		    
		    if (erreurs.get(index_neighbor) > worst_dist2) {
				worst_dist2  = erreurs.get(index_neighbor);
				worst_neuron2 = neurons.get(0).get(index_neighbor);
		    }
		    
		}
	    
		/*
		 * We add a new neuron between these two worst neurons
		 */
		
		//We create a new neuron
		int neurons_number = neurons.get(0).size();
		Neuron new_neuron = new Neuron(2, neurons_number, 0, true);
		neurons.get(0).add(new_neuron);
		
		ArrayList<Float> weight_worse1 = worst_neuron1.getPoids();
		ArrayList<Float> weight_worse2 = worst_neuron2.getPoids();
		
		ArrayList<Float> weight_new = new ArrayList<Float>();

		//We set the weight of the new neuron to the average of the two worst 
		for (int i = 0 ; i < weight_worse1.size(); i++)
			weight_new.add((weight_worse1.get(i)+weight_worse2.get(i))/2);

		new_neuron.setPoids(weight_new);
		
		//We add the error of the new neuron
		erreurs.add(neurons_number, (worst_dist1+worst_dist2)/2);
		
		//We change errors of the two worst neurons
		int index_worst1 = neurons.get(0).indexOf(worst_neuron1);
		int index_worst2 = neurons.get(0).indexOf(worst_neuron2);
		erreurs.set(index_worst1, worst_dist1  - alpha * worst_dist1);
		erreurs.set(index_worst2, worst_dist2  - alpha * worst_dist2);
		
		//We change errors of all neurons
		for (int i = 0 ; i < neurons.get(0).size() ; i++) {
		    double erreur = erreurs.get(i);
		    erreurs.set(i, erreur-beta*erreur);
		}
		
		/*
		 * We connect the new neuron to the two winners
		 */
		
		//We create new neighbors' list and add the 2 worst to them
		new_neuron.setNeighbors(new ArrayList<Neuron>());
		new_neuron.getNeighbors().add(worst_neuron1);
		new_neuron.getNeighbors().add(worst_neuron2);
		
		//We create and set ages of these new connections
		ages.add(neurons_number, new ArrayList<Integer>()); 
		ages.get(neurons_number).add(0);
		ages.get(neurons_number).add(0);

		/*
		 * We change neighborhoods between the two worst neurons
		 */
		
		//We change the direct link worst1 -> worst2 to worst1 -> new
		int index_neighbor1 = worst_neuron1.getNeighbors().indexOf(worst_neuron2);
		worst_neuron1.getNeighbors().set(index_neighbor1, new_neuron);
		
		//We change the direct link worst2 -> worst1 to worst2 -> new
		int index_neighbor2 = worst_neuron2.getNeighbors().indexOf(worst_neuron1);
		worst_neuron2.getNeighbors().set(index_neighbor2, new_neuron);

		//We reset the age of these connections
		ages.get(index_worst1).set(index_neighbor1, 0);
		ages.get(index_worst2).set(index_neighbor2, 0);
		
    }