Example #1
0
    def init_scene(self):
        self.scene = Scene.load_from_file(self.scene_file, self.scene_speed,
                                          self.SIDE_PANEL_WIDTH)

        for obj in self.scene.objects:
            if issubclass(type(obj), Light):
                self.lights.append(obj)
 def initialize(self):
     self.scene = Scene.load_from_file(self.scene_file, self.scene_speed,
                                       self.SIDE_PANEL_WIDTH)
     self.screen = self.scene.screen
     self.side_panel = SidePanel(self.scene, self.population_num)
     self.engine = GaEngine(self.scene, self.side_panel,
                            self.population_num, self.elitism_num,
                            self.robot_random_direction, self.multicore,
                            self.obstacle_sensor_error,
                            self.mutation_probability,
                            self.mutation_coefficient, self.selection_ratio,
                            self.long_lasting_generations, self.verbose)