anthill.genie.impl
Class FindingFitness

java.lang.Object
  |
  +--anthill.genie.impl.FindingFitness
All Implemented Interfaces:
Fitness

public class FindingFitness
extends java.lang.Object
implements Fitness

Evaluate the fitness of a particular ant algorithm based on the statistics collected during its simulation.

This implementation returns the ratio between the number of resources found and the number of resources searched.

Used keys: FoundResources, RequestedResources

Version:
$Revision$
Author:
Alberto Montresor

Constructor Summary
FindingFitness()
           
 
Method Summary
 float compute(Stats stats)
          Evaluate the fitness of a particular ant algorithm based on the statistics collected during its simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindingFitness

public FindingFitness()
Method Detail

compute

public float compute(Stats stats)
Evaluate the fitness of a particular ant algorithm based on the statistics collected during its simulation.

This implementation returns the ratio between the number of resources found and the number of resources searched.

Specified by:
compute in interface Fitness