Exemple #1
0
 def render(self, surface):
     draw_hex_map(surface, self.hmap, self._draw_hex)
     draw_text(surface, (2, 10), "Num cells:%i" % len(self.cells))
     draw_text(surface, (2, 50),
               "legroom fitness:%f" % self.legroom_fitness)
     draw_text(surface, (2, 70), "FOS fitness :%f" % self.fos_fitness)
     draw_text(surface, (2, 90), "balance :%f" % self._balance_fitness())
     draw_text(surface, (2, 110), "total fitness :%f" % self.total_fitness)
Exemple #2
0
    def render(self, surface):
        max_value = self.values.max()
        draw_text(surface, (2, 10),
                  "Morphogens (%i genes)" % len(self.module.genes))
        draw_text(surface, (2, 30), "Max :%f" % max_value)

        hmap = Map(self.simulation.bounds)
        # hmap.values = self.values
        draw_hex_map(surface, hmap, self._draw_hex)
Exemple #3
0
    def render(self, surface):
        max_light = self.simulation.bounds[1]
        total_light = 0

        for cell in self.simulation.cells:
            total_light += cell.userData['light']

        draw_hex_map(surface, self.simulation.hmap, self._draw_hex)
        draw_text(surface, (10, 10), "light:%f"%total_light)
        draw_text(surface, (10, 30), "light_percentage:%f"%(total_light/max_light))
Exemple #4
0
    def render(self, surface):
        draw_text(surface, (2, 10), "Num genes:%i" % len(self.module.genes))

        max_value = 0
        for cell in self.simulation.cells:
            for gene in self.module.genes.values():
                max_value = max(max_value, max(cell.userData[gene.key()]))

        draw_text(surface, (2, 30), "Max :%f" % max_value)
        draw_hex_map(surface, self.simulation.hmap, self._draw_hex)
Exemple #5
0
 def render(self, surface):
     draw_hex_map(surface, self.hmap, self._draw_hex)
     draw_text(surface, (2, 10), "Num cells:%i" % len(self.cells))
     draw_text(surface, (2, 30), "Fitness :%f" % self.fitness())
Exemple #6
0
 def render(self, surface):
     draw_hex_map(surface, self.water_map, self._draw_hex)
     draw_text(surface, (10, 10),
               "water_collection:%f" % self.water_collection)