visenger / rockit

Automatically exported from code.google.com/p/rockit
0 stars 0 forks source link

Observed predicates #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There seems to be a problem with the following MLN, as it produces an empty 
output:

prog.mln
---------------
*Smokes(human)
Friends(human,human)

1 Friends(x,y) v Smokes("B")

evidence.db
----------------
Smokes("A")

Presumably it should return all groundings for the Friends predicate. 

Note: The problem is corrected if Smokes is declared as a query predicate

Best,
Roderick

Original issue reported on code.google.com by razor4...@gmail.com on 6 Dec 2014 at 2:34

GoogleCodeExporter commented 9 years ago
PS: Maybe Rockit is registering Smokes("B") as True and then the MAP state does 
not depend on the truth value of Friends?

Original comment by razor4...@gmail.com on 6 Dec 2014 at 2:40

GoogleCodeExporter commented 9 years ago
So far, we only support formulas in which the predicates have at least one 
variable.

Examples for supported formulas:

1.0 friends(x,"A") v ! friends("B",x).
longPredicate("A", "B", "C", "D", x, "E") v !smokes(x).

Examples for non-supported formulas:

1.0 smokes("A")
2.0 friends("A","B")
smokes(x) v !smokes("A") v !friends(x,"A").

All the examples for non-supported formulas can, however, be revised to fully 
cover their semantic. Here is an example for the second one:

prog.mln
*helperA(helperAType)
*helperB(helperBType)
friends(human,human)

2.0 !helperA(x) v !helperB(y) v friends(x,y)

evidence.db
helperA("A")
helperB("B")

Please also note, that the parameter 'convert_string_values' has to be set to 
true.  

Original comment by jan.noessner@gmail.com on 9 Dec 2014 at 3:35

GoogleCodeExporter commented 9 years ago
Let me know if you can rewrite your models accordingly. 

Original comment by jan.noessner@gmail.com on 9 Dec 2014 at 3:36

GoogleCodeExporter commented 9 years ago
Thanks, for the moment I'm fine with this information. 
It would probably be good if Rockit would raise an exception when given an atom 
with no logvars. It took me some time to nail it down. 

Original comment by razor4...@gmail.com on 19 Dec 2014 at 6:45