-
Notifications
You must be signed in to change notification settings - Fork 36
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
Markov Chain -- dSharp compiler results in prob >1 #113
Comments
You most likely intended to use annotated disjunctions. 0.2::init(state(s1)).
0.8::init(state(s2)). means there is 0.2 probability that Annotated disjunctions, like the one below, imply a mutual exclusivity constraint such that this rule makes 0.2::init(state(s1)) ; 0.8::init(state(s2)). By using 0.2::init(state(s1)) ; 0.8::init(state(s2)).
Hope that helps. |
Thank you very much for the explanation, helped a lot! |
Perhaps also good to be aware of in your program, your 0.8::next(s1,s1, Step).
0.2::next(s1,s2, Step).
0.3::next(s2,s2, Step).
0.4::next(s2,s3, Step).
0.3::next(s2,s1, Step).
0.7::next(s3,s3, Step).
0.3::next(s3,s1, Step). where the connection between s1 to s2 may differ per timestep. (This comment is on top of the annotated disjunction you probably wanted to use here.) |
Oh, thanks. Now it works as intended. Thank you very much! |
I adapted the program in this way
It works as intended but if I pump up the number of steps (e.g. 40) it will return strange results:
Is it some sort of overflow? For other numbers of steps < ~35 it works as intended |
That output is very concerning, thanks for reporting! It will require some deeper investigation, but for now I have the following information and workaround:
Swapping dsharp with c2d.
Debugging information (for myself)The dsharp compiler produces a wrong d-DNNF.
|
Thanks for the answer, the workaround works |
Glad the workaround works! This is potentially related to the following bug QuMuLab/dsharp#12 |
I wrote a simple program that describes a Markov chain composed by 3 states and the relative transition probabilities:
When I run this, the returned probability is not the one that it is found with the classic formula (e.g. probability found with problog to be in the state s1 after 1 step is 0.3616 but the real one is 0.4). There is something that I'm missing with the probability calculation done by problog or there are errors in this simple program? Thanks
The text was updated successfully, but these errors were encountered: