Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexible probabilities with ProbLog syntax #43

Closed
damianoazzolini opened this issue Feb 1, 2022 · 1 comment
Closed

Flexible probabilities with ProbLog syntax #43

damianoazzolini opened this issue Feb 1, 2022 · 1 comment

Comments

@damianoazzolini
Copy link
Collaborator

Flexible probabilities does not work using the ProbLog syntax.
For example, the current program yields a wrong probability value (0.5) for the query smokes(1):

person(1).
person(2).
person(3).
friend_of(1,2,0.51).
friend_of(2,1,0.56).

0.5::fp(X) :- person(X).
smokes(X) :- fp(X).

P::influences(X,Y) :- friend_of(X,Y,P).
smokes(X) :- smokes(Y), influences(X,Y).

while, if the line with the flexible probability is rewritten as

influences(X,Y):P :- friend_of(X,Y,P).

the computed probability is correct (0.6275).
Tested on cplint on swish (online).

friguzzi added a commit that referenced this issue Feb 1, 2022
Flexible probabilities with ProbLog syntax
@friguzzi
Copy link
Owner

friguzzi commented Feb 2, 2022

solved with commit 6652d09

@friguzzi friguzzi closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants