Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Classes | Namespaces | Functions | Variables
DNA.py File Reference

Go to the source code of this file.

Classes

class  Evolife.Genetics.DNA.DNA
 class DNA: individuals' 'DNA' defined as a string of bits More...
 

Namespaces

namespace  Evolife
 
namespace  Evolife.Genetics
 
namespace  Evolife.Genetics.DNA
 Genomes in EVOLIFE are defined as a binary strings.
 

Functions

def Evolife.Genetics.DNA.read_DNA (self, start, end, coding=None)
 reads a chunk of DNA More...
 
def Evolife.Genetics.DNA.hamming (self, alter)
 computes the Hamming distance between two DNA strings More...
 
def Evolife.Genetics.DNA.get_DNA (self)
 returns DNA as a tuple More...
 
def Evolife.Genetics.DNA.display (self)
 
def Evolife.Genetics.DNA.save (self)
 

Variables

bool Evolife.Genetics.DNA.NUMPY = False
 
 Evolife.Genetics.DNA.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...
 
 Evolife.Genetics.DNA.value = Tools.GrayTable.Gray2Int(value)
 value += self.__dna[pos]* 2 ** (end - 1 - pos) More...
 
 Evolife.Genetics.DNA.mother = DNA(9, Blank=False)
 
 Evolife.Genetics.DNA.father = DNA(9, Blank=False)
 
 Evolife.Genetics.DNA.child = DNA(9)