|
Declarations
|
|
|
The declarations in the GALib1_1 modules is where you put in all of your own modifications for chromosomes, genome, etc. Here is an example: Private Const MAX_RUNS As Byte = 10 'run no more than this many new populations Private Const MAX_GENERATIONS As Single = 150 'run no more generations than this per pop. Private Const CELL_W As Byte = 2 'size of cell/lattice in width and height. Private Const CELL_H As Byte = 6 Private Const CHROMO_LENGTH As Byte = 24 'length of full chromosome in allels/bits Private Const NUMBER_OF_GENES As Byte = 3 'num. of groupings of bits. e.g 110 111110101 = 2 genes Private Const GENE_MAP As String = "+09+09+06" 'gene 1 is 6 bits long, gene 2 is 9 bits long, etc. Private Const CROSSOVER_PROBABILITY As Single = 0.7 'e.g. 70% Private Const MUTATION_PROBABILITY As Single = 0.01 'e.g .001 or .1% Private Const SHOW_FITNESS As Boolean = True 'do you want to see a fitness graph? Private Const SHOW_CELLDUMP As Boolean = True 'do you want the cell dumped to debug screen? The SHOW_FITNESS and SHOW_CELLDUMP allow you to control what information you want from the cell in question. Turning these off will speed up the program when you are doing multiple runs. |