-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I wrote a simple program that describes a Markov chain composed by 3 states and the relative transition probabilities:
state(s1).
state(s2).
state(s3).
0.2::init(state(s1)).
0.8::init(state(s2)).
0.8::next(s1,s1).
0.2::next(s1,s2).
0.3::next(s2,s2).
0.4::next(s2,s3).
0.3::next(s2,s1).
0.7::next(s3,s3).
0.3::next(s3,s1).
prob_reach(state(State), 0) :-
init(state(State)).
prob_reach(state(State), Steps) :-
Steps > 0,
Steps1 is Steps - 1,
next(S, State),
prob_reach(state(S), Steps1).
query(prob_reach(state(s1), 1)).
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working