This code implements a Baysian Network.