Command Palette

Search for a command to run...

Назад к скиллам
скилл № 20883

bisimulation-game

Bisimulation game for resilient skill dispersal across AI agents with

БесплатноБез исполняемых скриптов
plurigridот plurigrid★ 73 звезды на GitHub

Установить bisimulation-game в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Bisimulation Game Skill

"Two systems are bisimilar if they cannot be distinguished by any observation."

Overview

The bisimulation game provides a framework for:

  1. Resilient skill dispersal across multiple AI agents
  2. GF(3) conservation during state transitions
  3. Observational bridge types for version-aware synchronization
  4. 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
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bisimulation-game?

Bisimulation game for resilient skill dispersal across AI agents with

Как установить скилл bisimulation-game?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bisimulation-game запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bisimulation-game с