#include <simplepopula.h>
Inheritance diagram for SimplePopulation:
Public Methods | |
SimplePopulation (EAEnvironment &envr, const StringMap ¶ms) | |
double | evolve (int generations, const char *savefile=NULL, double trg_fitn=-1) |
const Individual & | operator[] (int i) const |
Individual & | operator[] (int i) |
int | size () const |
void | print (TextOStream &out) const |
void | report (TextOStream &log) const |
const EAStrategy & | getstrategy () const |
int | getAge () const |
MutationRate & | mutRate () |
const SelectionPrms & | selParams () const |
SelectionPrms & | selParams () |
void | resetFitnesses () |
virtual void | check () const |
void | check () const |
Public Attributes | |
double | minsimilarity |
Friends | |
class | EAStrategy |
Definition at line 42 of file simplepopula.h.
|
Standard constructor. * * Copyright (C) 1997-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Definition at line 32 of file simplepopula.cc. References SelectionPrms::adaptParams(), EAEnvironment::addFeaturesTo(), Individual::addGenesTo(), Genome::addPrivateGenes(), MutationRate::autoAdaptation(), EAStrategy, Population::mAge, minsimilarity, EAStrategy::print(), Population::rpEnvironment, Gentainer::selfadjust(), SelectionPrms::setEtaPlus(), SelectionPrms::setMu(), SelectionPrms::setMuPart(), and SelectionPrms::setQ(). |
|
Implementation for Object.
Reimplemented from Population. |
|
Implementation for Object.
Reimplemented from Population. Definition at line 237 of file simplepopula.cc. References EAStrategy::check(), EAEnvironment::check(), and Population::rpEnvironment. |
|
Evolves the population.
Definition at line 120 of file simplepopula.cc. References EAEnvironment::bestfitn, EAStrategy::evolve(), FitnessStats::minFitness(), MutabilityRecord::reset(), and Population::rpEnvironment. |
|
Returns the number of times the population has been evaluated (i.e. the generation) Definition at line 92 of file simplepopula.h. References Population::mAge. |
|
Returns the current strategy.
Definition at line 87 of file simplepopula.h. |
|
Returns a non-const reference to the global mutation rate.
Definition at line 96 of file simplepopula.h. Referenced by EAStrategy::print(), and EAStrategy::recombine(). |
|
Returns an individual in the population by it's index number. As above, except non-conest. Definition at line 71 of file simplepopula.h. |
|
Returns an individual in the population by it's index number.
Definition at line 66 of file simplepopula.h. |
|
Dumps the population to given output in a formatted manner.
Definition at line 202 of file simplepopula.cc. References size(). |
|
Writes an one-line generation report to the given logging stream.
Definition at line 218 of file simplepopula.cc. References FitnessStats::avgFitness(), Population::mAge, FitnessStats::maxFitness(), and FitnessStats::minFitness(). Referenced by EAStrategy::evolve(). |
|
Resets the stored fitness averages of multiply measured individuals. Useful when changing the objective function (old fitness values would be invalid). Definition at line 196 of file simplepopula.cc. References size(). |
|
Returns a non-const reference to the selection parameters.
Definition at line 103 of file simplepopula.h. |
|
Returns the selection parameters.
Definition at line 100 of file simplepopula.h. Referenced by Selector::linearRanking(), Selector::muLambdaSelection(), EAStrategy::print(), and Selector::tournamentSelection(). |
|
Returns the number of individuals in the population.
Definition at line 75 of file simplepopula.h. Referenced by SelectionMatrix::calculateMatrix(), EAStrategy::EAStrategy(), Selector::linearRanking(), Selector::muLambdaSelection(), print(), EAStrategy::print(), EAStrategy::recombine(), resetFitnesses(), and Selector::tournamentSelection(). |
|
> Global etaPlus parameter for linear ranking selection.
Reimplemented from Population. Definition at line 143 of file simplepopula.h. Referenced by SimplePopulation(). |
|
Minimum allowed similarity between genomes.
Definition at line 48 of file simplepopulation.h. Referenced by SimplePopulation(). |