From b0a64cfb0e2c556aeb22bef25d34b0aa0d9f78b8 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 10 Feb 2016 18:02:28 +0100 Subject: monkey: modify cutoff for adding candidate programs to the queue Queue size is not a problem since the switch to AST-based edits. --- monkey/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monkey') 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) -- cgit v1.2.1