Repository is archived
No release in over 3 years
George Miller's 7+/-2 principle: groups information items into hierarchical chunks to model working memory capacity
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-chunking

LEX extension for LegionIO implementing George Miller's 7+/-2 cognitive chunking principle. Groups individual information items into meaningful chunks and models working memory capacity constraints.

What It Does

Raw information items are pooled and then grouped into named chunks. Chunks can be merged hierarchically (items -> concepts -> schemas) to reduce working memory footprint. A bounded working memory holds up to 7 chunks (capacity varies +/- 2); loading beyond capacity triggers an overloaded state. Recall strength decays over time; reinforcement on access keeps important chunks alive.

Usage

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

r1 = client.add_item(content: 'e4 e5', domain: :chess)
r2 = client.add_item(content: 'Nf3 Nc6', domain: :chess)
r3 = client.add_item(content: 'Bb5', domain: :chess)

chunk = client.create_chunk(
  label: 'Ruy Lopez opening',
  item_ids: [r1[:item_id], r2[:item_id], r3[:item_id]]
)

client.load_to_working_memory(chunk_id: chunk[:chunk_id])
client.working_memory_status
# => { size: 1, capacity: 7, load: 0.14, label: :spacious, overloaded: false }

client.decay_all           # call periodically for recall decay
client.reinforce_chunk(chunk_id: chunk[:chunk_id])  # boost on access
client.chunking_report

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT