def is_valid(parameters): return True # yolo domains = species.domains() covered = set() for param in parameters: covered.add(param) value = parameters[param] if value not in domains[param]: return False return covered == set(domains.keys())
def random_individual_parameters(): parameters = {} domains = species.domains() for param in domains: parameters[param] = random.choice(domains[param]) return parameters