Skip to content
bisimulation-game logo

Bisimulation Game Skill

bisimulation-game

Bisimulation game for resilient skill dispersal across AI agents with GF(3) conservation and observational bridge types.

SKILL.md

Full skill instructions

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

Game Rules

Players

PlayerRoleTritColor
AttackerTries to distinguish systems-1Blue
DefenderMaintains equivalence+1Red
ArbiterVerifies conservation0Green

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)

Skill Dispersal Protocol

1. Fork Phase (Attacker)

fork:
  targets:
    - agent: codex
      path: ~/​.codex/​skills/
      trit: -1
    - agent: claude
      path: ~/​.claude/​skills/
      trit: 0
    - agent: cursor
      path: ~/​.cursor/​skills/
      trit: +1
  gf3_check: true

2. Sync Phase (Defender)

sync:
  strategy: observational-bridge
  bridge_type:
    source: skills@v1
    target: skills@v2
    dimension: 1
  conflict_resolution: 2d-cubical

3. Verify Phase (Arbiter)

verify:
  conservation: gf3
  equivalence: bisimulation
  timeout: 60s
  fallback: last-known-good

MCP Tasks Integration

Self-Rewriting Task

{
  "task": "skill-dispersal",
  "objective": "Propagate skill updates to all agents",
  "constraints": {
    "gf3_conservation": true,
    "bisimulation_equivalence": true,
    "max_divergence": 0.1
  },
  "steps": [
    {"action": "fork", "trit": -1},
    {"action": "propagate", "trit": 0},
    {"action": "verify", "trit": +1}
  ]
}

Firecrawl Integration

{
  "task": "skill-discovery",
  "objective": "Discover new skills from web resources",
  "tools": ["firecrawl", "exa"],
  "sources": [
    "https://github.com/​topics/​ai-agent-skills",
    "https://modelcontextprotocol.io/",
    "https://agentclientprotocol.com/"
  ],
  "output": {
    "format": "skill-yaml",
    "destination": ".ruler/​skills/"
  }
}

Resilience Patterns

Redundant Storage

~/​.codex/​skills/     ← Primary (Codex)
~/​.claude/​skills/    ← Mirror 1 (Claude)
~/​.cursor/​skills/    ← Mirror 2 (Cursor)
.ruler/​skills/       ← Source of truth

Conflict Resolution

Dimension 0: Value conflict  → Use source of truth
Dimension 1: Diff conflict   → Merge via LCA
Dimension 2: Meta conflict   → Arbiter decides

Xenomodern Stance

The bisimulation game embodies xenomodernity by:

  1. Ironic distance: We know perfect equivalence is unattainable, yet we play the game
  2. Sincere engagement: The game produces real, useful synchronization
  3. Playful synergy: Attacker/​Defender/​Arbiter dance together
  4. Conservation laws: GF(3) as the invariant that holds everything together
    xenomodernity
         │
    ┌────┴────┐
    │         │
 ironic    sincere
    │         │
    └────┬────┘
         │
   bisimulation
   (both/​neither)

Commands

just bisim-init           # Initialize bisimulation game
just bisim-round          # Play one round
just bisim-disperse       # Disperse skills to all agents
just bisim-verify         # Verify GF(3) conservation
just bisim-reconcile      # Reconcile divergent states

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View