Beispiel #1
0
    def __init__(self, rps, mutation_tendency = 0.3, potency = 0.5):
        Organism.__init__(self, mutation_tendency, potency)

# calculate the new tuple indicating the chromosone's RPS strategy
        rps_tuple = tuple([self.post_mutation_value(mutation_tendency, i) for i
            in rps]) 
        self.rps = normalize_tuple(rps_tuple)
Beispiel #2
0
    def __init__(self, ecosystem, location=None):
        Organism.__init__(self, ecosystem, location)
        self.population = 10000000

        # coccolithophores fight an interminable war with viruses:
        self.virusWaxWane = -1  # starts waning strength virus
        self.virusEfficiency = 5000  # relatively weak
Beispiel #3
0
 def __init__(self, root=None, **kw):
     """
     Creates this organism
     """
     Organism.__init__(self, **kw)
     if root == None:
         root = self.genNode()
 
     self.tree = root
Beispiel #4
0
    def __init__(self, ecosystem, location=None, isNewborn=False):
        Organism.__init__(self, ecosystem, location)

        self.lifespanTicks = 35 * 365 * 24 * 60  # years * days * hours * mins
        self.maturityTicks = 5 * 365 * 24 * 60
        self.hunger = 50
        self.starvationLevel = 100
        self.survivalProbability = .95  # they can regenerate, after all
        self.movementImpact = .1  # slowly crawl along the ocean floor
        self.__initializeAgeAndMaturity(isNewborn)
        self.__initializeSex()
Beispiel #5
0
    def __init__(self,
                 ecosystem,
                 lifespanYears,
                 maturityYears,
                 location=None,
                 isNewborn=False):
        Organism.__init__(self, ecosystem, location)

        self.lifespanTicks = lifespanYears * 365 * 24 * 60  # convert to mins
        self.maturityTicks = maturityYears * 365 * 24 * 60
        self.hunger = 10
        self.starvationLevel = 20

        self.__initializeSex()
        self.__initializeAgeAndMaturity(isNewborn)
Beispiel #6
0
    def __init__(self, ecosystem, location=None, isNewborn=False):
        Organism.__init__(self, ecosystem, location)

        if isNewborn:
            self.ticksAlive = 0
        else:  # Give insantiated manatee random age
            self.ticksAlive = random.randint(0, 60)

        # Set gender
        self.sex = "M" if random.randint(0, 1) == 0 else "F"

        # Only needed for random age setter, but either way, check maturity
        self.checkMaturity()

        # Who knew? Manatees can live up to 60 years old
        self.lifespanTicks = 60 * 365 * 24 * 60  # years * days * hours * mins
        self.survivalProbability = 0.2  # don't think they are the best survivors
        self.movementImpact = .1
        self.hunger = 50
        self.ticksSinceLastChild = 0
Beispiel #7
0
 def __init__(self, ecosystem, location=None):
     Organism.__init__(self, ecosystem, location)
     self.population = 100
     self.hunger = 50  #h unger is a percentage
Beispiel #8
0
 def __init__(self, ego, insult_strength, colour):
     Organism.__init__(self, ego, insult_strength, colour)
     self.vision = [[1, 0]]
     self.orientation = random.choice(list(Orientation))
Beispiel #9
0
 def __init__(self, genotype, parasites, mhc):
     Organism.__init__(self, genotype, parasites)
Beispiel #10
0
 def __init__(self, genotype, parasites, mhc):
     Organism.__init__(self, genotype, parasites)