class

Crowbar::Evolution::Corpus

Inherits Reference < Object

Population pool managing candidate test inputs scored by fitness, augmented with multi-feature coverage bucketing for novelty preservation.

Constructors

new(max_size : Int32 = 64)
Source

Instance methods

add(candidate : Candidate) : Bool

Adds a candidate to the population pool. If the candidate discovers an unseen feature or coverage hash, it is permanently bucketed.

Source
all_unique_candidates

Returns the combined set of general population and novelty feature representatives

Source
best
Source
candidates
Source
clear
Source
coverage_buckets
Source
cull_stagnant(keep_ratio : Float64 = 0.5)

Purges bottom half of population during stagnation to clear local minima Note: Novelty feature buckets are strictly preserved

Source
empty?
Source
feature_buckets
Source
has_coverage_hash?(cov : UInt64) : Bool

Checks if a coverage hash has already been discovered

Source
has_feature?(feature : String) : Bool

Checks if a feature tag has already been discovered

Source
max_size
Source
max_size=(max_size : Int32)
Source
roulette_select(prng : PRNG) : Candidate | Nil

Fitness-proportional (Roulette Wheel) Selection

Source
size
Source
tournament_select(prng : PRNG, k : Int32 = 4) : Candidate | Nil

K-way Tournament Selection across general and novelty candidates

Source