def from_json_world(cls, min_pheromone_dropped_by_ant, max_pheromone_dropped_by_ant, json_world): world = World.from_json(json_world) environment_parameters = EnvironmentParameters.from_world(world, min_pheromone_dropped_by_ant, max_pheromone_dropped_by_ant) return Reality(world, environment_parameters)
def create_reality(cls, min_pheromone_dropped_by_ant, max_pheromone_dropped_by_ant, number_of_dimensions, *args, **kwargs): generator = cls.get_generator(number_of_dimensions, *args, **kwargs) world = generator.generate() environment_parameters = EnvironmentParameters.from_world(world, min_pheromone_dropped_by_ant, max_pheromone_dropped_by_ant) return Reality(world, environment_parameters)