ghocentric-ghost-engine 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. ghocentric_ghost_engine-0.2.2/PKG-INFO +186 -0
  2. ghocentric_ghost_engine-0.2.2/README.md +172 -0
  3. ghocentric_ghost_engine-0.2.2/ghocentric_ghost_engine.egg-info/PKG-INFO +186 -0
  4. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/relationships.py +15 -8
  5. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/pyproject.toml +1 -1
  6. ghocentric_ghost_engine-0.2.1/PKG-INFO +0 -210
  7. ghocentric_ghost_engine-0.2.1/README.md +0 -196
  8. ghocentric_ghost_engine-0.2.1/ghocentric_ghost_engine.egg-info/PKG-INFO +0 -210
  9. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghocentric_ghost_engine.egg-info/SOURCES.txt +0 -0
  10. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghocentric_ghost_engine.egg-info/dependency_links.txt +0 -0
  11. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghocentric_ghost_engine.egg-info/entry_points.txt +0 -0
  12. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghocentric_ghost_engine.egg-info/top_level.txt +0 -0
  13. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/__init__.py +0 -0
  14. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/agents.py +0 -0
  15. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/engine.py +0 -0
  16. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/npc_demo.py +0 -0
  17. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/ghost/step.py +0 -0
  18. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/setup.cfg +0 -0
  19. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_agent_registry.py +0 -0
  20. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_environment_isolation.py +0 -0
  21. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_explicit_run_control.py +0 -0
  22. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_external_input.py +0 -0
  23. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_internal_step_does_not_leak_type.py +0 -0
  24. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_npc_actor_memory.py +0 -0
  25. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_npc_emotional_modulation.py +0 -0
  26. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_npc_intent_decay.py +0 -0
  27. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_npc_intent_processing.py +0 -0
  28. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_public_api.py +0 -0
  29. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_relationship_graph.py +0 -0
  30. {ghocentric_ghost_engine-0.2.1 → ghocentric_ghost_engine-0.2.2}/tests/test_relationship_interaction.py +0 -0
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: ghocentric-ghost-engine
3
+ Version: 0.2.2
4
+ Summary: Ghost cognitive engine
5
+ Author: Shane Heckathorn
6
+ License: MIT
7
+ Keywords: ai,engine,cognition,simulation
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # ghocentric-ghost-engine
16
+
17
+ A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
18
+
19
+ Ghost is **NOT** a language model and **NOT** a decision-maker.
20
+ It is a minimal, stateful core designed to accumulate interaction signals over time and expose them in a clean, predictable, and serialization-safe way.
21
+
22
+ 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.
23
+
24
+ ---
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install ghocentric-ghost-engine
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Basic Usage
35
+
36
+ ```python
37
+ from ghost.engine import GhostEngine
38
+
39
+ engine = GhostEngine()
40
+
41
+ engine.step({
42
+ "source": "npc_engine",
43
+ "intent": "threat",
44
+ "actor": "player",
45
+ "target": "guard",
46
+ "intensity": 0.5,
47
+ })
48
+
49
+ state = engine.state()
50
+ print(state["npc"]["threat_level"])
51
+ ```
52
+
53
+ Ghost mutates state only through explicit `step()` calls.
54
+ All public-facing state is exposed as dictionaries and is safe to serialize.
55
+
56
+ ---
57
+
58
+ ## Core Design Principles
59
+
60
+ - Deterministic, persistent state core
61
+ - Explicit state transitions via `step()`
62
+ - No hidden execution or side effects
63
+ - Public API remains dict-based and serialization-safe
64
+ - Internal typed representations may exist but never leak
65
+ - Designed to be expanded around a stable core
66
+
67
+ ### Ghost does NOT:
68
+
69
+ - Choose actions
70
+ - Generate dialogue
71
+ - Interpret semantics
72
+ - Store memory implicitly
73
+
74
+ These responsibilities belong to external systems that consume Ghost’s state.
75
+
76
+ ---
77
+
78
+ ## Stability & Guarantees (v0.2.2)
79
+
80
+ Ghost Engine v0.2.2 strengthens runtime correctness and serialization guarantees across public engine state.
81
+
82
+ The engine guarantees:
83
+
84
+ - Deterministic runtime behavior (same inputs → same outputs)
85
+ - Explicit, bounded state mutation per step
86
+ - Actor state updates across interactions
87
+ - Actor-level threat accumulation tracking
88
+ - Pairwise relationship mutation with symmetric consistency
89
+ - Bounded cascade propagation across interaction networks
90
+ - Deterministic nonlinear modulation of global system tension
91
+ - Passive decay behavior during idle cycles
92
+ - Fully JSON-safe public state and immutable snapshots
93
+
94
+ These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
95
+
96
+ ---
97
+
98
+ ## Architectural Expansion (v0.2.x)
99
+
100
+ Recent releases introduce the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
101
+
102
+ ### Key Capabilities
103
+
104
+ **Agent State Mutation**
105
+ Agents maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
106
+
107
+ **Relationship Graph**
108
+ Pairwise relationships evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
109
+
110
+ **Bounded Cascade Propagation**
111
+ Signals propagate deterministically through local interaction networks with strict bounds to prevent runaway behavior.
112
+
113
+ **Global System Tension**
114
+ The engine tracks shared system pressure across interactions using deterministic nonlinear modulation.
115
+
116
+ **Actor Threat Memory**
117
+ Agents maintain explicit per-actor threat accumulation history for structured introspection.
118
+
119
+ **Idle-State Decay Dynamics**
120
+ Bounded passive decay improves long-run stability and prevents runaway system pressure.
121
+
122
+ ---
123
+
124
+ ## Testing Philosophy
125
+
126
+ Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
127
+
128
+ Core validation includes:
129
+
130
+ - determinism verification
131
+ - bounded-state guarantees
132
+ - serialization safety validation
133
+
134
+ This ensures the engine remains correct and predictable as new systems are layered on top.
135
+
136
+ ---
137
+
138
+ ## Project Structure
139
+
140
+ ```
141
+ ghost/ core engine modules
142
+ tests/ invariant and runtime tests
143
+ npc_demo.py experimental sandbox
144
+ pyproject.toml build configuration
145
+ ```
146
+
147
+ Demos are intentionally minimal and act as experimental sandboxes.
148
+ They are not representative of Ghost’s final scope.
149
+
150
+ ---
151
+
152
+ ## Status
153
+
154
+ Ghost Engine remains in early development.
155
+
156
+ As of v0.2.x:
157
+
158
+ - The deterministic interaction core is stable
159
+ - APIs may still evolve
160
+ - Higher-level systems remain intentionally external
161
+
162
+ This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
163
+
164
+ ---
165
+
166
+ ## Release History
167
+
168
+ **v0.2.2**
169
+ - Fixed public state serialization issue in relationship subsystem
170
+ - Replaced set-based storage with JSON-safe structures
171
+ - Strengthened invariant coverage across runtime state
172
+
173
+ **v0.2.1**
174
+ - Added actor-level threat accumulation tracking
175
+ - Introduced deterministic nonlinear system modulation
176
+ - Implemented passive idle-cycle decay
177
+ - Added immutable JSON-safe snapshots
178
+
179
+ **v0.2.0**
180
+ - Introduced multi-agent state mutation
181
+ - Added relationship mutation logic
182
+ - Implemented bounded cascade propagation
183
+ - Achieved deterministic runtime guarantees
184
+
185
+ **v0.1.x**
186
+ - Foundational architecture releases
@@ -0,0 +1,172 @@
1
+ # ghocentric-ghost-engine
2
+
3
+ A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
4
+
5
+ Ghost is **NOT** a language model and **NOT** a decision-maker.
6
+ It is a minimal, stateful core designed to accumulate interaction signals over time and expose them in a clean, predictable, and serialization-safe way.
7
+
8
+ 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.
9
+
10
+ ---
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ pip install ghocentric-ghost-engine
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Basic Usage
21
+
22
+ ```python
23
+ from ghost.engine import GhostEngine
24
+
25
+ engine = GhostEngine()
26
+
27
+ engine.step({
28
+ "source": "npc_engine",
29
+ "intent": "threat",
30
+ "actor": "player",
31
+ "target": "guard",
32
+ "intensity": 0.5,
33
+ })
34
+
35
+ state = engine.state()
36
+ print(state["npc"]["threat_level"])
37
+ ```
38
+
39
+ Ghost mutates state only through explicit `step()` calls.
40
+ All public-facing state is exposed as dictionaries and is safe to serialize.
41
+
42
+ ---
43
+
44
+ ## Core Design Principles
45
+
46
+ - Deterministic, persistent state core
47
+ - Explicit state transitions via `step()`
48
+ - No hidden execution or side effects
49
+ - Public API remains dict-based and serialization-safe
50
+ - Internal typed representations may exist but never leak
51
+ - Designed to be expanded around a stable core
52
+
53
+ ### Ghost does NOT:
54
+
55
+ - Choose actions
56
+ - Generate dialogue
57
+ - Interpret semantics
58
+ - Store memory implicitly
59
+
60
+ These responsibilities belong to external systems that consume Ghost’s state.
61
+
62
+ ---
63
+
64
+ ## Stability & Guarantees (v0.2.2)
65
+
66
+ Ghost Engine v0.2.2 strengthens runtime correctness and serialization guarantees across public engine state.
67
+
68
+ The engine guarantees:
69
+
70
+ - Deterministic runtime behavior (same inputs → same outputs)
71
+ - Explicit, bounded state mutation per step
72
+ - Actor state updates across interactions
73
+ - Actor-level threat accumulation tracking
74
+ - Pairwise relationship mutation with symmetric consistency
75
+ - Bounded cascade propagation across interaction networks
76
+ - Deterministic nonlinear modulation of global system tension
77
+ - Passive decay behavior during idle cycles
78
+ - Fully JSON-safe public state and immutable snapshots
79
+
80
+ These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
81
+
82
+ ---
83
+
84
+ ## Architectural Expansion (v0.2.x)
85
+
86
+ Recent releases introduce the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
87
+
88
+ ### Key Capabilities
89
+
90
+ **Agent State Mutation**
91
+ Agents maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
92
+
93
+ **Relationship Graph**
94
+ Pairwise relationships evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
95
+
96
+ **Bounded Cascade Propagation**
97
+ Signals propagate deterministically through local interaction networks with strict bounds to prevent runaway behavior.
98
+
99
+ **Global System Tension**
100
+ The engine tracks shared system pressure across interactions using deterministic nonlinear modulation.
101
+
102
+ **Actor Threat Memory**
103
+ Agents maintain explicit per-actor threat accumulation history for structured introspection.
104
+
105
+ **Idle-State Decay Dynamics**
106
+ Bounded passive decay improves long-run stability and prevents runaway system pressure.
107
+
108
+ ---
109
+
110
+ ## Testing Philosophy
111
+
112
+ Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
113
+
114
+ Core validation includes:
115
+
116
+ - determinism verification
117
+ - bounded-state guarantees
118
+ - serialization safety validation
119
+
120
+ This ensures the engine remains correct and predictable as new systems are layered on top.
121
+
122
+ ---
123
+
124
+ ## Project Structure
125
+
126
+ ```
127
+ ghost/ core engine modules
128
+ tests/ invariant and runtime tests
129
+ npc_demo.py experimental sandbox
130
+ pyproject.toml build configuration
131
+ ```
132
+
133
+ Demos are intentionally minimal and act as experimental sandboxes.
134
+ They are not representative of Ghost’s final scope.
135
+
136
+ ---
137
+
138
+ ## Status
139
+
140
+ Ghost Engine remains in early development.
141
+
142
+ As of v0.2.x:
143
+
144
+ - The deterministic interaction core is stable
145
+ - APIs may still evolve
146
+ - Higher-level systems remain intentionally external
147
+
148
+ This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
149
+
150
+ ---
151
+
152
+ ## Release History
153
+
154
+ **v0.2.2**
155
+ - Fixed public state serialization issue in relationship subsystem
156
+ - Replaced set-based storage with JSON-safe structures
157
+ - Strengthened invariant coverage across runtime state
158
+
159
+ **v0.2.1**
160
+ - Added actor-level threat accumulation tracking
161
+ - Introduced deterministic nonlinear system modulation
162
+ - Implemented passive idle-cycle decay
163
+ - Added immutable JSON-safe snapshots
164
+
165
+ **v0.2.0**
166
+ - Introduced multi-agent state mutation
167
+ - Added relationship mutation logic
168
+ - Implemented bounded cascade propagation
169
+ - Achieved deterministic runtime guarantees
170
+
171
+ **v0.1.x**
172
+ - Foundational architecture releases
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: ghocentric-ghost-engine
3
+ Version: 0.2.2
4
+ Summary: Ghost cognitive engine
5
+ Author: Shane Heckathorn
6
+ License: MIT
7
+ Keywords: ai,engine,cognition,simulation
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # ghocentric-ghost-engine
16
+
17
+ A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
18
+
19
+ Ghost is **NOT** a language model and **NOT** a decision-maker.
20
+ It is a minimal, stateful core designed to accumulate interaction signals over time and expose them in a clean, predictable, and serialization-safe way.
21
+
22
+ 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.
23
+
24
+ ---
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install ghocentric-ghost-engine
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Basic Usage
35
+
36
+ ```python
37
+ from ghost.engine import GhostEngine
38
+
39
+ engine = GhostEngine()
40
+
41
+ engine.step({
42
+ "source": "npc_engine",
43
+ "intent": "threat",
44
+ "actor": "player",
45
+ "target": "guard",
46
+ "intensity": 0.5,
47
+ })
48
+
49
+ state = engine.state()
50
+ print(state["npc"]["threat_level"])
51
+ ```
52
+
53
+ Ghost mutates state only through explicit `step()` calls.
54
+ All public-facing state is exposed as dictionaries and is safe to serialize.
55
+
56
+ ---
57
+
58
+ ## Core Design Principles
59
+
60
+ - Deterministic, persistent state core
61
+ - Explicit state transitions via `step()`
62
+ - No hidden execution or side effects
63
+ - Public API remains dict-based and serialization-safe
64
+ - Internal typed representations may exist but never leak
65
+ - Designed to be expanded around a stable core
66
+
67
+ ### Ghost does NOT:
68
+
69
+ - Choose actions
70
+ - Generate dialogue
71
+ - Interpret semantics
72
+ - Store memory implicitly
73
+
74
+ These responsibilities belong to external systems that consume Ghost’s state.
75
+
76
+ ---
77
+
78
+ ## Stability & Guarantees (v0.2.2)
79
+
80
+ Ghost Engine v0.2.2 strengthens runtime correctness and serialization guarantees across public engine state.
81
+
82
+ The engine guarantees:
83
+
84
+ - Deterministic runtime behavior (same inputs → same outputs)
85
+ - Explicit, bounded state mutation per step
86
+ - Actor state updates across interactions
87
+ - Actor-level threat accumulation tracking
88
+ - Pairwise relationship mutation with symmetric consistency
89
+ - Bounded cascade propagation across interaction networks
90
+ - Deterministic nonlinear modulation of global system tension
91
+ - Passive decay behavior during idle cycles
92
+ - Fully JSON-safe public state and immutable snapshots
93
+
94
+ These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
95
+
96
+ ---
97
+
98
+ ## Architectural Expansion (v0.2.x)
99
+
100
+ Recent releases introduce the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
101
+
102
+ ### Key Capabilities
103
+
104
+ **Agent State Mutation**
105
+ Agents maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
106
+
107
+ **Relationship Graph**
108
+ Pairwise relationships evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
109
+
110
+ **Bounded Cascade Propagation**
111
+ Signals propagate deterministically through local interaction networks with strict bounds to prevent runaway behavior.
112
+
113
+ **Global System Tension**
114
+ The engine tracks shared system pressure across interactions using deterministic nonlinear modulation.
115
+
116
+ **Actor Threat Memory**
117
+ Agents maintain explicit per-actor threat accumulation history for structured introspection.
118
+
119
+ **Idle-State Decay Dynamics**
120
+ Bounded passive decay improves long-run stability and prevents runaway system pressure.
121
+
122
+ ---
123
+
124
+ ## Testing Philosophy
125
+
126
+ Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
127
+
128
+ Core validation includes:
129
+
130
+ - determinism verification
131
+ - bounded-state guarantees
132
+ - serialization safety validation
133
+
134
+ This ensures the engine remains correct and predictable as new systems are layered on top.
135
+
136
+ ---
137
+
138
+ ## Project Structure
139
+
140
+ ```
141
+ ghost/ core engine modules
142
+ tests/ invariant and runtime tests
143
+ npc_demo.py experimental sandbox
144
+ pyproject.toml build configuration
145
+ ```
146
+
147
+ Demos are intentionally minimal and act as experimental sandboxes.
148
+ They are not representative of Ghost’s final scope.
149
+
150
+ ---
151
+
152
+ ## Status
153
+
154
+ Ghost Engine remains in early development.
155
+
156
+ As of v0.2.x:
157
+
158
+ - The deterministic interaction core is stable
159
+ - APIs may still evolve
160
+ - Higher-level systems remain intentionally external
161
+
162
+ This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
163
+
164
+ ---
165
+
166
+ ## Release History
167
+
168
+ **v0.2.2**
169
+ - Fixed public state serialization issue in relationship subsystem
170
+ - Replaced set-based storage with JSON-safe structures
171
+ - Strengthened invariant coverage across runtime state
172
+
173
+ **v0.2.1**
174
+ - Added actor-level threat accumulation tracking
175
+ - Introduced deterministic nonlinear system modulation
176
+ - Implemented passive idle-cycle decay
177
+ - Added immutable JSON-safe snapshots
178
+
179
+ **v0.2.0**
180
+ - Introduced multi-agent state mutation
181
+ - Added relationship mutation logic
182
+ - Implemented bounded cascade propagation
183
+ - Achieved deterministic runtime guarantees
184
+
185
+ **v0.1.x**
186
+ - Foundational architecture releases
@@ -4,7 +4,7 @@ class RelationshipGraph:
4
4
 
