Module: Legion::Extensions::Agentic::Self::Anchor::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/self/anchor/helpers/constants.rb

Constant Summary collapse

ANCHOR_TYPES =
%i[belief assumption experience authority number].freeze
CHAIN_MATERIALS =
%i[steel rope wire thread cobweb].freeze
MAX_ANCHORS =
200
MAX_CHAINS =
100
DRAG_RATE =
0.06
DRIFT_RATE =
0.03
BREAK_THRESHOLD =
0.1
GRIP_LABELS =
[
  [(0.8..),      :ironclad],
  [(0.6...0.8),  :firm],
  [(0.4...0.6),  :moderate],
  [(0.2...0.4),  :loose],
  [..0.2,        :drifting]
].freeze
FLEXIBILITY_LABELS =
[
  [(0.8..),      :elastic],
  [(0.6...0.8),  :flexible],
  [(0.4...0.6),  :moderate],
  [(0.2...0.4),  :rigid],
  [..0.2,        :brittle]
].freeze

Class Method Summary collapse

Class Method Details

.label_for(table, value) ⇒ Object



36
37
38
39
# File 'lib/legion/extensions/agentic/self/anchor/helpers/constants.rb', line 36

def self.label_for(table, value)
  table.each { |range, label| return label if range.cover?(value) }
  table.last.last
end