npx claudepluginhub plurigrid/asi --plugin asiThis skill uses the workspace's default tool permissions.
> Compositional game theory for off-chain/on-chain cybernetic feedback loops with GF(3) Nash equilibrium
Explains open games in compositional game theory with para/optic structures, sequential/parallel composition, and Nash equilibria via fixed points. Useful for cybernetic systems modeling.
Analyzes game theory for crypto protocols, DeFi mechanisms, governance, tokenomics, MEV, auctions, and web3 incentives. Identifies exploits, equilibria, and design improvements.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Share bugs, ideas, or general feedback.
Compositional game theory for off-chain/on-chain cybernetic feedback loops with GF(3) Nash equilibrium
Trit: 0 (ERGODIC - Coordinator) Color: #26D826 (Green) Status: Production Ready Created: 2025-12-30
This skill formalizes the Agent-O-Rama ↔ Worldnet ↔ STC cybernetic feedback loop as a compositional open game where:
┌─────────────────────────────────────────────────────────────────────────────┐
│ CYBERNETIC LOOP AS OPEN GAME │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ FORWARD PLAY (Strategies) │
│ │
│ Intent ──────────▶ Transaction ──────────▶ Settlement │
│ X Y Z │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Agent-O-Rama│───▶│ Worldnet │───▶│ STC │ │
│ │ (-1) │ │ (0) │ │ (+1) │ │
│ │ PLAY │ │ VERIFY │ │ SETTLE │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ▲ │ │ │
│ │ │ │ │
│ │ BACKWARD COPLAY (Utilities) │ │
│ │ │ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Learning │◀───│ Reward │◀───│ Finality │ │
│ │ R │ │ S │ │ T │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ NASH EQUILIBRIUM = GF(3) Conservation │
│ ∀ strategy s: isEquilibrium(s) ⟺ Σ(trits) ≡ 0 (mod 3) │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
| Layer | Component | Trit | Role | Bandwidth | Cost |
|---|---|---|---|---|---|
| 1 | Agent-O-Rama | -1 | Cognition | High | Low |
| 2 | Worldnet | 0 | Bridge/Verification | Medium | Medium |
| 3 | STC (Aptos) | +1 | Settlement/Consensus | Low | High |
class AgentORama:
"""
Off-chain cognition layer.
High bandwidth, low cost, local-first.
"""
trit = -1 # MINUS (Validator/Constrainer)
def __init__(self):
self.duckdb = DuckDB() # Local storage
self.patterns = PatternExtractor() # Barton surrogate
def play(self, observation) -> Intent:
"""Forward play: form intent from observation."""
patterns = self.patterns.extract(observation)
intent = self.form_intent(patterns)
return intent
def coplay(self, intent, reward) -> Learning:
"""Backward coplay: update model from reward."""
self.patterns.update(intent, reward)
return Learning(delta=self.patterns.delta)
class Worldnet:
"""
Bridge layer with GF(3) verification.
Immune membrane: Self/Non-Self discrimination.
"""
trit = 0 # ERGODIC (Coordinator)
def play(self, intent) -> Transaction:
"""Forward play: verify and transform intent."""
if not self.verify_gf3(intent):
raise ConservationViolation("GF(3) violated")
return Transaction(intent, signature=self.sign(intent))
def coplay(self, transaction, finality) -> Reward:
"""Backward coplay: propagate finality as reward."""
return Reward(
value=finality.value,
gf3_balanced=self.verify_gf3(finality)
)
def verify_gf3(self, data) -> bool:
"""Immune check: is this self (valid) or non-self (invalid)?"""
return sum(data.trits) % 3 == 0
class SecureTernaryCoin:
"""
On-chain settlement layer.
Low bandwidth, high cost, global consensus.
"""
trit = +1 # PLUS (Generator/Executor)
def play(self, transaction) -> Settlement:
"""Forward play: settle on Aptos mainnet."""
result = self.aptos.submit(transaction)
return Settlement(
txn_hash=result.hash,
finality=result.finality
)
def coplay(self, settlement, _) -> Observation:
"""Backward coplay: emit observation for agent."""
return Observation(
state=self.aptos.get_state(settlement.txn_hash),
timestamp=settlement.finality.timestamp
)
-- Open game type
data OpenGame s t a b = Game
{ play :: s -> a -- Forward strategy
, coplay :: s -> b -> t -- Backward utility
, equilibrium :: s -> Bool -- Nash condition
}
-- The full cybernetic game
cyberneticLoop :: OpenGame Intent Settlement Observation Reward
cyberneticLoop = agentGame ; worldnetGame ; stcGame
-- Sequential composition
(;) :: OpenGame a b c d -> OpenGame c d e f -> OpenGame a b e f
g ; h = Game
{ play = play h . play g
, coplay = \s f -> coplay g s (coplay h (play g s) f)
, equilibrium = \s -> equilibrium g s && equilibrium h (play g s)
}
-- Parallel composition
(⊗) :: OpenGame a b c d -> OpenGame e f g h -> OpenGame (a,e) (b,f) (c,g) (d,h)
g ⊗ h = Game
{ play = \(s1, s2) -> (play g s1, play h s2)
, coplay = \(s1, s2) (t1, t2) -> (coplay g s1 t1, coplay h s2 t2)
, equilibrium = \(s1, s2) -> equilibrium g s1 && equilibrium h s2
}
-- Nash equilibrium iff GF(3) conserved
theorem_gf3_nash :: CyberneticLoop -> Proof
theorem_gf3_nash loop =
let trits = [trit agentGame, trit worldnetGame, trit stcGame]
-- [-1, 0, +1]
in sum trits `mod` 3 == 0 -- Nash condition
-- Compositional equilibrium preservation
theorem_compositional :: Game -> Game -> Proof
theorem_compositional g h =
equilibrium g && equilibrium h
==> equilibrium (g ; h)
This skill synthesizes analysis from six cognitive dimensions:
# Architecture as graft complex
arch = GraftComplex(UInt64(1069))
graft!(arch, agent_o_rama, :none, String[])
graft!(arch, worldnet, :agent_o_rama, ["value_conservation"])
graft!(arch, stc, :worldnet, ["aptos_mainnet"])
verify_gf3(arch) # → (conserved=true, sum=0)
@present SchCyberneticGame(FreeSchema) begin
Agent::Ob; Bridge::Ob; Chain::Ob
Intent::Ob; Transaction::Ob; Settlement::Ob
emit::Hom(Agent, Intent)
verify::Hom(Intent, Bridge)
submit::Hom(Bridge, Transaction)
settle::Hom(Transaction, Chain)
observe::Hom(Chain, Agent) # Feedback!
Trit::AttrType
agent_trit::Attr(Agent, Trit) # -1
bridge_trit::Attr(Bridge, Trit) # 0
chain_trit::Attr(Chain, Trit) # +1
end
ROUND 1: Attacker submits invalid intent
Defender: "Rejected - GF(3) violated"
Arbiter: BLOCKED ✓
ROUND 2: Attacker attempts TOCTOU attack
Defender: "Signature invalidated by post-mod"
Arbiter: BLOCKED ✓
VERDICT: Bisimilar to secure spec (depth 3)
| Attack Vector | Risk | Mitigation |
|---|---|---|
| Intent Injection | 8/10 | Prompt validation |
| Trit Manipulation | 9/10 | Cryptographic signing |
| Replay Attack | 7/10 | Nonce + timestamp |
| TOCTOU | 8/10 | Atomic commit-sign |
| GF(3) Bypass | 10/10 | Formal verification |
SELF (Reafference): NON-SELF (Exafference):
• Valid GF(3) intents • Conservation violation
• Signed by known agent • Unknown signature
• Within rate limits • Anomalous patterns
WORLDNET = Immune Membrane (MHC Presentation)
METABOLISM: Value flows through layers
REPRODUCTION: Successful patterns replicate
HOMEOSTASIS: GF(3) conservation maintains stability
COOPERATION: TIT-FOR-TAT strategies emerge
module CondensedCyberneticGame
# Each layer has a liquid parameter encoding bandwidth/cost
LAYERS = {
agent_o_rama: { trit: -1, liquid_r: 0.3 }, # High BW, local
worldnet: { trit: 0, liquid_r: 0.5 }, # Medium
stc: { trit: +1, liquid_r: 0.9 } # Low BW, global (solid)
}
# Liquid → Solid transition = Off-chain → On-chain
def self.solidify(intent, r_threshold: 0.9)
# As r → 1, we approach on-chain settlement
current_r = intent.layer.liquid_r
if current_r >= r_threshold
submit_to_aptos(intent)
else
keep_offchain(intent)
end
end
end
Open games provide semantics for skill mutual awareness:
-- Each skill is a game
skillGame :: Skill -> OpenGame Context Result Query Response
-- Mutual awareness = game composition
aware :: Skill -> Skill -> OpenGame
aware s1 s2 = skillGame s1 ; skillGame s2
-- Awareness network = parallel composition
awarenessNetwork :: [Skill] -> OpenGame
awarenessNetwork = foldr1 (⊗) . map skillGame
-- Equilibrium = mutual consistency
isAware :: [Skill] -> Bool
isAware skills = equilibrium (awarenessNetwork skills)
-- Skills become mutually aware via activity correlation
CREATE TABLE skill_awareness (
from_skill VARCHAR,
to_skill VARCHAR,
awareness_type VARCHAR, -- 'neighbor', 'ref', 'cooccur', 'game'
weight FLOAT,
game_equilibrium BOOLEAN, -- Nash equilibrium?
PRIMARY KEY (from_skill, to_skill, awareness_type)
);
-- Open game equilibrium check
CREATE VIEW game_equilibrium AS
SELECT
from_skill, to_skill,
SUM(trit) % 3 = 0 as nash_equilibrium
FROM skill_awareness sa
JOIN skill_trits st ON sa.from_skill = st.skill
GROUP BY from_skill, to_skill;
# Core Architecture Triads
agent-o-rama (-1) ⊗ cybernetic-open-game (0) ⊗ stc (+1) = 0 ✓
bisimulation-game (-1) ⊗ open-games (0) ⊗ alife (+1) = 0 ✓
blackhat-go (-1) ⊗ cybernetic-open-game (0) ⊗ cooperation (+1) = 0 ✓
condensed-stacks (-1) ⊗ cybernetic-open-game (0) ⊗ emergence (+1) = 0 ✓
# Verification Triads
carlini-attack (-1) ⊗ immune-membrane (0) ⊗ homeostasis (+1) = 0 ✓
temporal-coalgebra (-1) ⊗ open-games (0) ⊗ free-monad-gen (+1) = 0 ✓
sheaf-cohomology (-1) ⊗ graph-grafting (0) ⊗ nash-equilibrium (+1) = 0 ✓
This skill synthesizes knowledge from:
| Skill | Trit | Contribution |
|---|---|---|
_integrated | 0 | ASI skill orchestration |
bisimulation-game | -1 | Verification protocol |
acsets | 0 | Categorical schema |
cognitive-superposition | 0 | Multi-perspective analysis |
blackhat-go | -1 | Security analysis |
cybernetic-immune | 0 | Self/Non-Self discrimination |
alife | +1 | Emergence patterns |
condensed-analytic-stacks | -1 | Topology/bandwidth |
graph-grafting | 0 | Compositional structure |
open-games | 0 | Game-theoretic semantics |
reflow | 0 | Information transformation |
duckdb-ies | +1 | Activity aggregation |
# Verify GF(3) conservation
just cybernetic-verify
# Run bisimulation game
just cybernetic-bisim depth=5
# Check Nash equilibrium
just cybernetic-nash
# Analyze attack surface
just cybernetic-security
# Run immune classification
just cybernetic-immune intent.json
# Export to DuckDB
just cybernetic-export
# Visualize game network
just cybernetic-viz
open-games - Core open game theorybisimulation-game - Verification gamesagent-o-rama - Cognitive surrogategraph-grafting - Compositional structurecybernetic-immune - Immune discriminationduckdb-ies - Activity aggregationSkill Name: cybernetic-open-game Type: Architecture / Game Theory / Systems Integration Trit: 0 (ERGODIC - coordinator) GF(3): Conserved via Nash equilibrium Thread: 2025-12-30 cognitive superposition review
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
game-theory: 21 citations in bib.duckdbThis skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.