module DSLSetup
Constants
- XOR_INPUTS
The number of inputs to the xor function
Public Instance Methods
xor(*inp)
click to toggle source
Basic xor function we shall evolve a net for. Only goes true on one and only one true input, false otherwise.
# File spec/lib/rubyneat/rubyneat_spec.rb, line 11 def xor(*inp) p = 0 inp.each {|i| p += 1 if i} return p == 1 end