A New Scoring Function for Bayesian Network Structure Learning Extended to Arbitrary Discrete Variables