Pangine

related work

Related work

Pangine borrows from or resembles work in reasoning systems, databases, linguistics, cognitive science, and machine learning. Each entry below says what the other work is, what Pangine shares with it, how it differs, and where the other work goes further.

The descriptions rest on the cited sources. Pangine is described as the current executable behaves; the how it works page explains the parts named here.

WorkClosest part of PangineWhere it goes further
NARSEvidence counts read as probabilitiesDerives new statements with inference rules under limited resources
OpenCog and PLNOne store for data and queriesProbabilistic inference and graph rewriting
DatalogExact questions with shared blanksRules, recursion, and optimized evaluation
Provenance semiringsProducts and sums of evidenceOne algebra for many kinds of annotation
Data-Oriented ParsingAnswers built from remembered wholes and partsA probabilistic model of parsing
Analogy and case-based reasoningGeneralized answers from similar casesRelational mapping, and revising and retaining solutions
Witten-Bell smoothingInterpolation between answer levelsUsed as is; other smoothing predicts text better
Adaptor and fragment grammarsStored wholes against composed partsLearning what to store
HCM and HVMGeneralizing from similar casesLearning chunks and variables from data
MENACEThe tic-tac-toe demoThe original learner
MapReducePartitionsDistribution across machines with fault tolerance

NARS

The Non-Axiomatic Reasoning System is Pei Wang's reasoning system for working with insufficient knowledge and resources. Its truth values come from evidence: frequency is the share of positive evidence, f = w+ / w, and confidence, c = w / (w + k), grows with the total amount of evidence, where k is a constant, usually 1. Its revision rule combines distinct bodies of evidence for the same statement, and syllogistic rules derive new statements from premises that share a term.

Pangine also reads remembered evidence rather than assigned truth: a count is an amount of evidence, and an answer's probability is a relative frequency of evidence, as NARS's frequency is, though Pangine's is a value's share among alternatives rather than positive against negative evidence for one statement. Pangine's first version kept a probability and a strength for each piece of evidence, a pair close in spirit to frequency and confidence. Pangine keeps no separate confidence and derives nothing; it matches questions against what it remembers. NARS goes further: it reasons with its rules, and it manages limited time and memory as part of its design.

Source: Pei Wang (2013), Non-Axiomatic Logic: A Model of Intelligent Reasoning, World Scientific.

OpenCog and PLN

OpenCog's AtomSpace is an in-memory knowledge database of immutable, globally unique, typed Atoms, with a query engine that finds the Atoms matching a pattern. Its queries are graphs of Atoms too, so they can be stored and examined like the data they search. A truth value on an Atom pairs a probability with a confidence. Probabilistic Logic Networks (PLN) is the uncertain-inference framework built on this representation.

Pangine shares that idea: its Concepts are immutable and unique within an engine, and its questions and answers are Concepts like the experience they come from. It differs in keeping uncertainty as evidence counts on remembered experiences rather than as truth values on every Atom, and in having no rule engine. OpenCog goes further: PLN infers with induction, abduction, and analogy, and the AtomSpace supports graph rewriting.

Sources: the OpenCog AtomSpace README; Ben Goertzel, Matthew Iklé, Izabela Freire Goertzel, and Ari Heljakka (2008), Probabilistic Logic Networks: A Comprehensive Framework for Uncertain Inference, Springer.

Datalog

Datalog queries relational facts with rules. A query is a conjunction of patterns, and a variable shared between patterns joins the facts that match them. Rules, including recursive ones, derive new facts.

An exact @ question works like a conjunctive query: its parts are patterns, and a repeated blank is a shared variable. Pangine's facts are whole remembered experiences with counts, parts of a question without a shared blank must be proven by one source, and every answer row keeps the sources that prove it. Pangine has no rules or recursion. Datalog goes further with both, with well-studied semantics and optimized evaluation.

Source: Stefano Ceri, Georg Gottlob, and Letizia Tanca (1989), What You Always Wanted to Know About Datalog (And Never Dared to Ask), IEEE Transactions on Knowledge and Data Engineering 1(1).

