class

Moses::Deme

Inherits Reference < Object

A deme represents a subpopulation exploring a specific region of the program space

Constructors

new(exemplar : Candidate, scoring_function : ScoringFunction, size : Int32 = 20)

Instance methods

best_candidates(count : Int32 = 5) : Array(Candidate)

Get the best candidates from this deme

best_score
best_score=(best_score : CompositeScore | Nil)
exemplar
exemplar=(exemplar : Candidate)
expand_from_exemplar

Expand the deme by generating variations of the exemplar

generation
generation=(generation : Int32)
optimize(max_generations : Int32 = 10) : Array(Candidate)

Optimize the deme using local search

population
population=(population : Array(Candidate))
scoring_function
scoring_function=(scoring_function : ScoringFunction)
size
size=(size : Int32)
statistics

Get statistics about this deme