summaryrefslogtreecommitdiff
path: root/prolog/problems/family_relations/father_2
diff options
context:
space:
mode:
authorAleksander Sadikov <sasha@fri.uni-lj.si>2015-09-22 17:57:04 +0200
committerAleksander Sadikov <sasha@fri.uni-lj.si>2015-09-22 17:57:04 +0200
commitc50452d81b08d54b734f1da73b736bfbc2997215 (patch)
tree03c64486fb259b97fa7330849990dac76e14c74c /prolog/problems/family_relations/father_2
parentcb71b2083b2f87b2f0466577dbe3e11efe22410c (diff)
New problems with hints for famrel section added.
This practically completes famrel section without some details.
Diffstat (limited to 'prolog/problems/family_relations/father_2')
-rw-r--r--prolog/problems/family_relations/father_2/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/prolog/problems/family_relations/father_2/common.py b/prolog/problems/family_relations/father_2/common.py
index 22c9b48..cbfbcab 100644
--- a/prolog/problems/family_relations/father_2/common.py
+++ b/prolog/problems/family_relations/father_2/common.py
@@ -74,9 +74,10 @@ def hint(program, solved_problems):
# this hint has to be before the next two
# as otherwise those two would always override it
# and not convey the same (amount of) help/information
+ # warning: due to speed considerations this (48) is knowledge base dependent
+ # independent: findall(_, (parent(X, Y) ; male(X)), L2)
if prolog.util.Token('SEMI', ';') in tokens and prolog.engine.ask_truth(engine_id,
- 'findall(_, father(X, Y), L1), length(L1, N), \
- findall(_, (parent(X, Y) ; male(X)), L2), length(L2, N)'):
+ 'findall(_, father(X, Y), L), length(L, 48)'):
return [{'id': 'or_instead_of_and'}]
# X must be male