Provenance semirings

Green, Karvounarakis, and Tannen showed that relational queries over bag semantics, incomplete and probabilistic databases, and why-provenance are particular cases of one computation over commutative semirings. Every tuple carries an annotation: alternative derivations combine with addition and joined tuples with multiplication. With the natural numbers the result is bag semantics, and polynomials over source tuples give the most general provenance.

Pangine's evidence follows the same pattern: joined sources multiply their counts and alternative rows add, close to bag semantics, and each row's sources are its provenance. Pangine counts one source once within a row, even when it proves several parts, so it is not plain bag semantics, and its annotation is always a count. The semiring framework goes further, covering many kinds of annotation in one algebra and extending to recursive Datalog. It is also why keeping provenance does not by itself distinguish Pangine.

Source: Todd J. Green, Grigoris Karvounarakis, and Val Tannen (2007), Provenance Semirings, PODS.

Data-Oriented Parsing

Data-Oriented Parsing (DOP), proposed by Remko Scha and first worked out by Rens Bod, analyzes a new sentence by combining fragments of the analyzed sentences in a corpus. Fragments are weighed by how often they occur, and a parse's probability counts every combination of fragments that produces it. Bod later described DOP as an experience-based theory of language: understanding works with representations of concrete past experiences rather than abstract rules.

Pangine likewise answers from remembered whole experiences rather than rules, and its composed rows combine parts of separate experiences. It composes only the parts of one question, and it keeps answers seen whole ahead of composed ones by interpolation. DOP goes further as a probabilistic model of parsing, with fragments of any size, evaluated on annotated corpora.

Sources: Rens Bod (1992), A Computational Model of Language Performance: Data Oriented Parsing, COLING; Rens Bod (1998), Beyond Grammar: An Experience-Based Theory of Language, CSLI Publications.

Analogy and case-based reasoning

Dedre Gentner's structure-mapping theory treats analogy as mapping relations from a familiar domain onto a new one, preferring connected systems of relations to isolated facts. The Structure-Mapping Engine implements it. Case-based reasoning solves a new problem by retrieving similar past cases, reusing their solutions, revising the result, and retaining it for later.

The generalized level of @~ is a small form of both. It retrieves each remembered case that matches the question's shape, aligns the case's names with the question's, and maps the case's answer back into the question's terms. Its similarity is only a count of differing name occurrences, with no preference for connected relations, and Pangine neither revises a generalized answer nor retains it unless a program remembers it. Structure mapping goes further by evaluating mappings by their relational structure and proposing inferences, and case-based systems adapt solutions with domain knowledge.

Sources: Dedre Gentner (1983), Structure-Mapping: A Theoretical Framework for Analogy, Cognitive Science 7(2); Brian Falkenhainer, Kenneth D. Forbus, and Dedre Gentner (1989), The Structure-Mapping Engine: Algorithm and Examples, Artificial Intelligence 41(1); Agnar Aamodt and Enric Plaza (1994), Case-Based Reasoning: Foundational Issues, Methodological Variations, and System Approaches, AI Communications 7(1).

Witten-Bell smoothing

Witten and Bell's method for the zero-frequency problem comes from adaptive text compression: it estimates the chance of something new from how many distinct things have been seen. In language modeling it interpolates each order of model with the next lower one, giving the lower order a weight set by the number of distinct words seen after the context.

@~ uses that interpolation unchanged across its levels in place of model orders: each level's counts mix with the next wider level, weighted by the number of values the level supports. Pangine chose it because it needs no tuned parameter. In Chen and Goodman's comparison for language modeling, variants of Kneser-Ney smoothing consistently did better.

Sources: Ian H. Witten and Timothy C. Bell (1991), The Zero-Frequency Problem: Estimating the Probabilities of Novel Events in Adaptive Text Compression, IEEE Transactions on Information Theory 37(4); Stanley F. Chen and Joshua Goodman (1999), An Empirical Study of Smoothing Techniques for Language Modeling, Computer Speech and Language 13(4).

