Minify only at new best program time
This commit is contained in:
@@ -10,11 +10,7 @@ const instrucitonsPerFunctionStdDev = 10
|
||||
|
||||
const minifyPeriodMean = 10000
|
||||
|
||||
func Mutate(def *Definition, prog *vm.Program) {
|
||||
if rand.Intn(minifyPeriodMean) == 0 {
|
||||
def.minifyProgram(prog) // ignore error
|
||||
}
|
||||
|
||||
func Mutate(_ *Definition, prog *vm.Program) {
|
||||
target := int(rand.NormFloat64()*instrucitonsPerFunctionStdDev + instructionsPerFunctionMean)
|
||||
|
||||
if len(prog.Functions[0].Instructions) < target {
|
||||
|
||||
Reference in New Issue
Block a user