Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Length of a gene, in bytes. GENELEN = 4 // A gene contains four bytes for a signed integer. MAXGENEVAL = (2147483647.0) )
Variables ¶
This section is empty.
Functions ¶
func CompareSequence ¶
Compare two genetic sequences to see if they match.
Types ¶
type Dna ¶
type Dna struct {
// contains filtered or unexported fields
}
A full sequence of genetic information. This is variable in length, as the amount of genetic information is dependent on the brain's structure.
func NewDna ¶
func NewDna() *Dna
Generate a new sequence of DNA. This is initially empty, until populated.
func (*Dna) Breed ¶
Breed with an external DNA strand to produce a child sequence. Simulate genetic recombination, rather than randomly picking genes from each.
Click to show internal directories.
Click to hide internal directories.