GeneticAlgorithm  0.5 (beta)
A python framework for rapid GA prototyping
GADemo Namespace Reference

Classes

class  NumOnes
 An evaluation operator that computes the number of ones in a segment whose data can be converted to binary using the bin() function. More...

Variables

 maximize = False
 This code runs only when this script is executed as main.
tuple ch = Core.Genotype(segments=[GenotypeLibrary.BinaryChromosomeSegment(nBits=i*10) for i in range(1,4)])
tuple p = Core.Population(schema=ch, popSize=100, genSize=20, maximize=maximize, mutation_probability=0.01)
tuple ga

Variable Documentation

tuple GADemo::ch = Core.Genotype(segments=[GenotypeLibrary.BinaryChromosomeSegment(nBits=i*10) for i in range(1,4)])

Definition at line 19 of file GADemo.py.

tuple GADemo::ga
Initial value:
00001 Core.Scheduler(name='Demo',\
00002                         population=p,\
00003                         operators=[NumOnes(),\
00004                                    LoggingOperators.LogGenerations(iterationFrequency=1),\
00005                                    PlottingOperators.PlotBestLogger(iterationFrequency=1, maximize=maximize),\
00006                                    SelectionOperators.SUSSelection(),\
00007                                    SelectionOperators.SelectLethals(),\
00008                                    Core.Crossover(),\
00009                                    Core.Mutate()])

Definition at line 21 of file GADemo.py.

This code runs only when this script is executed as main.

Definition at line 18 of file GADemo.py.

tuple GADemo::p = Core.Population(schema=ch, popSize=100, genSize=20, maximize=maximize, mutation_probability=0.01)

Definition at line 20 of file GADemo.py.

 All Classes Namespaces Files Functions Variables