|
Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
Genomes in EVOLIFE are defined as a binary strings. More...
Classes | |
| class | DNA |
| class DNA: individuals' 'DNA' defined as a string of bits More... | |
Functions | |
| def | read_DNA (self, start, end, coding=None) |
| reads a chunk of DNA More... | |
| def | hamming (self, alter) |
| computes the Hamming distance between two DNA strings More... | |
| def | get_DNA (self) |
| returns DNA as a tuple More... | |
| def | display (self) |
| def | save (self) |
Variables | |
| bool | NUMPY = False |
| pos = random.randint(0, self.nb_nucleotides - 1) | |
| mutation_number = (mutation_rate * self.nb_nucleotides) / 1000 if randint(1,1000) < 1 + ((mutation_rate * self.nb_nucleotides) % 1000) : mutation_number += 1 performing mutations More... | |
| value = Tools.GrayTable.Gray2Int(value) | |
| value += self.__dna[pos]* 2 ** (end - 1 - pos) More... | |
| mother = DNA(9, Blank=False) | |
| father = DNA(9, Blank=False) | |
| child = DNA(9) | |
Genomes in EVOLIFE are defined as a binary strings.
The way the genome string is implemented (e.g. list of binary numbers
or bits compacted into integers) should remain private to this module
| def Evolife.Genetics.DNA.get_DNA | ( | self | ) |
| def Evolife.Genetics.DNA.hamming | ( | self, | |
| alter | |||
| ) |
| def Evolife.Genetics.DNA.read_DNA | ( | self, | |
| start, | |||
| end, | |||
coding = None |
|||
| ) |
| Evolife.Genetics.DNA.pos = random.randint(0, self.nb_nucleotides - 1) |