|
GeneticAlgorithm
0.5 (beta)
A python framework for rapid GA prototyping
|
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 |
| tuple GADemo::ch = Core.Genotype(segments=[GenotypeLibrary.BinaryChromosomeSegment(nBits=i*10) for i in range(1,4)]) |
| tuple GADemo::ga |
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()])
| GADemo::maximize = False |