-
Notifications
You must be signed in to change notification settings - Fork 34
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
CODE WITH CIRCULARITY #115
Comments
Hi ProbLog has cycle breaking to unroll cyclically defined rules. Here, it is first good to see that only the cyclical rules by themselves do not actually cause rain or snow to be true. If you comment out the first two lines, all query probabilities become 0. The program you've given is equivalent to
Which is acyclical. |
Thank you very much. This acyclic approach simplifies the understanding of
the model and eliminates the need for the iterations I explored (with
possible convergence problems), making the computational process more
transparent and efficient. It shows how reframing a Problog program can
help clarify the underlying logic and avoid unnecessary complications
associated with the need for iterations.
Le lun. 6 mai 2024 à 11:15, Robin Manhaeve ***@***.***> a
écrit :
… Hi
ProbLog has cycle breaking to unroll cyclically defined rules. Here, it is
first good to see that only the cyclical rules by themselves do not
actually cause rain or snow to be true. If you comment out the first two
lines, all query probabilities become 0.
The program you've given is equivalent to
0.4::rain_fact.
0.1::snow_fact.
rain :- rain_fact.
0.2::rain :- snow_fact.
snow :- snow_fact.
0.1::snow :- rain_fact.
precipitation :- rain.
precipitation :- snow.
melt :- rain, snow.
query(precipitation).
query(melt).
query(rain).
query(snow).
Which is acyclical.
—
Reply to this email directly, view it on GitHub
<#115 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF46KYPSX6G6PDJEONQ4OT3ZA5C2BAVCNFSM6AAAAABHG7KU5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVGUZDONBWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I find it hard to understand how Problog2 manages to calculate this code where there is circularity between the predicates rain and snow.
0.4::rain.
0.1::snow.
0.2::rain :- snow.
0.1::snow :- rain.
precipitation :- rain.
precipitation :- snow.
melt :- rain, snow.
query(precipitation).
query(melt).
query(rain).
query(snow).
The text was updated successfully, but these errors were encountered: