class Crowbar::Evolution::Manager

Overview

Coordinates genetic algorithm feedback, selection, crossover, Multi-Armed Bandit credit assignment, and anti-stagnation.

Defined in:

crowbar/evolution/manager.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(population_size : Int32 = 64) #

Instance Method Detail

def bandit : Bandit #

def corpus : Corpus #

def crossover_rate : Float64 #

def crossover_rate=(crossover_rate : Float64) #

def enabled : Bool #

def enabled=(enabled : Bool) #

def exploration_rate : Float64 #

def exploration_rate=(exploration_rate : Float64) #

def harvest_feedback(text : String) : Array(String) #

Extracts tokens, identifiers, and hex constants from target error messages


def harvested_tokens : Set(String) #

def last_applied_mutators : Array(String) #

def last_applied_mutators=(last_applied_mutators : Array(String)) #

def last_best_fitness : Float64 #

def next_parent(baseline : Buffer, prng : PRNG) : Buffer #

Selects or generates the starting parent buffer for the next mutation round


def report(data : Buffer | Bytes | String, fitness : Float64, feature : String | Nil = nil, coverage_hash : UInt64 | Nil = nil) #

Report fitness outcome for a candidate (continuous score) with optional feature & coverage telemetry


def report(data : Buffer | Bytes | String, success : Bool, feature : String | Nil = nil, coverage_hash : UInt64 | Nil = nil) #

Report binary success outcome (converted to fitness 1.0 vs 0.0)


def selection_strategy : Symbol #

def selection_strategy=(selection_strategy : Symbol) #

def stagnation_count : Int32 #

def stagnation_limit : Int32 #

def stagnation_limit=(stagnation_limit : Int32) #

def total_evaluations : Int64 #

def tournament_size : Int32 #

def tournament_size=(tournament_size : Int32) #