Skip to content

Commit

Permalink
fixed #12
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaGupta1 committed Oct 3, 2018
1 parent 915cc10 commit 8b7b71d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WarIO.lua
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ function newGenome(oldGenome)
mean = round(mean / numberToBreed)

if (mean <= lastMean) then
mutationRate = math.min(mutationRate + 0.01, 0.1)
staleGenerations = staleGenerations + 1
else
mutationRate = baseMutationRate
staleGenerations = 0
end

mutationRate = math.min(baseMutationRate + 0.01 * staleGenerations, 0.2)

local deltaMean = mean - lastMean
if (deltaMean > 0) then
deltaMean = "+" .. deltaMean
Expand Down

0 comments on commit 8b7b71d

Please sign in to comment.