AI, Python, Heredity, Joint Probability, Bayesian Networks.
in probabilities: # Normalize gene probabilities gene_probs = probabilities[person]["gene"] total_gene_prob = sum(gene_probs.values()) for gene_type in gene_probs: gene_probs[gene_type] /= total_gene_prob # Normalize trait probabilities trait_probs = probabilities[person]["trait"] total_trait_prob