Tournament
PyCellChemistry documentation index
/Users/lidia/main/research/acbook/web/website/ac-home/pycellchem/pycellchem-2.0/src/Tournament.py

#---------------------------------------------------------------------------
#
# Tournament.py: GA with tournament selection in a chemistry, similar
# to the algorithm presented in the catalytic search papers below,
# adapted for chapter 7 of the book.
#
# References:
#
# Lidia Yamamoto and Wolfgang Banzhaf, Catalytic search in dynamic
# environments. Artificial Life XII. MIT Press 2010, pages 277-285.
#
# Lidia Yamamoto, Evaluation of a catalytic search algorithm,
# Studies in Computational Intelligence volume 284, Springer 2010,
# pages 75-87.
#
# by Lidia Yamamoto, Kraainem, Belgium, July 2013
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Copyright (C) 2015 Lidia A. R. Yamamoto
# Contact: http://www.artificial-chemistries.org/
#
# This file is part of PyCellChemistry.
#
# PyCellChemistry is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3, as published by the Free Software Foundation.
#
# PyCellChemistry 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyCellChemistry, see file COPYING. If not, see
# http://www.gnu.org/licenses/
#


Modules
artchem.BinaryStrings
numpy
sys


Classes
Evolution.Evolution
Tournament


class Tournament(Evolution.Evolution)
Methods defined here:
__init__(self)
start the tournament experiment with an intentionally bad
initial population
run(self, niter=1000)
run tournaments for 'niter' iterations
tournament1(self, toursize)
tournament competition among individuals, variant 1:
looser dies, winner reproduces asexually, the child gets mutated
with a probability
tournament2(self, toursize)
tournament variant 2: two winners recombine with a probability,
their children replace two loosers
tournament3(self, toursize)
tournament variant 3: with crossover and mutation combined

Methods inherited from Evolution.Evolution:
avgfitness(self)
compute the average fitness of the population
bestworstfit(self, mset)
find the best and worst individuals in a given multiset
fitness(self, binstr)
calculate the fitness of an individual (normalized to one)
optimum(self)
produce an optimum individual for the desired fitness function
randmol(self)
generate a random molecule in the form of an N-bit integer


Generated automatically by pydoc, July 10, 2015