Aaron Dharna
Adapted and Expanded from Damian Lyons' implementation from AI-2016
The bayesian network is represented using associative table table BayesDict the CPT is also represented as an associative table within BayesDict
BayesDict['NameofVariab'] is the node in the network
BayesDict['NameofVariab']['cpt'] is the cpt
cpt['Parent1']['Parent2']...['Parentn'] is how to look up the cpt
if A and B are the random variables in the problem, a state of the world is indicated truth values for A and B. For example ['A','B'] is a state with both true, ['A','nB'] has A true and B false, etc. so 'n' is prefixed to the name to indicate the variable is false, similar to the convention in the [Russel & Norvig's AI].
IF the BayesNet is of the correct graph structure, then Bayesian Inference will be performed on the class nodes.