bisimulation-game
БесплатноБез исполняемых скриптовНе проверенBisimulation game for resilient skill dispersal across AI agents with
от plurigrid★ 73 звезды на GitHubОб этом скилле
Bisimulation Game Skill
"Two systems are bisimilar if they cannot be distinguished by any observation."
Overview
The bisimulation game provides a framework for:
- Resilient skill dispersal across multiple AI agents
- GF(3) conservation during state transitions
- Observational bridge types for version-aware synchronization
- Self-rewriting capabilities via MCP Tasks protocol
Narya's isBisim Foundation
This skill implements the game-theoretic interpretation of Narya's isBisim coinductive type:
def isBisim (A B : Type) (R : A → B → Type) : Type ≔ codata [
| x .trr : A → B -- Attacker: transition A→B
| x .liftr : (a : A) → R a (x .trr a) -- Defender: lift preserves R
| x .trl : B → A -- Attacker: transition B→A
| x .liftl : (b : B) → R (x .trl b) b -- Defender: lift preserves R
| x .id.e -- Arbiter: higher coherence
: (a0 : A.0) (b0 : B.0) (r0 : R.0 a0 b0) (a1 : A.1) (b1 : B.1) (r1 : R.1 a1 b1)
→ isBisim (A.2 a0 a1) (B.2 b0 b1) (a2 b2 ↦ R.2 a0 a1 a2 b0 b1 b2 r0 r1) ]
Game-Theoretic Interpretation
| Narya Field | Game Role | Trit | Description |
|---|---|---|---|
.trr |
Attacker move | -1 | Forward transition challenge |
.liftr |
Defender response | +1 | Prove relation preserved |
.trl |
Attacker move | -1 | Backward transition challenge |
.liftl |
Defender response | +1 | Prove relation preserved |
.id.e |
Arbiter | 0 | Recursive coherence at identity types |
Univalence: If Defender can always respond → glue A B R Rb : Id Type A B
Game Rules
Players
| Player | Role | Trit | Color |
|---|---|---|---|
| Attacker | Tries to distinguish systems | -1 | Blue |
| Defender | Maintains equivalence | +1 | Red |
| Arbiter | Verifies conservation | 0 | Green |
Moves
┌─────────────────────────────────────────────────────────────┐
│ Round n: │
│ │
│ 1. Attacker chooses: system S₁ or S₂ │
│ 2. Attacker makes: transition s₁ →ᵃ s₁' │
│ 3. Defender responds: matching transition s₂ →ᵃ s₂' │
│ 4. Arbiter verifies: GF(3) conservation │
│ │
│ If Defender cannot respond → Attacker wins (distinguishable)│
│ If game continues forever → Defender wins (bisimilar) │
└─────────────────────────────────────────────────────────────┘
Implementation
Hy (DiscoHy) Implementation
;;; bisimulation_game.hy
(import [splitmix_ternary [SplitMixTernary]])
(defclass BisimulationGame []
(defn __init__ [self system1 system2 seed]
(setv self.s1 system1
self.s2 system2
self.rng (SplitMixTernary seed)
self.history []))
(defn attacker-move [self choice transition]
"Attacker chooses system and transition."
(setv trit (self.rng.next-ternary))
(.append self.history {:role "attacker"
:choice choice
:transition transition
:trit trit})
trit)
(defn defender-respond [self matching-transition]
"Defender provides matching transition."
(setv trit (self.rng.next-ternary))
(.append self.history {:role "defender"
:response matching-transition
:trit trit})
trit)
(defn arbiter-verify [self]
"Arbiter checks GF(3) conservation."
(setv recent-trits (lfor m (cut self.history -3 None) (get m "trit")))
(setv conserved (= (% (sum recent-trits) 3) 0))
(.append self.history {:role "arbiter" :conserved conserved :trit 0})
conserved))
DisCoPy Operad Interface
from discopy import *
# Game as operad
class GameOperad:
def __init__(self):
self.operations = {}
def register(self, name, dom, cod, rule):
"""Register game operation with GF(3) color."""
self.operations[name] = Rule(dom, cod, name)
def compose(self, op1, op2):
"""Compose operations preserving GF(3)."""
trit1 = self.operations[op1].trit
trit2 = self.operations[op2].trit
# Result trit balances to 0
result_trit = (-(trit1 + trit2)) % 3 - 1
return Rule(
self.operations[op1].dom,
self.operations[op2].cod,
f"{op1};{op2}",
trit=result_trit
)
# Define game operations
game = GameOperad()
game.register("attack", Ty("S1", "S2"), Ty("S1'"), lambda: -1)
game.register("defend", Ty("S1'"), Ty("S2'"), lambda: +1)
game.register("verify", Ty("S1'", "S2'"), Ty("Result"), lambda: 0)
Resilience Patterns
Redundant Storage
~/.codex/skills/ ← Primary (Codex)
~/.claude/skills/ ← Mirror 1 (Clau
Установить bisimulation-game в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл bisimulation-game?
Bisimulation game for resilient skill dispersal across AI agents with
Как установить скилл bisimulation-game?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bisimulation-game запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub