JAGA Homepage

org.jaga.definitions
Interface Fitness

All Known Implementing Classes:
AbsoluteFitness, ClassifierFitness

public interface Fitness

Basis for all classes which implement the fitness of an individual. Every individual has a property of this type (its subtype), which describes how fit that indivudual is compared to others. It must be possible to compare two fitness-objects. However, the fitnesses of all indivuduals in the population are not nessecerily all comparable: for example, it is possible that the fitness is determined in an N-Tournament selection process. According to the nature of that tournament the fitness might not be absolut, i.e. fitness doen not have to be transitive: A < B and B < C does not always mean A <. In particular, this applies to fitnesses of game strategies.

Project: JAGA - Java API for Genetic Algorithms.

Company: University College London and JAGA.Org (http://www.jaga.org).

Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ONLY if you include a note of the original author(s) in any redistributed/modified copy.
This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/gpl.html

Version:
JAGA public release 1.0 Beta
Author:
Greg Paperin (greg@jaga.org)

Method Summary
 boolean isBetter(Fitness fitness)
          Compares this fitness to the specified fitness.
 boolean isWorse(Fitness fitness)
          Compares this fitness to the specified fitness.
 

Method Detail

isBetter

boolean isBetter(Fitness fitness)
                 throws java.lang.ClassCastException
Compares this fitness to the specified fitness.

Parameters:
fitness - - another fitness object.
Returns:
true, if this fitness is "fitter" then the specified, false otherwise.
Throws:
java.lang.ClassCastException - if these types of fitness are not comparable.

isWorse

boolean isWorse(Fitness fitness)
                throws java.lang.ClassCastException
Compares this fitness to the specified fitness.

Parameters:
fitness - - another fitness object.
Returns:
true, if this fitness is "less fit" then the specified, false otherwise.
Throws:
java.lang.ClassCastException - if these types of fitness are not comparable.

JAGA Homepage

Go to JAGA Homepage