5
5
  Relationships are stored as:
6
6
 
7
- ("A","B") { trust, attachment }
7
+ ("A","B") -> { trust, attachment }
8
8
  """
9
9
 
10
10
  def __init__(self, ctx: dict):
@@ -13,10 +13,11 @@ class RelationshipGraph:
13
13
  self._neighbors = ctx.setdefault("neighbors", {})
14
14
 
15
15
  def _key(self, a: str, b: str):
16
- return tuple(sorted((a, b)))
16
+ # JSON-safe key
17
+ a, b = sorted((a, b))
18
+ return f"{a}|{b}"
17
19
 
18
20
  def ensure_pair(self, a: str, b: str):
19
-
20
21
  key = self._key(a, b)
21
22
 
22
23
  rel = self._rels.setdefault(
@@ -27,9 +28,15 @@ class RelationshipGraph:
27
28
  },
28
29
  )
29
30
 
30
- # Maintain neighbor index
31
- self._neighbors.setdefault(a, set()).add(b)
32
- self._neighbors.setdefault(b, set()).add(a)
31
+ # Maintain neighbor index as LISTS, not sets
32
+ self._neighbors.setdefault(a, [])
33
+ self._neighbors.setdefault(b, [])
34
+
35
+ if b not in self._neighbors[a]:
36
+ self._neighbors[a].append(b)
37
+
38
+ if a not in self._neighbors[b]:
39
+ self._neighbors[b].append(a)
33
40
 
34
41
  return rel
35
42
 
@@ -50,6 +57,6 @@ class RelationshipGraph:
50
57
 
51
58
  def all(self):
52
59
  return self._rels
53
-
60
+
54
61
  def neighbors(self, agent_id: str):
55
- return self._neighbors.get(agent_id, set())
62
+ return self._neighbors.get(agent_id, [])
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ghocentric-ghost-engine"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Ghost cognitive engine"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,210 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ghocentric-ghost-engine
3
- Version: 0.2.1
4
- Summary: Ghost cognitive engine
5
- Author: Shane Heckathorn
6
- License: MIT
7
- Keywords: ai,engine,cognition,simulation
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3 :: Only
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.9
13
- Description-Content-Type: text/markdown
14
-
15
- ghocentric-ghost-engine
16
-
17
- A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
18
-
19
- 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.
20
-
21
- 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 in later versions.
22
-
23
-
24
- INSTALLATION
25
-
26
- pip install ghocentric-ghost-engine
27
-
28
-
29
- BASIC USAGE
30
-
31
- from ghost.engine import GhostEngine
32
-
33
- engine = GhostEngine()
34
-
35
- engine.step({
36
- "source": "npc_engine",
37
- "intent": "threat",
38
- "actor": "player",
39
- "target": "guard",
40
- "intensity": 0.5,
41
- })
42
-
43
- state = engine.state()
44
- print(state["npc"]["threat_level"])
45
-
46
- Ghost mutates state only via explicit step() calls.
47
- All public-facing state is exposed as dictionaries and is safe to serialize.
48
-
49
-
50
- CORE DESIGN PRINCIPLES
51
-
52
- • Deterministic, persistent state core
53
- • Explicit state transitions via step()
54
- • No hidden execution or side effects
55
- • Public API remains dict-based and serialization-safe
56
- • Internal typed representations may exist but never leak
57
- • Designed to be expanded around a stable core, not bloated prematurely
58
-
59
-
60
- Ghost does NOT:
61
-
62
- • Choose actions
63
- • Generate dialogue
64
- • Interpret semantics
65
- • Store memory implicitly
66
-
67
- Those behaviors belong to external systems that consume Ghost’s state.
68
-
69
-
70
- STABILITY & GUARANTEES (v0.2.1)
71
-
72
- Ghost Engine v0.2.1 strengthens the deterministic interaction core with expanded runtime guarantees and formalized behavioral invariants.
73
-
74
- The engine now guarantees:
75
-
76
- • Deterministic runtime behavior (same inputs → same outputs)
77
- • Explicit, bounded state mutation per step
78
- • Actor state updates across interactions
79
- • Actor-level threat accumulation tracking
80
- • Pairwise relationship mutation with symmetric consistency
81
- • Bounded cascade propagation across interaction networks
82
- • Deterministic nonlinear modulation of global system tension
83
- • Passive decay behavior during idle cycles
84
- • Fully JSON-safe immutable snapshots of engine state
85
-
86
- These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
87
-
88
-
89
- ARCHITECTURAL EXPANSION (v0.2.0)
90
-
91
- Version 0.2.0 introduces the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
92
-
93
- New capabilities include:
94
-
95
- Agent State Mutation
96
- Agents now maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
97
-
98
- Relationship Graph
99
- Pairwise relationships now evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
100
-
101
- Bounded Cascade Propagation
102
- Signals propagate deterministically through an agent’s local interaction network with strict bounds to prevent runaway behavior.
103
-
104
- Global System Tension
105
- The engine now tracks a shared global tension signal representing aggregate interaction pressure across the system.
106
-
107
- Why This Matters
108
-
109
- These changes allow Ghost-based systems to scale toward:
110
-
111
- • large multi-agent simulations
112
- • social interaction modeling
113
- • emergent behavioral systems
114
- • game-world simulation engines
115
-
116
- while preserving the deterministic, explicit-state philosophy of the core.
117
-
118
- ARCHITECTURAL EXPANSION (v0.2.1)
119
-
120
- Version 0.2.1 refines Ghost’s runtime behavior through deterministic nonlinear dynamics and stronger system observability guarantees.
121
-
122
- New capabilities include:
123
-
124
- Actor Threat Memory
125
- Agents now maintain explicit per-actor threat accumulation history, enabling long-term behavioral analysis and structured system introspection.
126
-
127
- Nonlinear System Modulation
128
- Global system tension now evolves through deterministic nonlinear modulation, allowing more realistic emergent dynamics while preserving strict predictability.
129
-
130
- Idle-State Decay Dynamics
131
- The engine now exhibits bounded passive decay when idle, improving long-run stability and preventing runaway system pressure.
132
-
133
- Immutable JSON-Safe Snapshots
134
- Engine snapshots are now fully serialization-safe, supporting external persistence, logging, and distributed simulation workflows without risk of mutation or type leakage.
135
-
136
- Why This Matters
137
-
138
- These refinements improve Ghost’s suitability for:
139
-
140
- • long-running simulations
141
- • analytical modeling pipelines
142
- • reproducible experimental systems
143
- • persistent world simulation engines
144
-
145
- while maintaining the strict deterministic philosophy of the core.
146
-
147
- TESTING PHILOSOPHY
148
-
149
- Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
150
-
151
- Core validation includes:
152
-
153
- • determinism verification
154
- • clamping and bounded-state guarantees
155
- • serialization safety validation
156
-
157
- This ensures the engine remains correct and predictable as new systems and features are layered on top in future versions.
158
-
159
-
160
- PROJECT STRUCTURE
161
-
162
- ghost/ core engine modules
163
- tests/ invariant and runtime tests
164
- npc_demo.py experimental sandbox for new ideas
165
- pyproject.toml build and packaging configuration
166
-
167
- Demos are intentionally minimal and act as experimental sandboxes.
168
- They are not representative of Ghost’s final scope.
169
-
170
-
171
- STATUS
172
-
173
- Ghost Engine remains in early development.
174
-
175
- As of v0.2.0:
176
-
177
- • The deterministic interaction core is stable
178
- • APIs may still evolve
179
- • Higher-level systems remain intentionally external
180
-
181
- This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
182
-
183
-
184
- RELEASE HISTORY
185
-
186
- v0.2.1
187
- • Added actor-level threat accumulation tracking
188
- • Introduced deterministic nonlinear modulation of global tension
189
- • Implemented passive idle-cycle decay behavior
190
- • Added fully JSON-safe immutable snapshot support
191
- • Expanded regression, invariant, and integration test coverage
192
-
193
- v0.2.0
194
- • Introduced real agent state mutation
195
- • Added relationship mutation logic
196
- • Implemented bounded cascade propagation
197
- • Achieved deterministic runtime guarantees
198
- • Achieved JSON-safe serialization baseline
199
-
200
- v0.1.3
201
- • AgentRegistry and neighbor indexing for scalable interaction graphs
202
-
203
- v0.1.2
204
- • Formal invariant verification using property-based testing
205
-
206
- v0.1.1
207
- • Core threat accumulation improvements
208
-
209
- v0.1.0
210
- • Initial public architecture release
@@ -1,196 +0,0 @@
1
- ghocentric-ghost-engine
2
-
3
- A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
4
-
5
- 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.
6
-
7
- 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 in later versions.
8
-
9
-
10
- INSTALLATION
11
-
12
- pip install ghocentric-ghost-engine
13
-
14
-
15
- BASIC USAGE
16
-
17
- from ghost.engine import GhostEngine
18
-
19
- engine = GhostEngine()
20
-
21
- engine.step({
22
- "source": "npc_engine",
23
- "intent": "threat",
24
- "actor": "player",
25
- "target": "guard",
26
- "intensity": 0.5,
27
- })
28
-
29
- state = engine.state()
30
- print(state["npc"]["threat_level"])
31
-
32
- Ghost mutates state only via explicit step() calls.
33
- All public-facing state is exposed as dictionaries and is safe to serialize.
34
-
35
-
36
- CORE DESIGN PRINCIPLES
37
-
38
- • Deterministic, persistent state core
39
- • Explicit state transitions via step()
40
- • No hidden execution or side effects
41
- • Public API remains dict-based and serialization-safe
42
- • Internal typed representations may exist but never leak
43
- • Designed to be expanded around a stable core, not bloated prematurely
44
-
45
-
46
- Ghost does NOT:
47
-
48
- • Choose actions
49
- • Generate dialogue
50
- • Interpret semantics
51
- • Store memory implicitly
52
-
53
- Those behaviors belong to external systems that consume Ghost’s state.
54
-
55
-
56
- STABILITY & GUARANTEES (v0.2.1)
57
-
58
- Ghost Engine v0.2.1 strengthens the deterministic interaction core with expanded runtime guarantees and formalized behavioral invariants.
59
-
60
- The engine now guarantees:
61
-
62
- • Deterministic runtime behavior (same inputs → same outputs)
63
- • Explicit, bounded state mutation per step
64
- • Actor state updates across interactions
65
- • Actor-level threat accumulation tracking
66
- • Pairwise relationship mutation with symmetric consistency
67
- • Bounded cascade propagation across interaction networks
68
- • Deterministic nonlinear modulation of global system tension
69
- • Passive decay behavior during idle cycles
70
- • Fully JSON-safe immutable snapshots of engine state
71
-
72
- These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
73
-
74
-
75
- ARCHITECTURAL EXPANSION (v0.2.0)
76
-
77
- Version 0.2.0 introduces the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
78
-
79
- New capabilities include:
80
-
81
- Agent State Mutation
82
- Agents now maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
83
-
84
- Relationship Graph
85
- Pairwise relationships now evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
86
-
87
- Bounded Cascade Propagation
88
- Signals propagate deterministically through an agent’s local interaction network with strict bounds to prevent runaway behavior.
89
-
90
- Global System Tension
91
- The engine now tracks a shared global tension signal representing aggregate interaction pressure across the system.
92
-
93
- Why This Matters
94
-
95
- These changes allow Ghost-based systems to scale toward:
96
-
97
- • large multi-agent simulations
98
- • social interaction modeling
99
- • emergent behavioral systems
100
- • game-world simulation engines
101
-
102
- while preserving the deterministic, explicit-state philosophy of the core.
103
-
104
- ARCHITECTURAL EXPANSION (v0.2.1)
105
-
106
- Version 0.2.1 refines Ghost’s runtime behavior through deterministic nonlinear dynamics and stronger system observability guarantees.
107
-
108
- New capabilities include:
109
-
110
- Actor Threat Memory
111
- Agents now maintain explicit per-actor threat accumulation history, enabling long-term behavioral analysis and structured system introspection.
112
-
113
- Nonlinear System Modulation
114
- Global system tension now evolves through deterministic nonlinear modulation, allowing more realistic emergent dynamics while preserving strict predictability.
115
-
116
- Idle-State Decay Dynamics
117
- The engine now exhibits bounded passive decay when idle, improving long-run stability and preventing runaway system pressure.
118
-
119
- Immutable JSON-Safe Snapshots
120
- Engine snapshots are now fully serialization-safe, supporting external persistence, logging, and distributed simulation workflows without risk of mutation or type leakage.
121
-
122
- Why This Matters
123
-
124
- These refinements improve Ghost’s suitability for:
125
-
126
- • long-running simulations
127
- • analytical modeling pipelines
128
- • reproducible experimental systems
129
- • persistent world simulation engines
130
-
131
- while maintaining the strict deterministic philosophy of the core.
132
-
133
- TESTING PHILOSOPHY
134
-
135
- Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
136
-
137
- Core validation includes:
138
-
139
- • determinism verification
140
- • clamping and bounded-state guarantees
141
- • serialization safety validation
142
-
143
- This ensures the engine remains correct and predictable as new systems and features are layered on top in future versions.
144
-
145
-
146
- PROJECT STRUCTURE
147
-
148
- ghost/ core engine modules
149
- tests/ invariant and runtime tests
150
- npc_demo.py experimental sandbox for new ideas
151
- pyproject.toml build and packaging configuration
152
-
153
- Demos are intentionally minimal and act as experimental sandboxes.
154
- They are not representative of Ghost’s final scope.
155
-
156
-
157
- STATUS
158
-
159
- Ghost Engine remains in early development.
160
-
161
- As of v0.2.0:
162
-
163
- • The deterministic interaction core is stable
164
- • APIs may still evolve
165
- • Higher-level systems remain intentionally external
166
-
167
- This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
168
-
169
-
170
- RELEASE HISTORY
171
-
172
- v0.2.1
173
- • Added actor-level threat accumulation tracking
174
- • Introduced deterministic nonlinear modulation of global tension
175
- • Implemented passive idle-cycle decay behavior
176
- • Added fully JSON-safe immutable snapshot support
177
- • Expanded regression, invariant, and integration test coverage
178
-
179
- v0.2.0
180
- • Introduced real agent state mutation
181
- • Added relationship mutation logic
182
- • Implemented bounded cascade propagation
183
- • Achieved deterministic runtime guarantees
184
- • Achieved JSON-safe serialization baseline
185
-
186
- v0.1.3
187
- • AgentRegistry and neighbor indexing for scalable interaction graphs
188
-
189
- v0.1.2
190
- • Formal invariant verification using property-based testing
191
-
192
- v0.1.1
193
- • Core threat accumulation improvements
194
-
195
- v0.1.0
196
- • Initial public architecture release
@@ -1,210 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ghocentric-ghost-engine
3
- Version: 0.2.1
4
- Summary: Ghost cognitive engine
5
- Author: Shane Heckathorn
6
- License: MIT
7
- Keywords: ai,engine,cognition,simulation
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3 :: Only
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.9
13
- Description-Content-Type: text/markdown
14
-
15
- ghocentric-ghost-engine
16
-
17
- A lightweight, deterministic internal state engine for experimenting with persistent state, temporal dynamics, and emergent behavior in interactive systems.
18
-
19
- 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.
20
-
21
- 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 in later versions.
22
-
23
-
24
- INSTALLATION
25
-
26
- pip install ghocentric-ghost-engine
27
-
28
-
29
- BASIC USAGE
30
-
31
- from ghost.engine import GhostEngine
32
-
33
- engine = GhostEngine()
34
-
35
- engine.step({
36
- "source": "npc_engine",
37
- "intent": "threat",
38
- "actor": "player",
39
- "target": "guard",
40
- "intensity": 0.5,
41
- })
42
-
43
- state = engine.state()
44
- print(state["npc"]["threat_level"])
45
-
46
- Ghost mutates state only via explicit step() calls.
47
- All public-facing state is exposed as dictionaries and is safe to serialize.
48
-
49
-
50
- CORE DESIGN PRINCIPLES
51
-
52
- • Deterministic, persistent state core
53
- • Explicit state transitions via step()
54
- • No hidden execution or side effects
55
- • Public API remains dict-based and serialization-safe
56
- • Internal typed representations may exist but never leak
57
- • Designed to be expanded around a stable core, not bloated prematurely
58
-
59
-
60
- Ghost does NOT:
61
-
62
- • Choose actions
63
- • Generate dialogue
64
- • Interpret semantics
65
- • Store memory implicitly
66
-
67
- Those behaviors belong to external systems that consume Ghost’s state.
68
-
69
-
70
- STABILITY & GUARANTEES (v0.2.1)
71
-
72
- Ghost Engine v0.2.1 strengthens the deterministic interaction core with expanded runtime guarantees and formalized behavioral invariants.
73
-
74
- The engine now guarantees:
75
-
76
- • Deterministic runtime behavior (same inputs → same outputs)
77
- • Explicit, bounded state mutation per step
78
- • Actor state updates across interactions
79
- • Actor-level threat accumulation tracking
80
- • Pairwise relationship mutation with symmetric consistency
81
- • Bounded cascade propagation across interaction networks
82
- • Deterministic nonlinear modulation of global system tension
83
- • Passive decay behavior during idle cycles
84
- • Fully JSON-safe immutable snapshots of engine state
85
-
86
- These guarantees hold under repeated execution, long-run simulation, and adversarial input streams.
87
-
88
-
89
- ARCHITECTURAL EXPANSION (v0.2.0)
90
-
91
- Version 0.2.0 introduces the first fully operational multi-agent interaction model on top of Ghost’s deterministic state core.
92
-
93
- New capabilities include:
94
-
95
- Agent State Mutation
96
- Agents now maintain evolving internal state (mood, tension, last intent) and react deterministically to interaction signals.
97
-
98
- Relationship Graph
99
- Pairwise relationships now evolve through explicit interaction deltas, supporting long-term system memory without hidden state.
100
-
101
- Bounded Cascade Propagation
102
- Signals propagate deterministically through an agent’s local interaction network with strict bounds to prevent runaway behavior.
103
-
104
- Global System Tension
105
- The engine now tracks a shared global tension signal representing aggregate interaction pressure across the system.
106
-
107
- Why This Matters
108
-
109
- These changes allow Ghost-based systems to scale toward:
110
-
111
- • large multi-agent simulations
112
- • social interaction modeling
113
- • emergent behavioral systems
114
- • game-world simulation engines
115
-
116
- while preserving the deterministic, explicit-state philosophy of the core.
117
-
118
- ARCHITECTURAL EXPANSION (v0.2.1)
119
-
120
- Version 0.2.1 refines Ghost’s runtime behavior through deterministic nonlinear dynamics and stronger system observability guarantees.
121
-
122
- New capabilities include:
123
-
124
- Actor Threat Memory
125
- Agents now maintain explicit per-actor threat accumulation history, enabling long-term behavioral analysis and structured system introspection.
126
-
127
- Nonlinear System Modulation
128
- Global system tension now evolves through deterministic nonlinear modulation, allowing more realistic emergent dynamics while preserving strict predictability.
129
-
130
- Idle-State Decay Dynamics
131
- The engine now exhibits bounded passive decay when idle, improving long-run stability and preventing runaway system pressure.
132
-
133
- Immutable JSON-Safe Snapshots
134
- Engine snapshots are now fully serialization-safe, supporting external persistence, logging, and distributed simulation workflows without risk of mutation or type leakage.
135
-
136
- Why This Matters
137
-
138
- These refinements improve Ghost’s suitability for:
139
-
140
- • long-running simulations
141
- • analytical modeling pipelines
142
- • reproducible experimental systems
143
- • persistent world simulation engines
144
-
145
- while maintaining the strict deterministic philosophy of the core.
146
-
147
- TESTING PHILOSOPHY
148
-
149
- Ghost uses property-based testing and invariant validation rather than relying solely on example-driven tests.
150
-
151
- Core validation includes:
152
-
153
- • determinism verification
154
- • clamping and bounded-state guarantees
155
- • serialization safety validation
156
-
157
- This ensures the engine remains correct and predictable as new systems and features are layered on top in future versions.
158
-
159
-
160
- PROJECT STRUCTURE
161
-
162
- ghost/ core engine modules
163
- tests/ invariant and runtime tests
164
- npc_demo.py experimental sandbox for new ideas
165
- pyproject.toml build and packaging configuration
166
-
167
- Demos are intentionally minimal and act as experimental sandboxes.
168
- They are not representative of Ghost’s final scope.
169
-
170
-
171
- STATUS
172
-
173
- Ghost Engine remains in early development.
174
-
175
- As of v0.2.0:
176
-
177
- • The deterministic interaction core is stable
178
- • APIs may still evolve
179
- • Higher-level systems remain intentionally external
180
-
181
- This project is intended as a foundation for experimentation, research, and future system design rather than a finished product.
182
-
183
-
184
- RELEASE HISTORY
185
-
186
- v0.2.1
187
- • Added actor-level threat accumulation tracking
188
- • Introduced deterministic nonlinear modulation of global tension
189
- • Implemented passive idle-cycle decay behavior
190
- • Added fully JSON-safe immutable snapshot support
191
- • Expanded regression, invariant, and integration test coverage
192
-
193
- v0.2.0
194
- • Introduced real agent state mutation
195
- • Added relationship mutation logic
196
- • Implemented bounded cascade propagation
197
- • Achieved deterministic runtime guarantees
198
- • Achieved JSON-safe serialization baseline
199
-
200
- v0.1.3
201
- • AgentRegistry and neighbor indexing for scalable interaction graphs
202
-
203
- v0.1.2
204
- • Formal invariant verification using property-based testing
205
-
206
- v0.1.1
207
- • Core threat accumulation improvements
208
-
209
- v0.1.0
210
- • Initial public architecture release