From 0c2903fd70640db28e549485c262aaeaa7e79ad9 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Mon, 29 Feb 2016 20:56:12 +0100 Subject: Improved hints for ancestor/2. "Timeout results as False" ask_truthTO() function added. --- prolog/problems/family_relations/ancestor_2/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prolog/problems/family_relations') 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'}] -- cgit v1.2.1