Browse Source

Update mutation type proba

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

+ 5
- 5
gte/mutator.py View File

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

Loading…
Cancel
Save