Repository is archived
No release in over 3 years
Thagard's coherence theory: constraint satisfaction across beliefs, goals, and evidence for brain-modeled agentic AI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

lex-cognitive-coherence

Thagard's coherence theory for LegionIO: constraint satisfaction across beliefs, goals, and evidence for brain-modeled agentic AI.

What It Does

Beliefs are not isolated — they support or contradict each other. This extension builds a constraint network of propositions, where positive constraints (explanatory, deductive, analogical, perceptual, conceptual, deliberative) pull propositions toward mutual acceptance, and negative constraints push them apart. The coherence engine runs iterative constraint satisfaction to maximize global coherence, accepting propositions that cohere well with the network and rejecting those that don't.

Usage

client = Legion::Extensions::CognitiveCoherence::Client.new

p1 = client.add_coherence_proposition(content: 'The agent should be transparent', domain: :ethics)
p2 = client.add_coherence_proposition(content: 'Transparency builds trust', domain: :ethics)
p3 = client.add_coherence_proposition(content: 'Transparency risks privacy', domain: :ethics)

client.add_coherence_constraint(
  prop_a_id: p1[:proposition_id],
  prop_b_id: p2[:proposition_id],
  constraint_type: :explanatory,
  positive: true
)

client.add_coherence_constraint(
  prop_a_id: p1[:proposition_id],
  prop_b_id: p3[:proposition_id],
  constraint_type: :deliberative,
  positive: false
)

client.maximize_coherence
client.find_contradictions
client.cognitive_coherence_stats

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT