AI, Python, Heredity, Joint Probability, Bayesian Networks.
PROBS['trait'][False] if person in one_gene: joint_prob *= prob_gene[1] * prob_trait[True] elif person in two_genes: joint_prob *= prob_gene[2] * prob_trait[True] else: joint_prob *= prob_gene[0] * prob_trait[False] return joint_prob def update(probabilities, one_gene, two_genes, have_trait, p):