genetic

Principle
See also

Principe

We define populations of individuals whose Darwinian evolution is simulated by genetic algorithms.

genetic(id)

        Createsthe object idgenetic.

alphabet genetic(id)="ABC..."

        Creates an alphabet "ABC...". By default aphabet is reduced to réduit a "01".

particle(0) genetic(id)="c1c2.."

        Creates an individual by the data of a word composed of characters of the alphabet.

generate alea particle(n,t) genetic(id)

        Creates (reproducibly) n random individuals of size t.

generate rand particle(n,t) genetic(id)

        Creates (no reproducibly) n random individuals of size t.

func genetic(id)="f"

        Defines the function f (anyflo written language) as evaluation function of the form::
f(p,n)
{
return(évaluation de p);
}

avec p = particle numéro n.

func genetic(id)=num

        Defines an evaluation function written in C (num is a case of the form: func_genetic_utilisateur() of file ../anyflo/utilb.c).

meta alea genetic(id)=p1,p2

Defines propabilitÚs reproducible:
        p1 = probability of crossover (0.75 by default).
        mutation probability p2 = (.01 default).

meta rand genetic(id)=p1,p2

Defines propabilitÚs no reproducible crossover and mutation..

generate(n) genetic(id)

regenerates n times the population id by selection, crossover and mutations, focusing on individuals whose evaluations are maxima.

particle(p)genetic(id)

Returns the evaluation of the particle number p of genetics id.

See also:

displ genetic
meta alea genetic
alphabet genetic
cut genetic
func genetic
generate alea particle genetic
generate genetic
generate rand particle genetic
local genetic
meta rand genetic
particle genetic
scale particle genetic
validate genetic
validate particle genetic