Skip to content

Ship always-on simulated cognitive accounting core (AtomSpace, PLN, ECAN, tensor k-means) - #8

Merged
drzo merged 3 commits into
stablefrom
copilot/explore-codebase-implementation-plan
Aug 20, 2026
Merged

Ship always-on simulated cognitive accounting core (AtomSpace, PLN, ECAN, tensor k-means)#8
drzo merged 3 commits into
stablefrom
copilot/explore-codebase-implementation-plan

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown

Replace the broken/merge-conflicted cognitive scaffold with a correct, always-buildable simulated core so Chart-of-Accounts mirroring, ledger validation, attention, and clustering work without OpenCog or ggml.

Cognitive engine (libgnucash/engine)

  • Rewrite gnc-cognitive-accounting as an in-process AtomSpace (handles, outgoing/incoming, SimpleTV, STI/LTI)
  • Account/transaction mapping; PLN double-entry & n-entry TVs; trial-balance / P&L proof reports
  • ECAN wage/rent/decay + Hebbian co-occurrence; MOSES heuristic strategies (JSON); URE point estimate + bounds
  • Split messaging: GncCognitiveAtomMessage (accounting) vs GncCognitiveModuleMessage (comms hub); C receive via GArray*
  • Scheme path is export-only (no untrusted eval of book data)

Lifecycle & build

  • Init/shutdown from gnc_engine_init / gnc_engine_shutdown; auto QOF hooks behind GNC_COGNITIVE_AUTO=1
  • Optional HAVE_GGML link/include on gnc-engine; config.h template updated

Tensor network

  • Feature schema v1 (8-d); real k-means / Cogfluence clustering; control messages without payload for task/autonomy nodes

Tests & docs

  • Align unit tests with TV semantics and commodity fixtures (test-cognitive-accounting, test-tensor-network)
  • test-cognitive-accounting.sh runs ctest when a build tree exists
  • Truth-up COGNITIVE_ACCOUNTING.md and IMPLEMENTATION_REPORT.md
gnc_cognitive_accounting_init();
GncAtomHandle a = gnc_account_to_atomspace(acct);
gdouble score = gnc_pln_validate_double_entry(tx);  /* ~strength×confidence */
/* auto hooks: GNC_COGNITIVE_AUTO=1 */

Out of scope here: Guile module / UI reports, real OpenCog backend adapter, large-book hardening.

Copilot AI and others added 2 commits August 17, 2026 20:57
Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
…end, benchmarks

Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Copilot AI requested a review from drzo August 19, 2026 21:48
@drzo
drzo marked this pull request as ready for review August 20, 2026 01:12
@drzo
drzo merged commit 843099a into stable Aug 20, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants