def __init__(self): Genotype.__init__(self, orig_size_xyz=IND_SIZE) self.add_network(DirectEncoding(output_node_name="phase_offset", orig_size_xyz=IND_SIZE, symmetric=False), freeze=True) self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None) self.add_network(CPPN(output_node_names=["shape", "muscleOrTissue"])) self.to_phenotype_mapping.add_map( name="material", tag="<Data>", func=embedded_pill, output_type=int, dependency_order=["shape", "muscleOrTissue"], logging_stats=None) self.to_phenotype_mapping.add_output_dependency(name="shape", dependency_name=None, requirement=None, material_if_true=None, material_if_false="0") self.to_phenotype_mapping.add_output_dependency( name="muscleOrTissue", dependency_name="shape", requirement=True, material_if_true="3", material_if_false="1")
def __init__(self): Genotype.__init__(self, orig_size_xyz=IND_SIZE) #Create the network related to the phase_offset (DirectEnconding?) self.add_network( DirectEncoding( output_node_name="phase_offset", orig_size_xyz=IND_SIZE, symmetric=False, # upper_bound=0.5, lower_bound=-0.5 ), freeze=True) # self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None, # func=random_like) # self.add_network(CPPN(output_node_names=["phase_offset"])) #Map the network in the phenoptic -> it will define the phase_offset in Voxcad self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None) # self.add_network(CPPN(output_node_names=["frequency", "stiffness"])) # self.to_phenotype_mapping.add_map(name="frequency", tag="<TempPeriod>", env_kws={"frequency": freq_func}) # self.to_phenotype_mapping.add_map(name="stiffness", tag="<Stiffness>", func=stiff_func, # params=[MIN_ELASTIC_MOD, MAX_ELASTIC_MOD], # param_tags=["MinElasticMod", "MaxElasticMod"]) #Create the network responsible to shape and and define if is muscle or tissue (CPPN?) self.add_network(CPPN(output_node_names=["shape", "muscleOrTissue"])) #Map the material (after shape and muscle or tissue) -> tag Data? self.to_phenotype_mapping.add_map( name="material", tag="<Data>", func=make_material_tree, output_type=int, dependency_order=["shape", "muscleOrTissue"], logging_stats=None) #Add dependency between shape and ??? -> to define the shape of muscles? self.to_phenotype_mapping.add_output_dependency(name="shape", dependency_name=None, requirement=None, material_if_true=None, material_if_false="0") #Add dependency between shape and MuscleOrTissue -> if shape True, material 3(muscle) and if not material 1(tissue) ?? what this means self.to_phenotype_mapping.add_output_dependency( name="muscleOrTissue", dependency_name="shape", requirement=True, material_if_true="3", material_if_false="1")
def __init__(self): Genotype.__init__(self, orig_size_xyz=IND_SIZE) self.add_network( DirectEncoding( output_node_name="phase_offset", orig_size_xyz=IND_SIZE, symmetric=False, # upper_bound=0.5, lower_bound=-0.5 ), freeze=True) # self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None, # func=random_like) # self.add_network(CPPN(output_node_names=["phase_offset"])) self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None) # self.add_network(CPPN(output_node_names=["frequency", "stiffness"])) # self.to_phenotype_mapping.add_map(name="frequency", tag="<TempPeriod>", env_kws={"frequency": freq_func}) # self.to_phenotype_mapping.add_map(name="stiffness", tag="<Stiffness>", func=stiff_func, # params=[MIN_ELASTIC_MOD, MAX_ELASTIC_MOD], # param_tags=["MinElasticMod", "MaxElasticMod"]) self.add_network(CPPN(output_node_names=["shape", "muscleOrTissue"])) self.to_phenotype_mapping.add_map( name="material", tag="<Data>", func=make_material_tree, output_type=int, dependency_order=["shape", "muscleOrTissue"], logging_stats=None) self.to_phenotype_mapping.add_output_dependency(name="shape", dependency_name=None, requirement=None, material_if_true=None, material_if_false="0") self.to_phenotype_mapping.add_output_dependency( name="muscleOrTissue", dependency_name="shape", requirement=True, material_if_true="3", material_if_false="1")
def __init__(self): Genotype.__init__(self, orig_size_xyz=IND_SIZE) # self.add_network(DirectEncoding(output_node_name="phase_offset", orig_size_xyz=IND_SIZE, symmetric=False), # freeze=True) # self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None, # func=random_like) self.add_network(CPPN(output_node_names=["phase_offset"])) self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None) self.add_network(CPPN(output_node_names=["material"])) self.to_phenotype_mapping.add_map(name="material", tag="<Data>", func=one_muscle, output_type=int, logging_stats=None)
def __init__(self): Genotype.__init__(self, orig_size_xyz=IND_SIZE) self.add_network(DirectEncoding(output_node_name="phase_offset", orig_size_xyz=IND_SIZE, symmetric=False), freeze=True) self.add_network(DirectEncoding(output_node_name="material", orig_size_xyz=IND_SIZE, symmetric=False, lower_bound=0, upper_bound=3), freeze=True) self.to_phenotype_mapping.add_map(name="phase_offset", tag="<PhaseOffset>", logging_stats=None) self.to_phenotype_mapping.add_map(name="material", tag="<Data>", output_type=int, logging_stats=None)