Here is a famous paradox in probabilities. "A couple has 2 children. One of them is a girl. What is the probability that the other one is a boy? Answer: 2/3." The point here is not to explain the paradox but to model it in ProbLog. Given the following program:
:- use_module(library(lists)).
1/2::child(N, boy); 1/2::child(N, girl).
children(A,B) :- child(1, A), child(2,B).
has_girl :- children(A,B), member(girl, [A,B]).
has_boy :- children(A,B), member(boy, [A,B]).
two_girls :- children(girl, girl).
evidence(has_girl).
What is the query that will return the answer?