class Crowbar::MutatorPool

Overview

Registry and adaptive selection engine for mutators. Supports both adaptive score weighting and UCB1 Multi-Armed Bandit credit assignment.

Defined in:

crowbar/mutators/pool.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Instance Method Detail

def bandit : Evolution::Bandit | Nil #

def bandit=(bandit : Evolution::Bandit | Nil) #

def find!(name : String) : Mutator #

Finds mutator by name or raises an exception


def find?(name : String) : Mutator | Nil #

Finds mutator by short or full name or alias


def mutate(context : Context, buffer : Buffer, target_range : Tuple(Int32, Int32) | Nil = nil, preferred_mutator : Mutator | Nil = nil, bandit_override : Evolution::Bandit | Nil = nil) : Bool #

Executes a mutation round, dynamically adjusting the selected mutator's score


def mutators : Array(Mutator) #

def register(mutator : Mutator) #

def register_defaults #

def select_mutator(prng : PRNG, bandit_override : Evolution::Bandit | Nil = nil) : Mutator #

Selects a mutator based on weighted distribution or UCB1 bandit score


def use_bandit : Bool #

def use_bandit=(use_bandit : Bool) #