This is the geco Reference Manual, version 2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:09:54 2024 GMT+0.
geco/geco.asd
geco/packages.lisp
geco/definitions/generics.lisp
geco/definitions/classes.lisp
geco/utilities/dbg.lisp
geco/utilities/random.lisp
geco/methods/chromosome-methods.lisp
geco/methods/organism-methods.lisp
geco/methods/selection-methods.lisp
geco/methods/pop-stats-methods.lisp
geco/methods/population-methods.lisp
geco/methods/genetic-plan-methods.lisp
geco/methods/ecosystem-methods.lisp
The main system appears first, followed by any subsystem dependency.
geco
GECO: Genetic Evolution through Combination of Objects A CLOS-based Framework for Prototyping Genetic Algorithms
George P. W. Williams, Jr
GPL 2.0
2.1
packages.lisp
(file).
definitions
(module).
utilities
(module).
methods
(module).
Modules are listed depth-first from the system components tree.
geco/definitions
packages.lisp
(file).
geco
(system).
generics.lisp
(file).
classes.lisp
(file).
geco/utilities
packages.lisp
(file).
geco
(system).
dbg.lisp
(file).
random.lisp
(file).
geco/methods
packages.lisp
(file).
definitions
(module).
utilities
(module).
geco
(system).
chromosome-methods.lisp
(file).
organism-methods.lisp
(file).
selection-methods.lisp
(file).
pop-stats-methods.lisp
(file).
population-methods.lisp
(file).
genetic-plan-methods.lisp
(file).
ecosystem-methods.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
geco/geco.asd
geco/packages.lisp
geco/definitions/generics.lisp
geco/definitions/classes.lisp
geco/utilities/dbg.lisp
geco/utilities/random.lisp
geco/methods/chromosome-methods.lisp
geco/methods/organism-methods.lisp
geco/methods/selection-methods.lisp
geco/methods/pop-stats-methods.lisp
geco/methods/population-methods.lisp
geco/methods/genetic-plan-methods.lisp
geco/methods/ecosystem-methods.lisp
geco/definitions/generics.lisp
definitions
(module).
allele-code-to-value
(generic function).
allele-values
(generic function).
chromosome-classes
(generic function).
compute-statistics
(generic function).
converged-p
(generic function).
convergence-fraction
(generic function).
convergence-threshold-margin
(generic function).
copy-chromosome
(generic function).
copy-chromosome-with-score
(generic function).
copy-organism
(generic function).
decode
(generic function).
eidetic
(generic function).
evaluate
(generic function).
evolution-termination-p
(generic function).
evolve
(generic function).
locus-arity
(generic function).
make-chromosome
(generic function).
make-chromosomes
(generic function).
make-genetic-plan
(generic function).
make-loci-vector
(generic function).
make-organism
(generic function).
make-organisms
(generic function).
make-organisms-vector
(generic function).
make-population
(generic function).
make-population-statistics
(generic function).
normalize-score
(generic function).
organism-class
(generic function).
population-statistics-class
(generic function).
printable-allele-values
(generic function).
regenerate
(generic function).
size
(generic function).
geco/definitions/classes.lisp
definitions
(module).
avg-normalized-score
(reader method).
(setf avg-normalized-score)
(writer method).
avg-score
(reader method).
(setf avg-score)
(writer method).
b2g-map
(reader method).
(setf b2g-map)
(writer method).
binary-chromosome
(class).
chromosome
(class).
ecosystem
(reader method).
ecosystem
(reader method).
(setf ecosystem)
(writer method).
(setf ecosystem)
(writer method).
ecosystem
(class).
evaluation-limit
(reader method).
(setf evaluation-limit)
(writer method).
evaluation-number
(reader method).
(setf evaluation-number)
(writer method).
g2b-map
(reader method).
(setf g2b-map)
(writer method).
generation-limit
(reader method).
(setf generation-limit)
(writer method).
generation-number
(reader method).
(setf generation-number)
(writer method).
generational-population
(class).
genetic-plan
(class).
genotype
(reader method).
(setf genotype)
(writer method).
gray-code-translation
(class).
loci
(reader method).
(setf loci)
(writer method).
max-organism
(reader method).
(setf max-organism)
(writer method).
max-score
(reader method).
(setf max-score)
(writer method).
maximizing-score-mixin
(class).
min-organism
(reader method).
(setf min-organism)
(writer method).
min-score
(reader method).
(setf min-score)
(writer method).
minimizing-score-mixin
(class).
normalized-score
(reader method).
(setf normalized-score)
(writer method).
number-of-bits
(reader method).
(setf number-of-bits)
(writer method).
organism
(reader method).
(setf organism)
(writer method).
organism
(class).
organism-phenotype-mixin
(class).
organisms
(reader method).
(setf organisms)
(writer method).
phenotype
(reader method).
(setf phenotype)
(writer method).
plan
(reader method).
(setf plan)
(writer method).
population
(reader method).
population
(reader method).
population
(reader method).
(setf population)
(writer method).
(setf population)
(writer method).
(setf population)
(writer method).
population
(class).
population-statistics
(class).
score
(reader method).
(setf score)
(writer method).
sequence-chromosome
(class).
size
(reader method).
(setf size)
(writer method).
statistics
(reader method).
(setf statistics)
(writer method).
sum-normalized-score
(reader method).
(setf sum-normalized-score)
(writer method).
sum-score
(reader method).
(setf sum-score)
(writer method).
geco/utilities/dbg.lisp
utilities
(module).
*dbg-flags*
(special variable).
geco/utilities/random.lisp
utilities
(module).
geco-random-float
(function).
geco-random-integer
(function).
geco-random-state
(function).
set-geco-random-state
(function).
geco/methods/chromosome-methods.lisp
methods
(module).
2x-cross-chromosomes
(method).
allele-code-to-value
(method).
allele-code-to-value
(method).
allele-values
(method).
bin2gray
(method).
copy-chromosome
(method).
count-allele-codes
(method).
cross-chromosomes
(method).
decode-binary-loci-value
(method).
eidetic
(method).
gray2bin
(method).
hamming-distance
(method).
loci-printable-form
(method).
locus
(method).
(setf locus)
(method).
locus-arity
(method).
locus-printable-form
(method).
make-loci-vector
(method).
make-loci-vector
(method).
make-loci-vector
(method).
mutate-chromosome
(method).
pick-random-allele
(method).
pick-random-alleles
(method).
pick-random-alleles
(method).
pick-random-locus-index
(method).
pmx-cross-chromosomes
(method).
print-object
(method).
printable-allele-values
(method).
r3-cross-chromosomes
(method).
scramble-alleles
(method).
shared-initialize
(method).
shared-initialize
(method).
size
(method).
swap-alleles
(method).
uniform-cross-chromosomes
(method).
geco/methods/organism-methods.lisp
methods
(module).
2x-cross-organisms
(method).
copy-organism
(method).
copy-organism-with-score
(method).
cross-organisms
(method).
eidetic
(method).
evaluate
(method).
evaluate
(method).
genotype-printable-form
(method).
make-chromosome
(method).
make-chromosomes
(method).
mutate-organism
(method).
normalize-score
(method).
pick-random-chromosome
(method).
pick-random-chromosome-index
(method).
pmx-cross-organisms
(method).
print-object
(method).
r3-cross-organisms
(method).
randomize-chromosomes
(method).
shared-initialize
(method).
swap-alleles
(method).
uniform-cross-organisms
(method).
geco/methods/selection-methods.lisp
methods
(module).
pick-random-organism
(method).
pick-random-organism-index
(method).
pick-some-random-organism-indices
(method).
ranking-preselect
(method).
roulette-pick-random-organism
(method).
roulette-pick-random-organism-index
(method).
roulette-pick-random-weight-index
(function).
stochastic-remainder-preselect
(method).
tournament-select-organism
(method).
geco/methods/pop-stats-methods.lisp
methods
(module).
compute-normalized-statistics
(method).
compute-statistics
(method).
print-object
(method).
shared-initialize
(method).
geco/methods/population-methods.lisp
methods
(module).
as-good-as-test
(method).
as-good-as-test
(method).
best-organism
(method).
best-organism
(method).
best-organism-accessor
(method).
better-than-test
(method).
better-than-test
(method).
compute-binary-allele-statistics
(method).
compute-statistics
(method).
converged-p
(method).
convergence-fraction
(method).
convergence-fraction
(method).
convergence-threshold-margin
(method).
convergence-threshold-margin
(method).
evaluate
(method).
make-organism
(method).
make-organisms
(method).
make-organisms-vector
(method).
make-population-statistics
(method).
maximizing-p
(method).
maximizing-p
(method).
minimizing-p
(method).
minimizing-p
(method).
normalize-score
(method).
population-statistics-class
(method).
shared-initialize
(method).
worst-organism
(method).
worst-organism
(method).
worst-organism-accessor
(method).
geco/methods/genetic-plan-methods.lisp
methods
(module).
evolution-termination-p
(method).
regenerate
(method).
regenerate
(method).
geco/methods/ecosystem-methods.lisp
methods
(module).
evaluate
(method).
evolve
(method).
make-genetic-plan
(method).
make-population
(method).
shared-initialize
(method).
Packages are listed by definition order.
geco
ga
common-lisp
.
2x-cross-chromosomes
(generic function).
2x-cross-organisms
(generic function).
allele-code-to-value
(generic function).
allele-values
(generic function).
as-good-as-test
(generic function).
avg-normalized-score
(generic reader).
(setf avg-normalized-score)
(generic writer).
avg-score
(generic reader).
(setf avg-score)
(generic writer).
b2g-map
(generic reader).
(setf b2g-map)
(generic writer).
best-organism
(generic function).
best-organism-accessor
(generic function).
better-than-test
(generic function).
bin2gray
(generic function).
binary-chromosome
(class).
chromosome
(class).
chromosome-classes
(generic function).
compute-binary-allele-statistics
(generic function).
compute-normalized-statistics
(generic function).
compute-statistics
(generic function).
converged-p
(generic function).
convergence-fraction
(generic function).
convergence-threshold-margin
(generic function).
copy-chromosome
(generic function).
copy-chromosome-with-score
(generic function).
copy-organism
(generic function).
copy-organism-with-score
(generic function).
count-allele-codes
(generic function).
cross-chromosomes
(generic function).
cross-organisms
(generic function).
dbg
(function).
dbg-p
(function).
dbg?
(function).
dbgo
(function).
decode
(generic function).
decode-binary-loci-value
(generic function).
ecosystem
(generic reader).
(setf ecosystem)
(generic writer).
ecosystem
(class).
eidetic
(generic function).
evaluate
(generic function).
evaluation-limit
(generic reader).
(setf evaluation-limit)
(generic writer).
evaluation-number
(generic reader).
(setf evaluation-number)
(generic writer).
evolution-termination-p
(generic function).
evolve
(generic function).
g2b-map
(generic reader).
(setf g2b-map)
(generic writer).
geco-random-float
(function).
geco-random-integer
(function).
generation-limit
(generic reader).
(setf generation-limit)
(generic writer).
generation-number
(generic reader).
(setf generation-number)
(generic writer).
generational-population
(class).
genetic-plan
(class).
genotype
(generic reader).
(setf genotype)
(generic writer).
genotype-printable-form
(generic function).
gray-code-translation
(class).
gray2bin
(generic function).
hamming-distance
(generic function).
loci
(generic reader).
(setf loci)
(generic writer).
loci-printable-form
(generic function).
locus
(generic function).
(setf locus)
(generic function).
locus-arity
(generic function).
locus-printable-form
(generic function).
make-chromosome
(generic function).
make-chromosomes
(generic function).
make-genetic-plan
(generic function).
make-loci-vector
(generic function).
make-organism
(generic function).
make-organisms
(generic function).
make-organisms-vector
(generic function).
make-population
(generic function).
make-population-statistics
(generic function).
max-organism
(generic reader).
(setf max-organism)
(generic writer).
max-score
(generic reader).
(setf max-score)
(generic writer).
maximizing-p
(generic function).
maximizing-score-mixin
(class).
min-organism
(generic reader).
(setf min-organism)
(generic writer).
min-score
(generic reader).
(setf min-score)
(generic writer).
minimizing-p
(generic function).
minimizing-score-mixin
(class).
mutate-chromosome
(generic function).
mutate-organism
(generic function).
normalize-score
(generic function).
normalized-score
(generic reader).
(setf normalized-score)
(generic writer).
number-of-bits
(generic reader).
(setf number-of-bits)
(generic writer).
organism
(generic reader).
(setf organism)
(generic writer).
organism
(class).
organism-class
(generic function).
organism-phenotype-mixin
(class).
organisms
(generic reader).
(setf organisms)
(generic writer).
phenotype
(generic reader).
(setf phenotype)
(generic writer).
pick-random-allele
(generic function).
pick-random-alleles
(generic function).
pick-random-chromosome
(generic function).
pick-random-chromosome-index
(generic function).
pick-random-locus-index
(generic function).
pick-random-organism
(generic function).
pick-random-organism-index
(generic function).
pick-some-random-organism-indices
(generic function).
plan
(generic reader).
(setf plan)
(generic writer).
pmx-cross-chromosomes
(generic function).
pmx-cross-organisms
(generic function).
population
(generic reader).
(setf population)
(generic writer).
population
(class).
population-statistics
(class).
population-statistics-class
(generic function).
printable-allele-values
(generic function).
r3-cross-chromosomes
(generic function).
r3-cross-organisms
(generic function).
randomize-chromosomes
(generic function).
ranking-preselect
(generic function).
regenerate
(generic function).
roulette-pick-random-organism
(generic function).
roulette-pick-random-organism-index
(generic function).
roulette-pick-random-weight-index
(function).
score
(generic reader).
(setf score)
(generic writer).
scramble-alleles
(generic function).
sequence-chromosome
(class).
size
(generic function).
(setf size)
(generic writer).
statistics
(generic reader).
(setf statistics)
(generic writer).
stochastic-remainder-preselect
(generic function).
sum-normalized-score
(generic reader).
(setf sum-normalized-score)
(generic writer).
sum-score
(generic reader).
(setf sum-score)
(generic writer).
swap-alleles
(generic function).
tournament-select-organism
(generic function).
undbg
(function).
uniform-cross-chromosomes
(generic function).
uniform-cross-organisms
(generic function).
worst-organism
(generic function).
worst-organism-accessor
(generic function).
*dbg-flags*
(special variable).
geco-random-state
(function).
set-geco-random-state
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
If there are no FLAGS, then turn on all debug code, else add each FLAG to the *DBG-FLAGS* list.
If *DBG-FLAGS* is not a list, return its value, else test for presence of any of FLAGS on the *DBG-FLAGS* list.
Accept a positive floating-point number and returns a number of the same kind between zero (inclusive) and the number (exclusive).
geco
.
Accept a positive integer and returns a number of the same kind between zero (inclusive) and the number (exclusive).
geco
.
Select a random index into a table of weights, using the roulette wheel approach. Assumes that the weights-table has been normalized to sum to 1.0
geco
.
If there are no FLAGS, then turn off all debug code, else remove each FLAG from the *DBG-FLAGS* list.
geco
.
chromosome
) (parent2 chromosome
) (child1 chromosome
) (child2 chromosome
) locus-index1 locus-index2) ¶[Two-point crossover] Cross a chromosome segment between two parents two specified locations in the children.
Both chromosomes must be the same size. When locus-index1 > locus-index2, the copied segment wraps
around the end of the chromosomes; When the designated segment indicates the entire chromosome, nothing is copied.
Returns the allele which would be represented by allele-code for the given locus-index on chromosome.
geco
.
binary-chromosome
) locus-index allele-code) ¶A much more efficient implementation than the general case of indexing into the vector returned by allele-values.
chromosome
) locus-index allele-code) ¶Returns a vector of allele values which represents the possible values of the allele at the indicated locus of the chromosome.
geco
.
binary-chromosome
) locus-index) ¶geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
gray-code-translation
)) ¶automatically generated reader method
geco
.
gray-code-translation
)) ¶automatically generated writer method
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
maximizing-score-mixin
)) ¶geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
gray-code-translation
) bin) ¶Returns a list of classes of chromosomes for the organism. The size of this list determines the number of chromosomes. Typically this is a class allocated slot on the instantiated class.
geco
.
geco
.
population
)) ¶Returns a list of vectors (one per binary chromosome in the organisms of the population) of counts by locus of non-zero alleles.
geco
.
population-statistics
)) ¶Compute the statistics for the relevent thing.
geco
.
population
)) ¶This method should only be used if the statistics need to be recomputed.
They are initially computed when the population-statistics instance is first created for the population.
population-statistics
)) ¶A predicate which returns true (non-NIL) when the population is converged.
geco
.
population
)) ¶A predicate which returns true (non-NIL) when the population has converged.
This method defines convergence as either of the following:
1. The entire population is converged to a single score value; or
2. At least convergence-fraction of the current population has a normalized score value which is
as good as convergence-threshold-margin of the population.
Here, as good as is determined using the function returned by the as-good-as-test generic function of
the population.
Returns a number in the range (0,1] which indicates the portion of the population which has converged to the current best score in the population.
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶Returns a number in the range (0,1] which indicates the fraction of the current population’s best score which the convergence-fraction of the population must be as good as to be converged.
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶Creates a copy of chromosome, which will belong to owner-organism. The score is not copied, forcing the organism to be EVALUATEd.
geco
.
chromosome
) owner-organism) ¶Creates a copy of chromosome, including its score, which will belong to owner-organism.
geco
.
Creates a copy of organism, which will optionally belong to new-population.
geco
.
chromosome
) from-index loci-to-count allele-code) ¶Returns the number of loci in the loci-to-count loci of chromosome, starting at from-index, wich have allele-code
geco
.
chromosome
) (parent2 chromosome
) (child1 chromosome
) (child2 chromosome
) locus-index) ¶[One-point crossover] Cross a chromosome segment between two parents at a specified location in the children. Both chromosomes must be the same size.
Convert an organism’s chromosomal representation (it’s genotype) into it’s phenotype,
i.e., what the genotype is intended to represent, and save it in the phenotype slot of the organism.
This may or may not be of practical value to a particular implementation. The function is invoked immediately
before the organism is evaluated.
geco
.
geco
.
binary-chromosome
) from-index loci-to-decode) ¶Returns the binary value represented by the loci-to-decode loci of chromosome, starting at from-index. chromosome is assumed to be an array of bit.
geco
.
population
)) ¶automatically generated reader method
genetic-plan
)) ¶automatically generated reader method
geco
.
population
)) ¶automatically generated writer method
genetic-plan
)) ¶automatically generated writer method
Predicate, true if both things are the same class and have the same genetic makeup.
geco
.
organism
) (org2 organism
)) ¶Predicate, true if the organisms are of the same class and have the same chromosomes.
chromosome
) (chr2 chromosome
)) ¶Predicate, true if the chromosomes are of the same class and have the same alleles.
Determine the score of the thing, be it ecosystem, population, or organism, with respect to plan.
geco
.
ecosystem
) (plan genetic-plan
)) ¶population
) (plan genetic-plan
)) ¶organism
) (plan genetic-plan
)) ¶organism-phenotype-mixin
) (plan genetic-plan
)) ¶geco
.
genetic-plan
)) ¶genetic-plan
)) ¶If non-nil, it should be an integer, the final generation number.
A predicate which returns true (non-NIL) when evolution should terminate.
A default method is provided on the class genetic-plan which returns T when the
generation-number of the ecosystem reaches the generation-limit of the plan,
or when the evaluation-number of the ecosystem reaches the evaluation-limit of the plan,
or when the population has converged, based on the converged-p predicate.
geco
.
genetic-plan
)) ¶Create new generations until a termination condition is reached.
geco
.
gray-code-translation
)) ¶automatically generated reader method
geco
.
gray-code-translation
)) ¶automatically generated writer method
geco
.
genetic-plan
)) ¶genetic-plan
)) ¶If non-nil, it should be an integer, the final evaluation number.
geco
.
gray-code-translation
) gray) ¶geco
.
chromosome
) (c2 chromosome
)) ¶geco
.
chromosome
)) ¶automatically generated reader method
loci
.
geco
.
chromosome
)) ¶automatically generated writer method
loci
.
geco
.
chromosome
)) ¶geco
.
chromosome
) index) ¶geco
.
chromosome
) index) ¶Returns the number of allele values which may be used at this locus of this chromosome.
geco
.
binary-chromosome
) locus-index) ¶geco
.
chromosome
) locus-index) ¶Returns a character which represents the value of the allele at the indicated locus of the chromosome.
Returns an instance of chromosome-class which will be a part of organsm. The chromosome’s size
is specified by the keyword size, and the chromosome’s allele’s will be initialized to random values if the keyword
random has a non-nil value.
Returns a list instances of the appropriate subclasses of chromosome-class for organsm. The
chromosome’s sizes are the default size for each instance, and the chromosome’s allele’s will be initialized to
random values if the keyword random has a non-nil value.
Returns an instance of genetic-plan-class which will be used by ecosystem.
Returns the object (usually a vector) which will contain the loci
for the chromosome.
If random is non-nil, the loci are initialized to random alleles.
geco
.
binary-chromosome
) size &key &allow-other-keys) ¶chromosome
) size &key random) ¶chromosome
) size &key &allow-other-keys) ¶Returns an instance of organism-class, or the appropriate subclass, for population.
The organisms chromosomes will be initialized to random values if the keyword random has a non-nil value.
geco
.
population
) &key random no-chromosomes) ¶Creates all the organisms for the specified population, storing them in the organisms vector.
The organism instances are created using make-organism, using the value of the random keyword argument.
The organisms chromosomes will be initialized to random values if the keyword random has a non-nil value.
The value returned by this function is not defined.
geco
.
population
) &key random) ¶Returns the object (usually a vector) which will contain the organisms for the population.
geco
.
population
) size) ¶Returns an instance of population-class which will be a part of ecosystem. If size is specified, the population’s organism vector and organisms will be created.
Returns an instance of (possibly a subclass of) population-statistics which will be used for population.
geco
.
population
)) ¶geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
chromosome
) locus-index) ¶Normalize the score for a population or organism, according to the genetic plan plan, and revise the population statistics if necessary.
geco
.
population
) (plan genetic-plan
)) ¶Normalize all the score values for each organism in the population, according to the
genetic plan, and update the population-statistics with normalized values
(using compute-normalized-statistics).
organism
) (plan genetic-plan
)) ¶geco
.
gray-code-translation
)) ¶automatically generated reader method
geco
.
gray-code-translation
)) ¶automatically generated writer method
geco
.
chromosome
)) ¶automatically generated reader method
geco
.
chromosome
)) ¶automatically generated writer method
Returns the class of organisms which are expected in the population. Typically this is a class allocated slot on the instantiated class.
geco
.
geco
.
population
)) ¶automatically generated reader method
geco
.
population
)) ¶automatically generated writer method
geco
.
organism-phenotype-mixin
)) ¶automatically generated reader method
geco
.
organism-phenotype-mixin
)) ¶automatically generated writer method
geco
.
chromosome
) locus-index) ¶Returns a random allele for the locus.
geco
.
sequence-chromosome
)) ¶chromosome
)) ¶geco
.
chromosome
)) ¶Returns a random locus index into the chromosome.
geco
.
population
)) ¶Returns a random organism from the population.
geco
.
population
)) ¶Returns the index number of a random organism from the population.
geco
.
population
) number-to-pick) ¶Returns number-to-pick random organism indices for the population.
geco
.
sequence-chromosome
) (parent2 sequence-chromosome
) (child1 sequence-chromosome
) (child2 sequence-chromosome
) &key locus-index1 locus-index2 allele-test) ¶geco
.
organism
)) ¶automatically generated reader method
population-statistics
)) ¶automatically generated reader method
geco
.
organism
)) ¶automatically generated writer method
population-statistics
)) ¶automatically generated writer method
Returns the class of the population-statistics instance to be used with the population.
geco
.
population
)) ¶Returns a vector of characters which represents the possible values of the allele at the indicated locus of the chromosome.
geco
.
binary-chromosome
) locus-index) ¶geco
.
sequence-chromosome
) (parent2 sequence-chromosome
) (child1 sequence-chromosome
) (child2 sequence-chromosome
) &key allele-test) ¶Random, Respectful Recombination (R3) crossover operator. Based on forma analysis work of Nicholas J. Radcliffe.
geco
.
population
) &key multiplier max) ¶Prepare and return a function of no arguments which will select random organisms from the population, weighted by score, using a ranking technique developed by Baker.
Returns a new, regenerated thing. Default methods are provided for ecosystems and populations.
geco
.
genetic-plan
) (old-pop generational-population
)) ¶A rather dumb default method, which should be replaced by one that creates a new population from the previous one, using genetic operators, e.g., selection, mutation, and crossover.
genetic-plan
) (ecosys ecosystem
)) ¶geco
.
population
)) ¶Select a random organism from the population, weighted by score, using the roulette wheel approach, as used in DeJong’s R1; also known as Brindle’s stochastic sampling with replacement.
geco
.
population
)) ¶Select a random organism number from the population, weighted by score, using the roulette wheel approach, as used in DeJong’s R1; also known as Brindle’s stochastic sampling with replacement.
geco
.
chromosome
)) ¶Returns the size the thing. Typically this is a class allocated slot on the instantiated class.
geco
.
chromosome
)) ¶population
)) ¶automatically generated reader method
size
.
geco
.
population
)) ¶automatically generated writer method
size
.
geco
.
population
)) ¶automatically generated reader method
geco
.
population
)) ¶automatically generated writer method
geco
.
population
) &key multiplier) ¶Prepare and return a function of no arguments which will select random organisms from the population, weighted by score, using a technique referred to by Brindle as stochastic remainder selection without replacement.
geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
population-statistics
)) ¶automatically generated reader method
geco
.
population-statistics
)) ¶automatically generated writer method
geco
.
chromosome
) &key locus-index locus-index2) ¶geco
.
population
) tournament-size) ¶Pick tournament-size organisms from the population at random, and returns the best one.
geco
.
chromosome
) (parent2 chromosome
) (child1 chromosome
) (child2 chromosome
) &key bias) ¶Uniform crossover of chromosomes between two parents, with optional bias in (0.0:1.0]. Default bias is 0.5; larger bias indicates larger number of crossed alleles.
geco
.
minimizing-score-mixin
)) ¶maximizing-score-mixin
)) ¶geco
.
maximizing-score-mixin
)) ¶population-statistics
) stream) ¶chromosome
) stream) ¶geco
.
2x-cross-chromosomes
.
allele-code-to-value
.
copy-chromosome
.
count-allele-codes
.
cross-chromosomes
.
eidetic
.
hamming-distance
.
(setf loci)
.
loci
.
loci-printable-form
.
(setf locus)
.
locus
.
locus-printable-form
.
make-loci-vector
.
make-loci-vector
.
mutate-chromosome
.
(setf organism)
.
organism
.
pick-random-allele
.
pick-random-alleles
.
pick-random-locus-index
.
print-object
.
scramble-alleles
.
shared-initialize
.
size
.
swap-alleles
.
uniform-cross-chromosomes
.
(or geco:organism null)
(quote nil)
:organism
geco
.
geco:ecosystem
:ecosystem
If non-nil, it should be an integer, the final evaluation number.
(or integer null)
:generation-limit
If non-nil, it should be an integer, the final generation number.
(or integer null)
:evaluation-limit
Class to mix with population classes whose organism’s score is better when larger. An organisms score represents fitness or benefit.
geco
.
Class to mix with population classes whose organism’s score is better when smaller. An organisms score represents a cost or penalty.
geco
.
geco
.
2x-cross-organisms
.
copy-organism
.
copy-organism-with-score
.
cross-organisms
.
eidetic
.
evaluate
.
(setf genotype)
.
genotype
.
genotype-printable-form
.
make-chromosome
.
make-chromosomes
.
mutate-organism
.
normalize-score
.
(setf normalized-score)
.
normalized-score
.
pick-random-chromosome
.
pick-random-chromosome-index
.
pmx-cross-organisms
.
(setf population)
.
population
.
print-object
.
r3-cross-organisms
.
randomize-chromosomes
.
(setf score)
.
score
.
shared-initialize
.
swap-alleles
.
uniform-cross-organisms
.
(or geco:population null)
(quote nil)
:population
list
(quote nil)
:genotype
(quote nil)
:score
(quote nil)
:normalized-score
geco
.
compute-binary-allele-statistics
.
compute-statistics
.
converged-p
.
(setf ecosystem)
.
ecosystem
.
evaluate
.
make-organism
.
make-organisms
.
make-organisms-vector
.
make-population-statistics
.
normalize-score
.
(setf organisms)
.
organisms
.
pick-random-organism
.
pick-random-organism-index
.
pick-some-random-organism-indices
.
population-statistics-class
.
ranking-preselect
.
roulette-pick-random-organism
.
roulette-pick-random-organism-index
.
shared-initialize
.
(setf size)
.
size
.
(setf statistics)
.
statistics
.
stochastic-remainder-preselect
.
tournament-select-organism
.
geco:ecosystem
:ecosystem
vector
geco:population-statistics
:statistics
geco
.
(setf avg-normalized-score)
.
avg-normalized-score
.
(setf avg-score)
.
avg-score
.
compute-normalized-statistics
.
compute-statistics
.
(setf max-organism)
.
max-organism
.
(setf max-score)
.
max-score
.
(setf min-organism)
.
min-organism
.
(setf min-score)
.
min-score
.
(setf population)
.
population
.
print-object
.
shared-initialize
.
(setf sum-normalized-score)
.
sum-normalized-score
.
(setf sum-score)
.
sum-score
.
geco:population
:population
number
:sum-score
number
:avg-score
number
:max-score
number
:min-score
geco:organism
:max-organism
geco:organism
:min-organism
:sum-normalized-score
:avg-normalized-score
Either a list of flags controlling debugging code, or T for globally on, or NIL for globally off.
Jump to: | (
2
A B C D E F G H L M N O P R S T U W |
---|
Jump to: | (
2
A B C D E F G H L M N O P R S T U W |
---|
Jump to: | *
A B E G L M N O P S |
---|
Jump to: | *
A B E G L M N O P S |
---|
Jump to: | B C D E F G M O P R S U |
---|
Jump to: | B C D E F G M O P R S U |
---|