Adaptor and fragment grammars

Adaptor grammars extend probabilistic context-free grammars with adaptors. With a Pitman-Yor adaptor, a grammar caches the subtrees it has generated, with their counts, so subtrees it has generated before become more probable than others. Fragment grammars generalize this to ask which fragments of language are stored whole and which are computed, treating storage and computation as a tradeoff that Bayesian inference settles from data.

Pangine stores every remembered experience whole with a count and composes parts only when a question asks for it, the same tradeoff with no decision made. These models go further: they learn what to store, with a probabilistic account of why.

Sources: Mark Johnson, Thomas L. Griffiths, and Sharon Goldwater (2007), Adaptor Grammars: A Framework for Specifying Compositional Nonparametric Bayesian Models, NIPS 19; Timothy J. O'Donnell, Joshua B. Tenenbaum, and Noah D. Goodman (2009), Fragment Grammars: Exploring Computation and Reuse in Language, MIT CSAIL technical report; Timothy J. O'Donnell (2015), Productivity and Reuse in Language, MIT Press.

HCM and HVM

The hierarchical chunking model (HCM) learns from sequences from the ground up: it starts from the smallest units and repeatedly combines learned chunks into larger ones, guided by how they follow one another, until a hierarchy forms. The hierarchical variable model (HVM) also abstracts chunks that appear in similar contexts into variables, trading compression against generalization. On language data it learned a more efficient dictionary than Lempel-Ziv compression, and in a recall task its sequence likelihood tracked people's recall times, while large language models transferred abstract variables less well than people did.

They are the closest relatives of an idea explored for Pangine: that recurring structure could become an ordinary Concept, with the same operation repeating over experience re-expressed in those Concepts. Pangine 1.0 learns no chunks or variables; @~ generalizes at question time by comparing whole cases instead. HCM and HVM go further: they learn hierarchies and abstractions and test them against human behavior.

Sources: Shuchen Wu, Noémi Éltető, Ishita Dasgupta, and Eric Schulz (2022), Learning Structure from the Ground up: Hierarchical Representation Learning by Chunking, NeurIPS; Shuchen Wu, Mirko Thalmann, Peter Dayan, Zeynep Akata, and Eric Schulz (2025), Building, Reusing, and Generalizing Abstract Representations from Concrete Sequences, ICLR.

MENACE

Donald Michie's MENACE learned noughts and crosses with one matchbox for each essentially distinct position, holding colored beads for its possible moves: four of each at the first stage of play, then three, two, and one. A win added three beads to each box it had used, a draw one, and a loss confiscated the bead it had drawn. The tic-tac-toe demo writes that loop in Pangine syntax, with beads as evidence counts and losses applied through @-=.

Source: Donald Michie (1963), Experiments on the Mechanization of Game-Learning, Part I: Characterization of the Model and Its Parameters, The Computer Journal 6(3).

MapReduce

MapReduce runs a map function over partitioned input and merges the intermediate values for each key in reduce tasks, which by default receive their keys by a hash. When a machine fails, the runtime runs its tasks again elsewhere.

Pangine's partitions follow the same shape: each experience goes to a partition by a hash of its canonical spelling, every partition answers a question over its share, and the partial answers reduce to one answer. A lost partition's experience is gone rather than recomputed, so later answers come from what remains. MapReduce goes further, running across thousands of machines with fault tolerance, while Pangine's partitions share one process.

Source: Jeffrey Dean and Sanjay Ghemawat (2004), MapReduce: Simplified Data Processing on Large Clusters, OSDI.

Where Pangine sits

Each part of Pangine has a close relative above, and most of those relatives go further in their own area. What Pangine explores is one small model in which experience, questions, answers, and generalized results are all Concepts, every answer keeps the sources behind it, and composed and generalized answers stay labeled below answers seen whole. OpenCog shares the first of those ideas and provenance systems the second. The combination is a design choice, not a demonstrated advantage.