Moses::MetaPopulation
Inherits Reference < Object
The metapopulation maintains the best candidates found across all demes and is responsible for spawning new demes for exploration
Constructors
new(params : MosesParams, scoring_function : ScoringFunction)
new(params : MosesParams)
Convenience constructor for self.new in moses.cr
Instance methods
best_candidate
Get the single best candidate
best_candidates(count : Int32 = 10) : Array(Candidate)
Get the best candidates from the metapopulation
best_score
best_score=(best_score : CompositeScore | Nil)
calculate_statistics
Calculate population statistics
candidates
candidates=(candidates : Array(Candidate))
deme_expander
deme_expander=(deme_expander : DemeExpander)
generations
generations=(generations : Int32)
max_size
max_size=(max_size : Int32)
run(scoring_func : ScoringFunction, max_evals : Int32) : Array(Candidate)
Main evolutionary loop
scoring_function
scoring_function=(scoring_function : ScoringFunction)
size
Get current population size
stagnation_count
stagnation_count=(stagnation_count : Int32)
total_evals
total_evals=(total_evals : Int32)