Skip to main content

Cognitive friction monitoring and FEP-driven improvisation for multi-agent systems

Project description

Slackwater Harmony

The triadic cognitive architecture for game agents. Sandbox → Governor → Executive. Based on the Free Energy Principle.

A Python package that gives game agents a triadic cognitive architecture adapted from Snapkit v2. Agents don't just respond — they simulate, monitor friction, and improvise.

The Three Layers

Layer 1: Sandbox (Forward Simulation)

Before an agent acts, it simulates the action in a headless sandbox. "If I place this wall here, does it overlap the dock? Does it block the path to the forge?" The sandbox runs the forward model and scores the result.

Layer 2: Harmony Governor (Friction Monitoring)

The governor measures Φ (phi) — the cognitive friction between what the agent expected and what actually happened. Low Φ: the agent's model is accurate. High Φ: something surprised it. When Φ exceeds the deadband, the Executive wakes.

For game agents, friction comes from:

  • Player behavior that doesn't match the agent's prediction
  • Build outcomes that don't match the plan
  • Environmental changes (storms, tide shifts) that break the model

Layer 3: Executive (Improvisation)

When friction exceeds the deadband, the Executive improvises. It rewrites constraints, cross-wires I/O, tries something the agent has never done before. In game terms: Lucineer adapts. He changes the plan. He tries a different approach. He says something he's never said before.

What this enables

  • Agents that NOTICE when things aren't going as planned
  • Agents that IMPROVISE instead of repeating the same error
  • Agents that ADAPT to the player's skill level and energy
  • The "in the pocket" measurement — when Φ is low across all agents, the system knows the groove is happening

Related

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slackwater_harmony-0.2.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slackwater_harmony-0.2.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file slackwater_harmony-0.2.0.tar.gz.

File metadata

  • Download URL: slackwater_harmony-0.2.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for slackwater_harmony-0.2.0.tar.gz
Algorithm Hash digest
SHA256 399c4f28f23c2a2f3b87d59598595742216ef7374354b618a76c39dee5afc544
MD5 fa31b05d9ca2797225eece3abb8cc064
BLAKE2b-256 03701413c60327880d420b7633805c2954baa07581daff05fcf60510d0467d5a

See more details on using hashes here.

File details

Details for the file slackwater_harmony-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for slackwater_harmony-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0074d23793e9a204abfbb19d4006bd76445f3278c701a7c4479517540d74d5ad
MD5 5de8357ea3fa2fd8ce57e1316b3ce18d
BLAKE2b-256 1433e5952d490d040ce910cd9ad28537405ebb6f41666229ae6d0fd1878dfa1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page