diff options
Diffstat (limited to 'prolog/problems/family_relations')
-rw-r--r-- | prolog/problems/family_relations/aunt_2/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/prolog/problems/family_relations/aunt_2/common.py b/prolog/problems/family_relations/aunt_2/common.py index d408041..50c82b4 100644 --- a/prolog/problems/family_relations/aunt_2/common.py +++ b/prolog/problems/family_relations/aunt_2/common.py @@ -79,7 +79,9 @@ def hint(code, aux_code): # independent: match on findall(X/Y, (sister(Y, P), parent(P, X)), L) if prolog.engine.ask_truth(engine_id, 'setof(X/Y, aunt(X, Y), [alessandro/daniela, alessandro/luana, jeffrey/andrew, \ - jeffrey/melanie, patricia/susan, vanessa/john, william/andrew, william/melanie])'): + jeffrey/melanie, patricia/susan, vanessa/john, william/andrew, william/melanie])') or \ + prolog.engine.ask_truth(engine_id, + 'setof(X/Y, aunt(X, Y), [joanne/melanie, patricia/sally, susan/patricia, vanessa/sally])'): return [{'id': 'x_and_y_mixed_up'}] # precedence fail (AND block vs OR block) @@ -103,7 +105,7 @@ def hint(code, aux_code): # X and P can be the same person # this can occur if the problem is not solved using sister/2 if prolog.engine.ask_truth(engine_id, - 'aunt(X, Y), mother(X, Y)'): + 'aunt(X, Y), female(X), parent(X, Y)'): return [{'id': 'aunt_vs_mother'}] # X must have sibling |