Skip to content

Commit

Permalink
Merge pull request #65 from ccnmtl/bugfix-ndittren
Browse files Browse the repository at this point in the history
If solution is reached, no need for hints
  • Loading branch information
sdreher authored Mar 4, 2022
2 parents 807f089 + 717a462 commit 3f0d7e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions logictools/next_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ def next_step(next_expr, next_rule, step_list, target):
hintRule: next rule hint
}
"""

cur_expr = step_list[-1]
response = validate_and_get_frontier(cur_expr, next_expr, next_rule, target)

# super hacky placeholder for search
idx = int(time.time() % len(response["nextFrontier"]))

hint = response["nextFrontier"][idx]
response["hintExpression"], response["hintRule"] = hint
if response["nextFrontier"]:
idx = int(time.time() % len(response["nextFrontier"]))
hint = response["nextFrontier"][idx]
response["hintExpression"], response["hintRule"] = hint

return response

0 comments on commit 3f0d7e3

Please sign in to comment.