All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gpsys.Population

java.lang.Object
   |
   +----gpsys.Population

public class Population
extends Object
implements Serializable
A Population holds all the Individuals of a generation. Additional information is maintained such as the current generation number, the average fitness and complexity of the Individuals, and the best individual in the Population.

Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.

Variable Index

 o averageComplexity
The average number of nodes in the Individuals of the Population.
 o averageFitness
The average fitness of the Population.
 o best
The fittest Individual in the Population.
 o generation
The current generation number.
 o gpParameters
The GP parameters for the problem.
 o p
The Individuals in this population.

Constructor Index

 o Population(GPParameters)

Method Index

 o evolve()
 o report(PrintWriter)
Print a report of the population using the specified PrintWriter.
 o updateStats()
Update the statistics for the Population.

Variables

 o p
 public Individual p[]
The Individuals in this population.

 o generation
 public int generation
The current generation number.

 o best
 public Individual best
The fittest Individual in the Population.

 o averageFitness
 public Fitness averageFitness
The average fitness of the Population.

 o averageComplexity
 public double averageComplexity
The average number of nodes in the Individuals of the Population.

 o gpParameters
 public GPParameters gpParameters
The GP parameters for the problem.

Constructors

 o Population
 public Population(GPParameters gpParameters)

Methods

 o evolve
 public void evolve()
 o updateStats
 public void updateStats()
Update the statistics for the Population. This involves finding the individual with the highest fitness, calculating the average fitness over the population and calculating the average complexity over the population.

 o report
 public void report(PrintWriter pw)
Print a report of the population using the specified PrintWriter. The report includes the generation number just completed, the date and time of completion, the average Fitness, the average complexity and a dump of the best Individual.

Parameters:
The - PrintWriter to use to write the report.

All Packages  Class Hierarchy  This Package  Previous  Next  Index