clear-genetic-problems ()Clear out the genetic problem definitions introduced by defgenetic.
defgenetic  (name &key mutation-rate fitness-function alphabet pool)Define a genetic problem (store it by its name in a hash.)
display-solution  (solution)Display a solution.
display-solutions  (solutions)Display the solutions.
g-alphabet  (struct)nil
g-fitness-function  (struct)nil
g-mutation-rate  (struct)nil
g-name  (struct)nil
g-pool  (struct)nil
ga-sim  (n gene-pool fitness-function mutation-rate gene-alphabet &key
(gene-length-constant? t) (print-pools? nil) (print-intermediate? nil) (k 1))Run a genetic algorithm simulation <n> times with initial gene pool
<gene-pool> which is a list of genes (each gene is a list from
alphabet <fitness-function> which
determines the fitness of a given gene (fitness values produced should be
greater than *base-fitness-value*; a mutation rate
<mutation-rate> which determines the rate at which gene mutation
occurs; <gene-length-constant?> which determines if the length of a
gene is constant; and, <print-intermediate?> which determines whether
to print intermediate gene pools. If <print-pools?> is nil, no
generations are printed regardless of the value of <print-intermediate?>.
Store the best k solutions in a cache.
solve-all-genetic-problems  (n &key (gene-length-constant? t) (print-pools? nil) (print-intermediate? nil)
(mutation-rate nil) (k 1))Solve the list of genetic problems introduced by defgenetic.
Run the simulation <n> times. Return the best <k> solutions for
each problem. If <k> is a vector or list, then the ith value of <k>
is used with the ith value of the genetic problem
(ordered alphabetically by name). The same is true of <n> and the
genetic problems. See ga-sim for an explanation of the keyword parameters.
solve-genetic-problem  (n g-name &key (gene-length-constant? t) (print-pools? nil)
(print-intermediate? nil) (mutation-rate nil) (k 1))Solve a genetic problem defined by structure genetic named by <g-name>.
Return the <k> best solutions. See ga-sim for an explanation of the
keyword parameters.
solve-genetic-problems  (n names &key (gene-length-constant? t) (print-pools? nil)
(print-intermediate? nil) (mutation-rate nil) (k 1))Solve the list of genetic problems introduced by defgenetic named by <names>.
Run the simulation <n> times. Return the best <k> solutions for
each problem. If <k> is a vector or list, then the ith value of <k>
is used with the ith value of the genetic problem
(ordered alphabetically by name). The same is true of <n> and the
genetic problems. See ga-sim for an explanation of the keyword parameters. |