Number of clauses are larger than max_clause/1
Closed this issue · 2 comments
hakank commented
In my krki example (http://hakank.org/popper/krki/) the bias.pl contains max_clause(7)
, i.e. allow up to 7 clauses.
max_vars(8).
max_body(4).
max_clauses(7).
head_pred(illegal,6).
body_pred(adj,2).
body_pred(eq,2).
Here are the bk.pl and exs.,pl
Popper v2.0.0 finds this solution after 2min48s which has 27 clause (>> 7).
********** SOLUTION **********
Precision:1.00 Recall:0.59 TP:201 FN:140 TN:655 FP:0 Size:135
illegal(A,B,C,D,E,F):- adj(C,E),adj(G,B),adj(G,A),eq(D,F).
illegal(A,B,C,D,E,F):- adj(F,B),adj(D,A),adj(C,E),adj(E,A).
illegal(A,B,C,D,E,F):- adj(D,G),adj(G,A),adj(B,F),eq(C,E).
illegal(A,B,C,D,E,F):- adj(G,C),adj(G,D),adj(A,E),adj(B,F).
illegal(A,B,C,D,E,F):- adj(A,E),adj(C,B),adj(B,F),adj(A,D).
illegal(A,B,C,D,E,F):- eq(F,D),adj(B,E),adj(G,C),adj(A,G).
illegal(A,B,C,D,E,F):- adj(A,E),adj(G,C),adj(G,B),eq(F,D).
illegal(A,B,C,D,E,F):- adj(B,G),eq(C,E),adj(F,G),eq(A,D).
illegal(A,B,C,D,E,F):- adj(A,F),adj(C,D),eq(D,E),adj(A,B).
illegal(A,B,C,D,E,F):- adj(C,F),adj(A,B),eq(E,C),adj(D,B).
illegal(A,B,C,D,E,F):- adj(F,G),eq(C,E),adj(A,B),adj(D,G).
illegal(A,B,C,D,E,F):- adj(E,D),adj(A,B),adj(C,B),eq(F,D).
illegal(A,B,C,D,E,F):- adj(G,E),adj(C,G),eq(F,D),adj(A,B).
illegal(A,B,C,D,E,F):- eq(C,A),eq(D,B),adj(E,G),adj(F,G).
illegal(A,B,C,D,E,F):- eq(D,F),adj(E,G),adj(C,B),adj(G,A).
illegal(A,B,C,D,E,F):- adj(A,C),adj(E,G),eq(F,D),adj(B,G).
illegal(A,B,C,D,E,F):- adj(C,D),eq(C,E),adj(F,A),adj(B,E).
illegal(A,B,C,D,E,F):- adj(C,B),adj(F,A),adj(A,D),eq(C,E).
illegal(A,B,C,D,E,F):- eq(D,F),adj(F,A),adj(C,B),adj(C,E).
illegal(A,B,C,D,E,F):- adj(F,A),eq(A,C),adj(B,E),adj(D,B).
illegal(A,B,C,D,E,F):- adj(B,E),adj(C,D),eq(F,D),adj(E,A).
illegal(A,B,C,D,E,F):- adj(C,A),adj(A,E),adj(D,E),adj(F,B).
illegal(A,B,C,D,E,F):- adj(G,B),eq(C,E),adj(A,G),adj(D,F).
illegal(A,B,C,D,E,F):- adj(E,A),adj(F,B),adj(D,F),adj(C,A).
illegal(A,B,C,D,E,F):- adj(B,D),adj(C,A),eq(E,C),adj(D,F).
illegal(A,B,C,D,E,F):- adj(D,F),adj(E,A),adj(F,B),adj(E,C).
illegal(A,B,C,D,E,F):- adj(G,F),adj(G,A),eq(C,E),adj(D,B).
******************************
python3 popper.py hakank/krki 168,68s user 1,15s system 100% cpu 2:48,67 total
The program is run with default command line values:
$ python3 popper.py hakank/krki
Has the logic of max_clauses/1
in bias.pl changed in v2.0.0?
andrewcropper commented
Has the logic of max_clauses/1 in bias.pl changed in v2.0.0?
Yes, max_clauses/1 has no real meaning in v2.0.0, except when learning recursive programs or programs with predicate invention.
I’ll make a note in the release to make this change clear.
If you remove it from the bias file, it should make the example run quicker (128s on my machine).
Kind regards,
Andrew
… On 3 Jun 2022, at 07:39, Hakan Kjellerstrand ***@***.***> wrote:
In my krki example (http://hakank.org/popper/krki/) the bias.pl contains max_clause(7), i.e. allow up to 7 clauses.
max_vars(8).
max_body(4).
max_clauses(7).
head_pred(illegal,6).
body_pred(adj,2).
body_pred(eq,2).
Here are the bk.pl and exs.,pl
• http://hakank.org/popper/krki/bk.pl
• http://hakank.org/popper/krki/exs.pl
Popper v2.0.0 finds this solution after 2min48s which has 27 clause (>> 7).
********** SOLUTION **********
Precision:1.00 Recall:0.59 TP:201 FN:140 TN:655 FP:0 Size:135
illegal(A,B,C,D,E,F):- adj(C,E),adj(G,B),adj(G,A),eq(D,F).
illegal(A,B,C,D,E,F):- adj(F,B),adj(D,A),adj(C,E),adj(E,A).
illegal(A,B,C,D,E,F):- adj(D,G),adj(G,A),adj(B,F),eq(C,E).
illegal(A,B,C,D,E,F):- adj(G,C),adj(G,D),adj(A,E),adj(B,F).
illegal(A,B,C,D,E,F):- adj(A,E),adj(C,B),adj(B,F),adj(A,D).
illegal(A,B,C,D,E,F):- eq(F,D),adj(B,E),adj(G,C),adj(A,G).
illegal(A,B,C,D,E,F):- adj(A,E),adj(G,C),adj(G,B),eq(F,D).
illegal(A,B,C,D,E,F):- adj(B,G),eq(C,E),adj(F,G),eq(A,D).
illegal(A,B,C,D,E,F):- adj(A,F),adj(C,D),eq(D,E),adj(A,B).
illegal(A,B,C,D,E,F):- adj(C,F),adj(A,B),eq(E,C),adj(D,B).
illegal(A,B,C,D,E,F):- adj(F,G),eq(C,E),adj(A,B),adj(D,G).
illegal(A,B,C,D,E,F):- adj(E,D),adj(A,B),adj(C,B),eq(F,D).
illegal(A,B,C,D,E,F):- adj(G,E),adj(C,G),eq(F,D),adj(A,B).
illegal(A,B,C,D,E,F):- eq(C,A),eq(D,B),adj(E,G),adj(F,G).
illegal(A,B,C,D,E,F):- eq(D,F),adj(E,G),adj(C,B),adj(G,A).
illegal(A,B,C,D,E,F):- adj(A,C),adj(E,G),eq(F,D),adj(B,G).
illegal(A,B,C,D,E,F):- adj(C,D),eq(C,E),adj(F,A),adj(B,E).
illegal(A,B,C,D,E,F):- adj(C,B),adj(F,A),adj(A,D),eq(C,E).
illegal(A,B,C,D,E,F):- eq(D,F),adj(F,A),adj(C,B),adj(C,E).
illegal(A,B,C,D,E,F):- adj(F,A),eq(A,C),adj(B,E),adj(D,B).
illegal(A,B,C,D,E,F):- adj(B,E),adj(C,D),eq(F,D),adj(E,A).
illegal(A,B,C,D,E,F):- adj(C,A),adj(A,E),adj(D,E),adj(F,B).
illegal(A,B,C,D,E,F):- adj(G,B),eq(C,E),adj(A,G),adj(D,F).
illegal(A,B,C,D,E,F):- adj(E,A),adj(F,B),adj(D,F),adj(C,A).
illegal(A,B,C,D,E,F):- adj(B,D),adj(C,A),eq(E,C),adj(D,F).
illegal(A,B,C,D,E,F):- adj(D,F),adj(E,A),adj(F,B),adj(E,C).
illegal(A,B,C,D,E,F):- adj(G,F),adj(G,A),eq(C,E),adj(D,B).
******************************
python3 popper.py hakank/krki 168,68s user 1,15s system 100% cpu 2:48,67 total
The program is run with default command line values:
$ python3 popper.py hakank/krki
Has the logic of max_clauses/1 in bias.pl changed in v2.0.0?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
hakank commented
Great. It's faster now: 117s.