function mutate(genome) for mutation,rate in pairs(genome.mutationRates) do if math.random(1,2) == 1 then genome.mutationRates[mutation] = 0.95*rate else genome.mutationRates[mutation] = 1.05263*rate end end if math.random() < genome.mutationRates["connections"] then pointMutate(genome) end local p = genome.mutationRates["link"] while p > 0 do if math.random() < p then linkMutate(genome, false) end p = p - 1 end p = genome.mutationRates["bias"] while p > 0 do if math.random() < p then linkMutate(genome, true) end p = p - 1 end p = genome.mutationRates["node"] while p > 0 do if math.random() < p then nodeMutate(genome) end p = p - 1 end p = genome.mutationRates["enable"] while p > 0 do if math.random() < p then enableDisableMutate(genome, true) end p = p - 1 end p = genome.mutationRates["disable"] while p > 0 do if math.random() < p then enableDisableMutate(genome, false) end p = p - 1 end end Yours: function mutate(genome) for mutation,rate in pairs(genome.mutationRates) do if math.random(1,2) == 1 then genome.mutationRates[mutation] = 0.95*rate else genome.mutationRates[mutation] = 1.05263*rate end end if math.random() 0 do if math.random()

0 do if math.random()

0 do if math.random()

0 do if math.random()

0 do if math.random() < p then enableDisableMutate(genome, false) end p = p - 1 end end