summaryrefslogtreecommitdiff
path: root/prolog/problems
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-02-29 20:56:12 +0100
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-02-29 20:56:12 +0100
commit0c2903fd70640db28e549485c262aaeaa7e79ad9 (patch)
tree84f42d29250d0a0e8370d690cfc3298e00a866d7 /prolog/problems
parent6a220f4485994af4103424a72d27153c4dd65a25 (diff)
Improved hints for ancestor/2. "Timeout results as False" ask_truthTO() function added.
Diffstat (limited to 'prolog/problems')
-rw-r--r--prolog/problems/family_relations/ancestor_2/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/prolog/problems/family_relations/ancestor_2/common.py b/prolog/problems/family_relations/ancestor_2/common.py
index ad306ee..3b70227 100644
--- a/prolog/problems/family_relations/ancestor_2/common.py
+++ b/prolog/problems/family_relations/ancestor_2/common.py
@@ -84,7 +84,7 @@ def hint(code, aux_code):
# missing/failed base case
# TODO: how will ask_truth handle/return timeouts...
# TODO: timeout is the same as fail in this particular case
- if prolog.engine.ask_truth(engine_id,
+ if prolog.engine.ask_truthTO(engine_id,
'findall(X/Y, parent(X, Y), L), member(X/Y, L), \+ ancestor(X, Y)'):
return [{'id': 'base_case'}]