class

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)
Source
new(params : MosesParams)

Convenience constructor for self.new in moses.cr

Source

Instance methods

best_candidate

Get the single best candidate

Source
best_candidates(count : Int32 = 10) : Array(Candidate)

Get the best candidates from the metapopulation

Source
best_score
Source
best_score=(best_score : CompositeScore | Nil)
Source
calculate_statistics

Calculate population statistics

Source
candidates
Source
candidates=(candidates : Array(Candidate))
Source
deme_expander
Source
deme_expander=(deme_expander : DemeExpander)
Source
generations
Source
generations=(generations : Int32)
Source
max_size
Source
max_size=(max_size : Int32)
Source
run(scoring_func : ScoringFunction, max_evals : Int32) : Array(Candidate)

Main evolutionary loop

Source
scoring_function
Source
scoring_function=(scoring_function : ScoringFunction)
Source
size

Get current population size

Source
stagnation_count
Source
stagnation_count=(stagnation_count : Int32)
Source
total_evals
Source
total_evals=(total_evals : Int32)
Source