Your Bayesian network (BN) doesn't seem particularly complicated. I think you should easily get away with an exact inference method such as j action tree algorithm . Of course, you can still just do a brute-force search, but that would be a waste of CPU resources, since there are so many good libraries that implement smarter ways of both accurate and approximate output in graphical models.
Since C ++ is mentioned in your tag, my recommendation would be libDAI . This is a well-written library that implements several accurate and approximate conclusions on common factor graphs . It has no strange dependencies and integrates very easily into your project. It is especially suitable for individual cases, such as yours, for which you have probability tables.
Now you notice that I mentioned factor graphs. If you are not familiar with this concept, I refer you to the Wikipedia article on factor graphs , as well as What are factor graphs? and what are they useful for? . The principle is very simple: you present your BN as a factor graph, and then libDAI will make a conclusion for you.
EDIT:
Since CPU resources do not seem like a problem to you, and simplicity is the key, you can always use brute force enumeration. The idea is simple.
Your Bayesian network is a joint probability distribution that you can write in the form of an equation, for example,
P(A,B,C) = P(A|B,C) * P(B|C) * P(C)
Assuming you have tables for all of your conditional probability distributions, i.e. P(A|B, C) P(B|C) and P(C) , you can simply look at all the possible values ββof the variables A , B and C and calculate the output.
source share