Packagecom.suckatmath.machinelearning.genetic.impl
Classpublic class EvolvableString
InheritanceEvolvableString Inheritance Object
Implements Evolvable

Stupid little example evolvable. Fitness is how "close" the string is to the goal string Useful only for demonstrating genetic algorithms, since gaol is already known



Public Properties
 PropertyDefined By
  genome : FixedLengthStringGenome
genome used to build this EvolvableString
EvolvableString
  goal : String = I will here give a brief sketch of the progress of opinion on the Origin of Species
[static] goal string.
EvolvableString
Public Methods
 MethodDefined By
  
create a new EvolvableString
EvolvableString
  
getFitness():Number
calculates fitness, or returns saved fitness value uses markov chain, letter distributions, and absolute letter placement
EvolvableString
  
get the FixedLengthStringGenome backing
EvolvableString
  
set the genome of this EvolvableString
EvolvableString
  
toString():String
return a String representation
EvolvableString
Property Detail
genomeproperty
public var genome:FixedLengthStringGenome

genome used to build this EvolvableString

goalproperty 
public static var goal:String = I will here give a brief sketch of the progress of opinion on the Origin of Species

goal string. By default: "I will here give a brief sketch of the progress of opinion on the Origin of Species"

Constructor Detail
EvolvableString()Constructor
public function EvolvableString()

create a new EvolvableString

Method Detail
getFitness()method
public function getFitness():Number

calculates fitness, or returns saved fitness value uses markov chain, letter distributions, and absolute letter placement

Returns
Number — Number
getGenome()method 
public function getGenome():Genome

get the FixedLengthStringGenome backing

Returns
Genome — FixedLengthStringGenome as Genome
setGenome()method 
public function setGenome(g:Genome):void

set the genome of this EvolvableString

Parameters

g:Genome — FixedLengthStringGenome

toString()method 
public function toString():String

return a String representation

Returns
String