com.anji.tournament
Class TournamentFitnessFunction

java.lang.Object
  extended bycom.anji.tournament.TournamentFitnessFunction
All Implemented Interfaces:
BulkFitnessFunction, Configurable, java.io.Serializable

public class TournamentFitnessFunction
extends java.lang.Object
implements BulkFitnessFunction, Configurable

Fitness function in which chromosomes are evaluated by their phenotypes playing a set of matches. Specific tournaments decide which opponents and how many matches and games are played.

Author:
Philip Tucker
See Also:
Serialized Form

Constructor Summary
TournamentFitnessFunction()
          ctor - must call init(Properties) after this
TournamentFitnessFunction(Tournament aTournament, PlayerTranscriber aTranscriber)
          ctor
 
Method Summary
 void evaluate(java.util.List chroms)
          Calculates and sets the fitness values on each of the given Chromosomes via their setFitnessValue() method.
 int getMaxFitnessValue()
           
 void init(Properties props)
          See Parameter Details for specific property settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TournamentFitnessFunction

public TournamentFitnessFunction()
ctor - must call init(Properties) after this


TournamentFitnessFunction

public TournamentFitnessFunction(Tournament aTournament,
                                 PlayerTranscriber aTranscriber)
ctor

Parameters:
aTournament -
aTranscriber -
Method Detail

init

public void init(Properties props)
See Parameter Details for specific property settings.

Specified by:
init in interface Configurable
Parameters:
props -

evaluate

public void evaluate(java.util.List chroms)
Description copied from interface: BulkFitnessFunction
Calculates and sets the fitness values on each of the given Chromosomes via their setFitnessValue() method.

Specified by:
evaluate in interface BulkFitnessFunction
Parameters:
chroms - List contains Chromosome objects for which the fitness values must be computed and set.
See Also:
BulkFitnessFunction.evaluate(java.util.List)

getMaxFitnessValue

public int getMaxFitnessValue()
Specified by:
getMaxFitnessValue in interface BulkFitnessFunction
Returns:
int maximum possible fitness value this function will return
See Also:
BulkFitnessFunction.getMaxFitnessValue()