libfgen
0.1.15
Library for optimization using a genetic algorithm or particle swarm optimization
|
00001 /* 00002 parameters.h -- default parameter values. 00003 00004 fgen -- Library for optimization using a genetic algorithm or particle swarm optimization. 00005 Copyright 2012, Harm Hanemaaijer 00006 00007 This file is part of fgen. 00008 00009 fgen is free software: you can redistribute it and/or modify it 00010 under the terms of the GNU Lesser General Public License as published 00011 by the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 fgen is distributed in the hope that it will be useful, but WITHOUT 00015 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00016 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00017 License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with fgen. If not, see <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 /* 00025 * This file contains the definitions of the basic configurable parameters 00026 * for the genetic algorithm. 00027 */ 00028 00029 /* 00030 * These are the parameter defaults; they can be overridden by the parameter setting functions. 00031 * The mutation probability is for one bit mutated in a single individual. 00032 */ 00033 00034 #define DEFAULT_MAX_GENERATION 100 00035 00036 #define DEFAULT_POPULATION_SIZE 128 00037 00038 #define DEFAULT_INDIVIDUAL_SIZE_IN_BITS 64 00039 00040 #define DEFAULT_CROSSOVER_PROBABILITY 0.600 00041 00042 #define DEFAULT_MUTATION_PROBABILITY 0.005 00043 #define DEFAULT_MACRO_MUTATION_PROBABILITY 0.050 00044 00045 #define DEFAULT_SELECTION_FITNESS_TYPE FGEN_FITNESS_PROPORTIONAL 00046 00047 #define DEFAULT_SELECTION_TYPE FGEN_SUS 00048 #define DEFAULT_TOURNAMENT_SIZE 3 00049 00050 #define INDIVIDUAL_SIZE_IN_BYTES(pop) ((pop->individual_size_in_bits + 7) / 8) 00051