private Chromosome mutate(Chromosome individual){
        ArrayList<LinkGene> linkGenes = individual.getLinkGenes();
        ArrayList<LinkGene> newLinkGenes = new ArrayList<LinkGene>();
        for(LinkGene l: linkGenes) {
            double newWeight = l.getWeight();
            if(Math.random() < mutationProbability) {
                newWeight = l.getWeight() * Math.random() * 2;
                if(Math.random() < 0.2){
                    newWeight = -newWeight;
                }
            }
            boolean newActivation = l.isActivated();
            if (Math.random() < mutationProbability) {
                newActivation = !l.isActivated();
            }
            LinkGene newGene = new LinkGene(l.getStartLayer(),l.getStartNode(),l.getEndNode(),newWeight,newActivation);
            newLinkGenes.add(newGene);
        }
        return new Chromosome(individual.getNetworkGene(),newLinkGenes);
    }