Ejemplo n.º 1
0
def runReverseEngine(aq, MIN_DNA, MAX_DNA, WIDTH, HEIGHT):
        aq.DEATH_AGE = 75
        aq.ATTRACT = -1
        for i in range(aq.MAX_CELL_COUNT // 5):
            cell = Cell(aq, random.randint(MIN_DNA, MAX_DNA), Vec(WIDTH // 2 + random.randint(-100, 100), HEIGHT // 2 + random.randint(-100, 100)))
            aq.cells.append(cell)
            cell.attract = 1
Ejemplo n.º 2
0
def RunDual(aq, MIN_DNA, MAX_DNA, WIDTH, HEIGHT):
    randDNA = random.randint(MIN_DNA, MAX_DNA)
    cell = Cell(aq, randDNA, Vec(WIDTH // 2 + 100, HEIGHT // 2 + 100))
    aq.cells.append(cell)
    cell = Cell(aq, randDNA, Vec(WIDTH // 2 - 100, HEIGHT // 2 - 100))
    aq.cells.append(cell)
    cell.color = [150, 150, 150]
    aq.SINGLE_CELLED = False
    aq.LINK_ENERGY = 0.05
    aq.MAX_CELL_COUNT = 32
Ejemplo n.º 3
0
def runPopulationAttract(aq, MIN_DNA, MAX_DNA, WIDTH, HEIGHT):
    aq.DEATH_AGE = 1.2 * MAX_DNA // 1
    cell = Cell(aq, MIN_DNA, Vec(WIDTH // 2 + random.randint(-100, 100), HEIGHT // 2 + random.randint(-100, 100)))
    aq.cells.append(cell)
    cell.color = [150, 25, 25]
    cell = Cell(aq, (MIN_DNA + MAX_DNA) // 2, Vec(WIDTH // 2 + random.randint(-100, 100), HEIGHT // 2 + random.randint(-100, 100)))
    aq.cells.append(cell)
    cell.color = [25, 150, 25]
    cell = Cell(aq, MAX_DNA, Vec(WIDTH // 2 + random.randint(-100, 100), HEIGHT // 2 + random.randint(-100, 100)))
    aq.cells.append(cell)
    cell.color = [25, 25, 150]
Ejemplo n.º 4
0
def RunMove(aq, MIN_DNA, MAX_DNA, WIDTH, HEIGHT):
    randDNA = random.randint(MIN_DNA, MAX_DNA)
    cell = Cell(aq, randDNA, Vec(WIDTH // 2 + 100, HEIGHT // 2 + 100))
    aq.cells.append(cell)
    aq.SINGLE_CELLED = False
    aq.LINK_ENERGY = 0.001
    aq.MAX_CELL_COUNT = 32
Ejemplo n.º 5
0
 def __init__(self, aq, dna, pos):
     aq.SINGLE_CELLED = False
     Cell.__init__(self, aq, dna, pos)
Ejemplo n.º 6
0
def runSingle(aq, MIN_DNA, MAX_DNA, WIDTH, HEIGHT):
        for i in range(aq.MAX_CELL_COUNT // 3):
            cell = Cell(aq, random.randint(MIN_DNA, MAX_DNA), Vec(WIDTH // 2 + random.randint(-100, 100), HEIGHT // 2 + random.randint(-100, 100)))
            aq.cells.append(cell)