{
  "markdown": "<!-- mcp-name: io.github.Toby-Self/asymptotic-ethics -->\n# Asymptotic Ethics Model\n\nAn agent-based simulation testing whether a post-scarcity governance\nframework — built on Elinor Ostrom's commons-governance principles —\nactually holds up when implemented and adversarially stress-tested,\nrather than just argued for in theory. Includes a working MCP server that\nexposes the simulation as callable tools for AI agents, and a stateless\n\"governance primitive\" that lets an agent check whether a proposed action\ncomplies with the framework's rules, verified against the simulation's\nown logic rather than reimplemented from a description of it.\n\n**License:** Apache 2.0. **Core dependency:** [Mesa](https://mesa.readthedocs.io/) (agent-based modeling in Python).\n\n---\n\n## What makes this worth a look\n\nMost of what's genuinely worth reading here isn't the simulation's\nexistence — it's the discipline behind it. Every mechanism was built\nexpecting to find its own failure mode, and several real bugs, exploits,\nand false conclusions were caught and fixed as a direct result, not\nhidden after the fact:\n\n- A hard-threshold emergency-governance mechanic was found to produce\n  *permanent* crisis rule under default conditions (~70–90% of the time),\n  not occasional intervention — a concrete demonstration of a real AI\n  governance risk. It was redesigned around consent (a citizen vote)\n  rather than force, and the same pattern was later reused for\n  ecological limits and shared-resource conflicts.\n- Democratic policy voting was tested directly and found genuinely\n  vulnerable to capture: free-riding strategies, forming a numerical\n  majority, voted themselves into the most exploitable governance policy\n  — a real result, not a hypothetical concern about democracy.\n- A reputation-reward mechanism was found to let free-riders launder\n  unearned resources into status before being fixed; a barter-economy\n  value function was found to make trading a *strictly worse* strategy\n  than isolation before being fixed; an evolutionary fitness metric was\n  found to collapse an entire economy into monoculture before being fixed.\n- The \"governance primitive\" compliance rules are extracted verbatim from\n  the simulation's real decision logic and verified by capturing actual\n  votes and transfers from a live run — not just checked against\n  themselves, which would prove nothing.\n\nThe full record of every finding, bug, and fix — in the order it\nhappened — is in [`FINDINGS.md`](FINDINGS.md).\n\n---\n\n## Quick start\n\n```bash\npip install mesa pytest mcp networkx numpy\n```\n\n```python\nfrom asymptotic_ethics_model import AsymptoticEthicsModel\n\nm = AsymptoticEthicsModel(200, 8, seed=1, coupled_governance=True,\n                             rehabilitation_enabled=True, graduation_enabled=True)\nfor _ in range(300):\n    m.step()\n\ndf = m.datacollector.get_model_vars_dataframe()\ndf.tail(10)\n```\n\nRun the regression suite before trusting any change:\n\n```bash\npytest test_asymptotic_ethics_model.py -v\n```\n\nTo run the MCP server (exposes the simulation as tools for an MCP client\nlike Claude Desktop — see the header comment in\n`asymptotic_ethics_mcp_server.py` for exact client configuration):\n\n```bash\npython3 asymptotic_ethics_mcp_server.py\n```\n\n---\n\n## What's in this repo\n\n| file | what it is |\n|---|---|\n| `asymptotic_ethics_model.py` | The simulation itself — ~2,300 lines, ~132 opt-in parameters across 28 independent subsystems, all defaulted off to preserve baseline behavior. |\n| `asymptotic_ethics_mcp_server.py` | MCP server exposing the simulation as 9 callable tools: run/compare/sweep simulations, documentation lookup, test-suite execution, and governance compliance checks. |\n| `governance_compliance.py` | Three stateless compliance rules (emergency declaration, resource transfer, shared-site continuation), each extracted verbatim from the simulation's logic and verified against real captured simulation data. |\n| `reference_gateway.py` | A worked example of the *honest* way to consume the compliance rules — as one signal among several (auth, rate limiting, compliance) in a real decision, not as a security layer on its own. |\n| `test_asymptotic_ethics_model.py` | 13 persisted regression tests covering the load-bearing findings everything else depends on. |\n| `FINDINGS.md` | The full experimental record — every finding, bug, and fix, in order. |\n| `LICENSE` | Apache License 2.0. |\n\n---\n\n## Architecture\n\n- **`Citizen`** — behavioral strategy, `resources`, `reputation`,\n  `contribution`, relational `affinities`, `experience`. Pays\n  `effort_cost = contribution ** 2` unless `post_labor_economy_enabled`.\n- **`CommunityNode`** — governance policy, `care_load`, `crisis_severity`,\n  `emergency_declared`, plus (depending on which subsystems are enabled)\n  federated trust/reserves, latency/distance state, and the raw-material\n  economy's production and trade state.\n- **`SystemLedger`** — two genuinely separate roles: a migration-decision\n  helper, and `ship_raw_materials()`, which is **structurally blind** to\n  everything except raw material levels — verified by direct source\n  inspection in the test suite, not just claimed in a docstring.\n- **`AsymptoticEthicsModel`** — orchestrates every subsystem, all\n  opt-in, all defaulted to preserve original behavior when disabled.\n\nTwo full resource-allocation architectures exist side by side and are\ndirectly comparable: a centralized ledger, and a fully federated network\nof local commons using peer-to-peer trust-based negotiation — including\nunder simulated communication latency, relevant to any framing involving\ndistributed or off-world coordination.\n\n---\n\n## Honest scope\n\nThis is a stylized research simulation — scripted behavioral strategies,\nnot adaptive agents; no physical production; no real politics. It tests\nwhether a governance framework's internal logic holds together and\nsurfaces concrete, reproducible failure modes when you actually try to\nbreak it. It does not, and cannot, prove the framework would work if\nbuilt by real institutions with real humans in them. Read `FINDINGS.md`\nfor exactly what's been tested, what's been found broken and fixed, and\nwhat's still an open question.\n",
  "bytes": 6180,
  "sha": "9fe239098c9f0053767c19d38172287def11a74dbdfb7d0cbcf7124f282e8bf2",
  "repo_slug": "toby-self/asymptotic-ethics-model",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_toby_self_asymptotic_ethics_d7961b30/readme"
}