Ghost cognitive engine
Project description
ghocentric-ghost-engine
A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
Ghost is NOT a language model and NOT a decision-maker.
It is a minimal, stateful core designed to accumulate interaction signals over time and expose them in a clean, predictable, and serialization-safe way.
This project is intentionally focused on architecture and correctness first. Surface features, integrations, and higher-level reasoning systems are expected to be layered on top of the core.
Installation
pip install ghocentric-ghost-engine
Basic Usage
from ghost.engine import GhostEngine
engine = GhostEngine()
engine.step({
"source": "npc_engine",
"intent": "threat",
"actor": "player",
"target": "guard",
"intensity": 0.5,
})
state = engine.state()
print(state["npc"]["threat_level"])
Ghost mutates state only through explicit step() calls.
All public-facing state is exposed as dictionaries and is safe to serialize.
Core Design Principles
- Deterministic, persistent state core
- Explicit state transitions via
step() - No hidden execution or side effects
- Public API remains dict-based and serialization-safe
- Internal typed representations may exist but never leak
- Designed to be expanded around a stable core
Ghost does NOT:
- Choose actions
- Generate dialogue
- Interpret semantics
- Store memory implicitly
These responsibilities belong to external systems that consume Ghost’s state.
Stability & Guarantees (v0.2.2)
Ghost Engine v0.2.2 strengthens runtime correctness and serialization guarantees across public engine state.
The engine guarantees:
- Deterministic runtime behavior (same inputs → same outputs)
- Explicit, bounded state mutation per step
- Actor state updates across interactions
- Actor-level threat accumulation tracking
- Pairwise relationship mutation with symmetric consistency
- Bounded cascade propagation across interaction networks
- Deterministic nonlinear modulation of global system tension
- Passive decay behavior during idle cycles
- Fully JSON-safe public state and immutable snapshots
These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
Architectural Expansion (v0.2.x)
Recent releases introduce the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
Key Capabilities
Agent State Mutation
Agents maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
Relationship Graph
Pairwise relationships evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
Bounded Cascade Propagation
Signals propagate deterministically through local interaction networks with strict bounds to prevent runaway behavior.
Global System Tension
The engine tracks shared system pressure across interactions using deterministic nonlinear modulation.
Actor Threat Memory
Agents maintain explicit per-actor threat accumulation history for structured introspection.
Idle-State Decay Dynamics
Bounded passive decay improves long-run stability and prevents runaway system pressure.
Testing Philosophy
Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
Core validation includes:
- determinism verification
- bounded-state guarantees
- serialization safety validation
This ensures the engine remains correct and predictable as new systems are layered on top.
Project Structure
ghost/ core engine modules
tests/ invariant and runtime tests
npc_demo.py experimental sandbox
pyproject.toml build configuration
Demos are intentionally minimal and act as experimental sandboxes.
They are not representative of Ghost’s final scope.
Status
Ghost Engine remains in early development.
As of v0.2.x:
- The deterministic interaction core is stable
- APIs may still evolve
- Higher-level systems remain intentionally external
This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
Release History
v0.2.2
- Fixed public state serialization issue in relationship subsystem
- Replaced set-based storage with JSON-safe structures
- Strengthened invariant coverage across runtime state
v0.2.1
- Added actor-level threat accumulation tracking
- Introduced deterministic nonlinear system modulation
- Implemented passive idle-cycle decay
- Added immutable JSON-safe snapshots
v0.2.0
- Introduced multi-agent state mutation
- Added relationship mutation logic
- Implemented bounded cascade propagation
- Achieved deterministic runtime guarantees
v0.1.x
- Foundational architecture releases
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghocentric_ghost_engine-0.2.2.tar.gz.
File metadata
- Download URL: ghocentric_ghost_engine-0.2.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48908d17a3feb3447b5170fa6377c8c98d50f2cb28e5fe6a7895577071170eca
|
|
| MD5 |
5b008c6724ff634f77327cc7d044b259
|
|
| BLAKE2b-256 |
f11b617db93d8a793826a2167c244f00b417820dd8b4e76e5e0f3a623ec55e3d
|
Provenance
The following attestation bundles were made for ghocentric_ghost_engine-0.2.2.tar.gz:
Publisher:
publish.yml on GhoCentric/ghost-prototype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghocentric_ghost_engine-0.2.2.tar.gz -
Subject digest:
48908d17a3feb3447b5170fa6377c8c98d50f2cb28e5fe6a7895577071170eca - Sigstore transparency entry: 1094574502
- Sigstore integration time:
-
Permalink:
GhoCentric/ghost-prototype@1460a14dbd3ee3e3c0780fcb267444b2a8627ac4 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/GhoCentric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1460a14dbd3ee3e3c0780fcb267444b2a8627ac4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ghocentric_ghost_engine-0.2.2-py3-none-any.whl.
File metadata
- Download URL: ghocentric_ghost_engine-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96b117dc898d6b0dfa6f4a92ccc524d34818157bb6688d5c5687b37259724f97
|
|
| MD5 |
5e60ff3912b4affb6b4ccb221c05c484
|
|
| BLAKE2b-256 |
5ab3fb04cebca7056e0048b423b385702824c85b082fb6adeb423844db1a8beb
|
Provenance
The following attestation bundles were made for ghocentric_ghost_engine-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on GhoCentric/ghost-prototype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghocentric_ghost_engine-0.2.2-py3-none-any.whl -
Subject digest:
96b117dc898d6b0dfa6f4a92ccc524d34818157bb6688d5c5687b37259724f97 - Sigstore transparency entry: 1094574512
- Sigstore integration time:
-
Permalink:
GhoCentric/ghost-prototype@1460a14dbd3ee3e3c0780fcb267444b2a8627ac4 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/GhoCentric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1460a14dbd3ee3e3c0780fcb267444b2a8627ac4 -
Trigger Event:
push
-
Statement type: