class

Attention::AttentionBank

Inherits Reference < Object

Manages the economic attention allocation system

Constructors

new(atomspace : AtomSpace::AtomSpace, af_max_size : Int32 = ECANParams::AF_MAX_SIZE, af_min_size : Int32 = ECANParams::AF_MIN_SIZE)

Instance methods

add_lti_funds(amount : Int16)
add_sti_funds(amount : Int16)

Add funds to the bank (used by rent collection)

af_max_size

Target and current focus parameters

af_min_size
atomspace

Associated atomspace

attentional_focus

Attentional focus - atoms with highest STI

calculate_lti_wage

Calculate LTI wage based on current funds

calculate_sti_wage

Calculate STI wage based on current funds

get_af_max_sti

Get maximum STI in attentional focus

get_af_min_sti

Get minimum STI for attentional focus

get_attention_value(handle : AtomSpace::Handle) : AtomSpace::AttentionValue | Nil

Get attention value for an atom

get_statistics

Get statistics about current attention allocation

in_attentional_focus?(handle : AtomSpace::Handle) : Bool

Check if atom is in attentional focus

lti_funds
lti_wage
set_attention_value(handle : AtomSpace::Handle, av : AtomSpace::AttentionValue)

Set attention value for an atom

sti_funds

Current attention funds

sti_wage

Fund buffers for wage calculations

stimulate(handle : AtomSpace::Handle, stimulus : Int16 = 10_i16)

Stimulate an atom by increasing its STI

subtract_lti_funds(amount : Int16)
subtract_sti_funds(amount : Int16)

Subtract funds from the bank (used by stimulation/boosting)

to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>