class YAGA::Chromosomes::Matrix(T, U, V)

Included Modules

Defined in:

yaga/chromosomes/matrix.cr

Constant Summary

RANDOM_RANGE = -5_i8..5_i8

Constructors

Instance Method Summary

Instance methods inherited from module YAGA::Chromosome(SimpleMatrix(T), U, V)

activate(inputs : U) : V activate, chromosome_index chromosome_index, crossover(other : Chromosome(T(T), U, V)) : Void crossover, genes genes, layer_index layer_index, mutate : Void mutate, num_inputs num_inputs, randomize : Void randomize, replace(other : Chromosome(T(T), U, V)) : Void replace, same?(other : Chromosome) : Bool same?, size : UInt64 size, to_json(json : JSON::Builder) : Void to_json, update_random(random) : Void update_random

Constructor methods inherited from module YAGA::Chromosome(SimpleMatrix(T), U, V)

new(num_inputs, layer_index, chromosome_index)
new(pull : JSON::PullParser)
new

Constructor Detail

def self.new(num_inputs : UInt32, layer_index : UInt32, chromosome_index : UInt32, random_range : Range(T, T) = (T.new(RANDOM_RANGE.begin))..(T.new(RANDOM_RANGE.end))) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def activate(inputs : Array(SimpleMatrix(T))) : V #

[View source]
def activate(inputs : Array(Array(T))) : V #

[View source]
def activate(inputs : Array(T)) : V #

[View source]
def activate(inputs : U) : V #

[View source]
def activate(inputs : T) : V #

[View source]
def crossover(other : Chromosome) : Void #

[View source]
def mutate : Void #

[View source]
def randomize : Void #

[View source]
def replace(other : Chromosome) : Void #

[View source]
def size : UInt64 #

[View source]
def to_json(json : JSON::Builder) : Void #

[View source]