Browse Source

Put make old mutations probabilities

Yann Weber 6 years ago
parent
commit
14cc814989
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      gte/mutator.py

+ 5
- 3
gte/mutator.py View File

@@ -40,14 +40,16 @@ def mutate(expr, force = True, mutcount = 1):
40 40
     return res
41 41
 
42 42
 def mutatef(expr, mutcount = 1):
43
+    """
43 44
     mutations = [mutadd] * 3
44 45
     if len(expr) > 1:
45 46
         mutations += [mutdel] * 3
46 47
     mutations += [mutupdtype for _ in range(3)]
47 48
     mutations += [mutupdval for _ in range(6)]
48
-    #mutations = [mutadd, mutdel]
49
-    #mutations += [mutupdtype for _ in range(3)]
50
-    #mutations += [mutupdval for _ in range(6)]
49
+    """
50
+    mutations = [mutadd, mutdel]
51
+    mutations += [mutupdtype for _ in range(3)]
52
+    mutations += [mutupdval for _ in range(6)]
51 53
     res = copy.copy(expr)
52 54
     for _ in range(mutcount):
53 55
         mutations[randint(0, len(mutations)-1)](res)

Loading…
Cancel
Save