Popper icon indicating copy to clipboard operation
Popper copied to clipboard

Adding direction to unneccessary predicate seems to cause stopping finding a solution

Open adam-antonik opened this issue 2 years ago • 2 comments

If I have bk edge(1,2). edge(2,3). edge(3,4). edge(5,5). geq(A,B):- nonvar(A), nonvar(B), A >= B.

with bias head_pred(path,2). body_pred(edge,2).

and examples pos(path(1,2)). pos(path(1,3)). pos(path(2,4)). neg(path(1,5)). neg(path(2,5)).

then Popper will find that desired fact that path is the transitive closure of edge. If I add to bias body_pred(gte,2). then it will find something else, due to the small number of example. But if I also add direction(gte,(in,in)). then it will halt straight away, exploring no hypotheses, saying "NO SOLUTION FOUND"

Presumably I'm setting up something wrong here, but I can't see at all what it is.

adam-antonik avatar Jun 23 '22 11:06 adam-antonik

Popper currently cannot learn with partial directions (#31), if you add the following it should find the same hypothesis:

direction(path,(in,out)).
direction(edge,(in,out)).

celinehocquette avatar Jun 23 '22 11:06 celinehocquette

Ah, I see. This would probably be a good thing to add to the main readme under "Directions"

adam-antonik avatar Jun 23 '22 12:06 adam-antonik