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

Apparent problem with subquery/3 #102

Open
theresasturn opened this issue May 18, 2023 · 2 comments
Open

Apparent problem with subquery/3 #102

theresasturn opened this issue May 18, 2023 · 2 comments

Comments

@theresasturn
Copy link

Hi

I'm trying to write a problog program in which I can repeatedly reset evidence/2 facts so that I can compute probabilities under differing sets of evidence. In addition, I'd like to use subquery/3 so that I can obtain the probability of a query from within the Prolog level.

I've distilled my program into a small example. If you run it, you'll see that the result for l1 via subquery is different than via query; i.e., it writes out:

l1(0.004232)
iterate1: 1
l1: 0

It would appear that within subquery, evidence is not considered true or false?
subquery_issue.txt

@VincentDerk
Copy link
Collaborator

The list of evidence in subquery should be as follows:

iterate1:-
    subquery(l1,Prob,
	     [\+known(nothing), known(in_city)]),
    writeln(l1(Prob)).

@theresasturn
Copy link
Author

theresasturn commented May 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants