feat: Re-implement STAN Stigmergic A* Navigation (Resolves #258 feedback) - #272
Closed
web3guru888 wants to merge 1 commit into
Closed
feat: Re-implement STAN Stigmergic A* Navigation (Resolves #258 feedback)#272web3guru888 wants to merge 1 commit into
web3guru888 wants to merge 1 commit into
Conversation
cmaliwal
approved these changes
Apr 8, 2026
Contributor
|
Appreciate the thoroughness here — addressing all the feedback from #259 shows real effort. The stigmergic pathfinding concept is interesting. However we're focused on stabilizing the core right now (search, mining, MCP reliability) and this adds significant complexity to the KG with new schema migrations, MCP endpoints, and a novel algorithm. We'd rather get the foundation solid before adding research-grade features. Would you consider publishing this as a standalone extension or plugin? That way people can opt in without it being in the core package. And we'd value your help reviewing PRs — you clearly understand graph algorithms well. |
web3guru888
added a commit
to web3guru888/mempalace
that referenced
this pull request
Apr 9, 2026
Add a link to the standalone STAN (Stigmergic A* Navigation) extension in a new Community Extensions section of the README, per maintainer feedback on PR MemPalace#272 to keep the core lean and publish STAN as an opt-in plugin.
web3guru888
added a commit
to web3guru888/mempalace
that referenced
this pull request
Apr 12, 2026
Add a link to the standalone STAN (Stigmergic A* Navigation) extension in a new Community Extensions section of the README, per maintainer feedback on PR MemPalace#272 to keep the core lean and publish STAN as an opt-in plugin.
jphein
added a commit
to techempower-org/mempalace
that referenced
this pull request
May 28, 2026
* docs: document mcp_mode CLI-only mode palace-daemon#58 (proxy gate) shipped via PR #59, so the MemPalace#272 leftover — documenting the flag — is unblocked. The proxy reads ``mcp_mode`` from ``~/.mempalace/config.json`` (env override ``PALACE_MCP_MODE``) and, when set to ``cli-only``, short-circuits ``tools/list`` to empty and rejects ``tools/call`` with a CLI-pointing error. Fail-open on bad config so a typo never silently disables tools. Document the surface in three places, scoped to where readers find it: - ``website/guide/mcp-integration.md`` gets a full ``## CLI-only mode`` section with the config shape, the env override, fail-open behavior, what changes (tools/list empty), what stays (hooks + skills), and the reconnect requirement for the tool list to refresh. - ``.claude-plugin/README.md`` gets a concise ``### CLI-only mode`` subsection under MCP Server with a link to the guide. - ``.codex-plugin/README.md`` gets a one-liner near the header pointing at the guide. Fixes #272 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(codex-plugin): show mcp_mode in proper JSON syntax Addresses Gemini review on #280: the codex README wrote ``mcp_mode: cli-only`` (YAML-shorthand) inline. ``config.json`` is JSON, so a user pasting that verbatim would hit a JSON parse error. Switch to ``"mcp_mode": "cli-only"`` — proper JSON syntax, matches the .claude-plugin README's snippet form. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes previously reverted Feature: Implement STAN (Stigmergic A* Navigation) into Knowledge Graph
This PR successfully re-implements the Stigmergic A* Navigation capabilities originally proposed in #258, but definitively resolves all critical flaws pointed out by maintainers via a direct port mapping from the tested architecture of the STAN research paper by VBRL.ai.
What's Fixed:
🔴 1. Schema Migration No Longer Breaks Existing DBs:
A safe
_apply_migrationsmethod was incorporated which conditionally handlesALTER TABLE triples ADD COLUMN pheromone_level REAL DEFAULT 0.0. It correctly ignores the operation if older nodes are already populated with schemas locally.🔴 2. Entity ID Double-Normalization Erased:
In STAN's modified A*, we query using
get_neighbors_with_pheromones, returning correctly formatted semantic ids. We no longer force double conversions for path output/input looping calls.🔴 3. Evaporation (Decay) Routines Built In:
Unlike the initial proposal which only deposited pheromones continuously leading to full network "lock-in," STAN actively includes 10% evaporation (
rho=0.1). I addedevaporate_pheromones(decay_rate=0.1)dropping paths uniformly, keeping learning strictly elastic.🔴 4. Pathfinding O(n^2) Scaling Fixed:$A^*$ states, segments are captured as raw
Instead of repeatedly deep copying path matrices through
(from, to, predicate, direction, cost, tau)dict instances insideheapq.🔴 5. Active Execution Engine (MCP Handlers):
This code is fully active, with two new endpoints injected directly into your
mcp_server.py:mempalace_kg_stigmergic_astar: Retrieves discounted route patterns.mempalace_kg_deposit_pheromone: Registers pheromones with an underlying modular tick constraint (evaporate operations trigger unconditionally at% 50 == 0internal MCP calls).Local Testing Completed 🟢:
Using rigorous unit tests natively extending MemPalace dependencies, we successfully mapped that route selections switch to longer graph distances accurately when underlying stigmergic weights reduce the calculation below base defaults without edge leaks.
(Replaces reverted Pull Request #259).