class NEAT::BasicNeuronTypes::LinearNeuron
Linear function (CPPN) – simply add up all the inputs.
Public Instance Methods
express(instance)
click to toggle source
create a function on the instance with our name that sums all inputs only.
# File lib/rubyneat/neuron.rb, line 160 def express(instance) instance.define_singleton_method(@name) {|*inputs| inputs.reduce {|p, q| p + q} } end