| … | … | @@ -0,0 +1,64 @@ |
| 1 | # Basal Atomese — minimal generating set + agent substrate (spec) |
| 2 | |
| 3 | Status: research spec, grounded against opencog source + Linas Vepstas's writings |
| 4 | (diaries, sheaf docs) and verified by the prototypes in `../prototypes/` and the |
| 5 | `atomspace-gpu` implementation. Distinguish VERIFIED (from source / runnable) vs |
| 6 | PROPOSED (design). |
| 7 | |
| 8 | ## 1. What Atomese is (VERIFIED, atom_types.script:76) |
| 9 | "A way of writing down executable abstract syntax trees (AST)." Two roots under |
| 10 | TOP_TYPE: `VALUE` (mutable data) and `ATOM <- VALUE` (immutable, unique, |
| 11 | persistent; NODE = type+name, LINK = type+outgoing). TruthValues are gone → |
| 12 | FloatValue vectors. `ATOM_SPACE <- FRAME <- ATOM` (an AtomSpace is an atom). |
| 13 | |
| 14 | ## 2. The minimal generating set (VERIFIED by demonstration) |
| 15 | Three concerns, not 5–6 instructions: |
| 16 | - **Structure** — `Atom` (Node + Link). The ~240 atom types are DATA (a type tag), |
| 17 | not primitives: `(Concept "x") ≡ (cog-new-node 'ConceptNode "x")`, etc. |
| 18 | - **Rewriting** — `Query` (pattern match → graph rewrite). Subsumes Put/β |
| 19 | (QueryLink "finds groundings, substitutes"), Cond (Present), recursion. |
| 20 | - **State** — `SetValue`/`ValueOf` (the only mutable channel). |
| 21 | Driven by `cog-execute!`. Proven: SK-combinators reduce via QueryLink rewrite |
| 22 | rules with zero lambdas (`prototypes/` + scratch combinator demo) ⇒ Lambda is |
| 23 | sugar. 2 is dishonest (rewriting is pure; State is a distinct mutable concern). |
| 24 | |
| 25 | ## 3. The connector reframe (PROPOSED, Linas-grounded) |
| 26 | Linas's deeper basal unit is the **typed Connector** (a half-edge): a Link is the |
| 27 | *event* of two matching connectors mating; composition = type-matching, not |
| 28 | construction. CONNECTOR/SECTION/CONNECTOR_SEQ/SHAPE_LINK are real types. "Disjuncts |
| 29 | are tensors" → a Section with n connectors is an n-tensor; mating = contraction. |
| 30 | This unifies: minimal-set, GPU (sections = sparse tensors), and agents (a |
| 31 | connector is at once a type-match primitive, a tensor index, and an I/O port). |
| 32 | |
| 33 | ## 4. The agent (VERIFIED — Linas's definition, direct correspondence 2026-06) |
| 34 | An agent = (1) a boundary (finite inside / unbounded outside), (2) a sensory |
| 35 | system, (3) a world-model, (4) a finite motor-action menu, (5) a decision-maker |
| 36 | reasoning over the world-model. Consciousness (weak) = "that which makes decisions |
| 37 | based on its world-model"; grounding = the world-model; communication = entrainment |
| 38 | of two agents. Maps to our stack: world-model = AtomSpace; decision = Query; motor |
| 39 | = executable Links; boundary/comms = StorageNode / connector-mating. |
| 40 | |
| 41 | ## 5. Hardware mapping (VERIFIED design) |
| 42 | "The graph is the index; Values are the payload." Index/structure → traversal on |
| 43 | **CUDA cores** (set-intersection = the subgraph-match hot op; RT cores are a |
| 44 | verified poor fit — control-flow-divergent). Values/payload → **tensor cores** |
| 45 | (MI/cosine/MCL = SpGEMM; FP32 for exact counts). Each device = an agent over a |
| 46 | local slice; network node = an agent; comms = StorageNode replication. Demonstrated |
| 47 | at 1M atoms (~90M queries/s) and integrated into `atomspace-gpu` (see that repo's |
| 48 | spec/gpu-query-architecture.md). |
| 49 | |
| 50 | ## 6. Value layer caveat (VERIFIED) |
| 51 | Pure MI over-favours rare pairs → use Linas's **ranked-MI** |
| 52 | `log2(count/sqrt(marg[a]·marg[b]))` (half the marginal penalty). Semirings |
| 53 | (Lobster) cover only the probabilistic-logic slice; MI/counts/cosine are non-local |
| 54 | normalized quantities, NOT semirings → keep a general per-atom Value layer. |
| 55 | |
| 56 | ## 7. Open / next |
| 57 | - General **multi-variable** GPU matcher (WCOJ backtracking) — single-variable |
| 58 | conjunctive is done. |
| 59 | - A real CUDA-kernel multiway intersection over per-relation CSR (vs current |
| 60 | GPU-index-fetch + host intersect). |
| 61 | - Values slice-table (Linas Step 4) — the open design question. |
| 62 | - `HyperStorageNode`: P2P (hypercore) StorageNode backend = the multi-machine |
| 63 | device-as-agent step. |
| 64 | - Rigorous neurosymbolic eval (measured LLM-alone vs LLM+AtomSpace). |