class NEAT::NeatOb

Basis of all NEAT objects

Attributes

controller[R]

Who's your daddy?

name[R]

Designation of this particular object instance

Public Class Methods

log() click to toggle source
# File lib/rubyneat/rubyneat.rb, line 93
def self.log ; $log; end
new(controller = nil, name = nil) click to toggle source

Initializer for all NEAT objects. Requires that the controller object is specified for all classes with the exception of the Controller itself or the Controller's NeatSettings.

# File lib/rubyneat/rubyneat.rb, line 99
def initialize(controller = nil, name = nil)
  @name = unless name.nil?
            name.to_sym
          else
            NEAT::random_name_generator
          end
  unless controller.nil?
    @controller = controller
  else
    raise NeatException.new "Controller Needed!" unless self.is_a?(Controller) or self.is_a?(Controller::NeatSettings)
    @controller = self unless self.is_a? Controller::NeatSettings
  end
end

Public Instance Methods

log() click to toggle source
# File lib/rubyneat/rubyneat.rb, line 92
def log ; $log ; end
to_s() click to toggle source
# File lib/rubyneat/rubyneat.rb, line 113
def to_s
  "%s<%s>" % [self.class, self.name]
end