AI, Python, Heredity, Joint Probability, Bayesian Networks.
reader = csv.DictReader(f) for row in reader: name = row["name"] data[name] = { "name": name, "mother": row["mother"] or None, "father": row["father"] or None, "trait": (True if row["trait"] == "1" else False if row["trait"] == "0" else None) } return data def powerset(s): """ Return a list of all