Skip to content

Commit 3f0d7e3

Browse files
authored
Merge pull request #65 from ccnmtl/bugfix-ndittren
If solution is reached, no need for hints
2 parents 807f089 + 717a462 commit 3f0d7e3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

logictools/next_step.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ def next_step(next_expr, next_rule, step_list, target):
1919
hintRule: next rule hint
2020
}
2121
"""
22+
2223
cur_expr = step_list[-1]
2324
response = validate_and_get_frontier(cur_expr, next_expr, next_rule, target)
2425

2526
# super hacky placeholder for search
26-
idx = int(time.time() % len(response["nextFrontier"]))
27-
28-
hint = response["nextFrontier"][idx]
29-
response["hintExpression"], response["hintRule"] = hint
27+
if response["nextFrontier"]:
28+
idx = int(time.time() % len(response["nextFrontier"]))
29+
hint = response["nextFrontier"][idx]
30+
response["hintExpression"], response["hintRule"] = hint
3031

3132
return response

0 commit comments

Comments
 (0)