forked from: Bayes learning simulation

