class NEAT::BasicNeuronTypes::BiasNeuron

Special class of neuron that provides a bias signal.

FIXME: The bias value is not behaving as expected because
FIXME: the instance is not the neuron, but the phenotype.

Attributes

neu_bias[RW]

Public Class Methods

bias?() click to toggle source
# File lib/rubyneat/neuron.rb, line 90
def self.bias? ; true ; end
new(c=nil, n=nil) click to toggle source
Calls superclass method
# File lib/rubyneat/neuron.rb, line 93
def initialize(c=nil, n=nil)
  super
  @neu_bias = 1.00
end

Public Instance Methods

express(instance) click to toggle source

Just provides a bias signal FIXME: we had to hard-code the value here for now. Not a biggie, FIXME: but really should be @neu_bias

# File lib/rubyneat/neuron.rb, line 101
def express(instance)
  instance.define_singleton_method(@name) { 1.00 }
end