GODPAPER | All Packages | All Classes | Index | Frames No Frames |
EvolvableComparator

Package | com.suckatmath.machinelearning.genetic.core
Interface | public interface EvolvableComparator
Implementors | GeneticEngine

Compares one Evolvable to another. Used in TOURNAMENT selection. GeneticEngine implements this with a simple getFitness comparison, used by default in TOURNAMENT selection

Public Methods

| Method | Defined By
--- | --- | ---
|  | compareFitness(e1:Evolvable, e2:Evolvable):int Compare one Evolvable to another of the same type. | EvolvableComparator

Method Detail

compareFitness | () | method

`public function compareFitness(e1:Evolvable, e2:Evolvable):int`

Compare one Evolvable to another of the same type. It is not necessarily an error to pass two different types of Evolvables, but it is discouraged.

Parameters

| `e1:Evolvable`
| `e2:Evolvable`

Returns

| `int` —

Thu Jan 16 2014, 01:11 PM +08:00