diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-02-10 18:02:28 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2016-02-10 18:02:28 +0100 |
commit | b0a64cfb0e2c556aeb22bef25d34b0aa0d9f78b8 (patch) | |
tree | dafc948daa5e40dc35c7ade7825bbf0fc2cb838e /monkey | |
parent | fb0928d87e099bfe27c35808731975f52787ae4d (diff) |
monkey: modify cutoff for adding candidate programs to the queue
Queue size is not a problem since the switch to AST-based edits.
Diffstat (limited to 'monkey')
-rw-r--r-- | monkey/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monkey/__init__.py b/monkey/__init__.py index 79dfe2d..167d0f2 100644 --- a/monkey/__init__.py +++ b/monkey/__init__.py @@ -91,7 +91,7 @@ def fix(code, edits, test, timeout=30, debug=False): # Otherwise generate new solutions. for new_program, new_step, new_cost in step(program, path): new_path_cost = path_cost * new_cost - if new_path_cost < 0.01: + if len(todo) > 500 and new_path_cost < 0.001: continue new_path = path + (new_step,) todo.push((new_program, new_path, new_path_cost), -new_path_cost) |