AI, Python, Heredity, Joint Probability, Bayesian Networks.
powerset(names): # Check if current set of people violates known information fails_evidence = any( (people[person]["trait"] is not None and people[person]["trait"] != (person in have_trait)) for person in names ) if fails_evidence: continue # Loop over all sets of people who might have the gene for