abstract class Ai4cr::Breed::Manager(T)

Included Modules

Direct Known Subclasses

Defined in:

ai4cr/breed/manager.cr

Constant Summary

CHARTER = begin min = 0.0 max = 1.0 precision = 2.to_i8 in_bw = true reversed = false AsciiBarCharter.new(min: min, max: max, precision: precision, in_bw: in_bw, inverted_colors: reversed) end

CHARTER = AsciiBarCharter.new(0.0, 1.0, 2.to_i8, true, false)

HIGH_ENOUGH_ERROR_DISTANCE_FOR_REPLACEMENT = Math.sqrt(Float64::HIGH_ENOUGH_FOR_NETS)

HIGH_ENOUGH_ERROR_DISTANCE_FOR_REPLACEMENT = 1e4 # TODO: Probably should base this on some factor of the number of outputs.

MAX_MEMBERS_DEFAULT = QTY_NEW_MEMBERS_DEFAULT
PURGE_ERROR_LIMIT_SCALE = 1
QTY_NEW_MEMBERS_DEFAULT = 10
STEP_MAJOR = 4 * STEP_MINOR
STEP_MINOR = 4
STEP_SAVE = 4 * STEP_MAJOR

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.counter : CounterSafe::Exclusive #

[View source]

Instance Method Detail

def auto_save(team_members, i) #

[View source]
def breed(parent_a : T, parent_b : T, delta = 0.5) #

[View source]
def breed_counter_tick #

[View source]
def breed_id_and_delta(child, birth_id, parent_a, parent_b, delta) #

[View source]
def breed_validations(parent_a : T, parent_b : T, delta) #

[View source]
def build_team : Array(T) #

[View source]
def build_team(qty_new_members : Int32, **params) : Array(T) #

[View source]
def copy_and_mix(parent_a, parent_b, delta) #

[View source]
def counter #

[View source]
def counter_reset(value = 0) #

[View source]
def create(**params) #

[View source]
def cross_breed(team_members : Array(T)) #

[View source]
def estimate_better_delta(error_a : Float64, error_b : Float64) #

[View source]
def estimate_better_delta(ancestor_a : T, ancestor_b : T) #

[View source]
def eval_team(team_members, inputs) #

[View source]
def eval_team_in_parallel(team_members, inputs) #

[View source]
def eval_team_in_parallel_using_sequence(team_members, inputs_sequence) #

[View source]
def gen_params #

[View source]
def log_before_vs_after(beginning, before, i, i_max, verbose) #

[View source]
def log_correct_guess_stats(tc_size, i, max_hists, team_members, list, recent_hists, verbose) #

[View source]
def log_summary_info(member, i, j) #

[View source]
def mix_nested_parts(parent_a_part, parent_b_part, delta) #

[View source]
def mix_one_part_number(parent_a_part : Number, parent_b_part : Number, delta) #

[View source]
def mix_one_part_string(parent_a_part : String, parent_b_part : String, delta) #

[View source]
def mix_parts(child : T, parent_a : T, parent_b : T, delta) #

abstract


[View source]
def parts_to_copy(parent_a : T, parent_b : T, delta) #

[View source]
def sort_members(team_members) #

def pick_to_members(team_members, max_members)


[View source]
def sort_purge_replace(max_members, team_members, purge_error_limit, i, tc_size, max_hists, list, recent_hists, verbose) #

[View source]
def train_team(inputs, outputs, team_members : Array(T), max_members = MAX_MEMBERS_DEFAULT, train_qty = 1, and_cross_breed = true) #

[View source]
def train_team_in_parallel(inputs, outputs, team_members, train_qty) #

[View source]
def train_team_using_sequence(inputs_sequence, outputs_sequence, team_members : Array(T), io_set_text_file : Ai4cr::Utils::IoData::Abstract | Nil, max_members = MAX_MEMBERS_DEFAULT, train_qty = 1, and_cross_breed = true, purge_error_limit = -1, verbose = true) #

[View source]
def update_member_comparisons(io_set_text_file, inputs, outputs, member, tc_size, training_set_seq, mem_seq, verbose) #

[View source]
def update_member_correct_comparisons(output_str_matches, tc_size, member) #

[View source]
def update_member_output_comparisons(io_set_text_file, outputs, member) #

[View source]