class Ai::Neat::Node
Attributes
value[RW]
weights[RW]
Public Class Methods
new()
click to toggle source
# File lib/ai/neat/node.rb, line 8 def initialize @value = 0 @weights = [] end
Public Instance Methods
initWeights(count)
click to toggle source
# File lib/ai/neat/node.rb, line 13 def initWeights(count) (1..count).each do |_i| weights.push(rand(-1.0..1.0)) end end