cargo
Rust package manager (36 subcommands).
parametrised-optics-cybernetics
Parametrised optics model cybernetic systems - dynamical systems steered by agents. ⊛ represents agency exerted on systems. Connects Para(C), lenses, open games, and PCT.
Full skill instructions
Status: Production Ready Trit: 0 (ERGODIC - mediates agent↔system) Color: #25D09C
"Parametrised optics model cybernetic systems, namely dynamical systems steered by one or more agents. Then ⊛ represents agency being exerted on systems." — Capucci, Gavranović et al.
┌─────────────────────────────────────┐
│ CYBERNETIC SYSTEM │
│ │
P ───┼──⊛──▶ S ────────▶ S' │
(params)│ (state) (next state) │
│ │ │
│ ▼ │
│ observation ◀── environment │
│ │ │
│ ▼ │
│ P' ◀─┘ (updated params) │
└─────────────────────────────────────┘
The actegory action ⊛ : P × S → S means:
-- Para(C) is the category of parametrised morphisms in C
data Para c a b where
Para :: c p () -> c (p, a) b -> Para c a b
-- Composition via tensor product of parameters
(>>>) :: Para c a b -> Para c b d -> Para c a d
Para p f >>> Para q g = Para (p ⊗ q) (f ; (id ⊗ g))
In Poly (polynomial functors):
Para(Poly) ≅ Lens -- parametrised polynomial = lens
get
S ────────▶ A (observation)
│ │
│ set │
◀───────────┘ (action)
S' ◀── (S, B)
A lens Lens S A has:
get : S → A — observe part of stateset : S × A → S — update state with new valueA parametrised lens PLens P S A:
get : P × S → A — observation depends on parametersset : P × S × A → S — action depends on parametersThe hierarchical control from Powers maps directly:
| PCT Level | Para/Optic | Role |
|---|---|---|
| Level 5: Program | Para policy | Agent's high-level goal |
| Level 4: Transition | Lens trajectory | Sequence patterns |
| Level 3: Configuration | Lens relationships | Relational state |
| Level 2: Sensation | Lens percept | Individual observations |
| Level 1: Intensity | Lens intensity | Raw signal strength |
-- Perceptual Control Theory as Para
pctController :: Para C Reference Perception
pctController = Para policy controlLoop
where
controlLoop (ref, percept) =
let error = ref - percept
action = gain * error
in applyAction action percept
Open games (Hedges) are parametrised optics for strategic interaction:
┌─────────────────┐
X ──┤ ├──▶ Y (play)
│ Open Game G │
R ◀─┤ │◀── S (coutility)
└─────────────────┘
An open game G : (X, S) → (Y, R) has:
X → Y (forward: strategy → outcome)X × S → R (backward: utility propagation)This is exactly a parametrised optic where:
-- Nash equilibrium = fixed point of best response
nashEquilibrium :: OpenGame X S Y R -> X -> Bool
nashEquilibrium game strategy =
bestResponse game strategy == strategy
The ALIEN simulation shows this structure:
┌─────────────────────────────────────────────────────────┐
│ NEURAL TOPOLOGY (center) │ MATRIX RAIN (right) │
│ ════════════════════════ │ ═══════════════════ │
│ │ │
│ ●───●───●───● │ Activity transcript │
│ │ ╲ │ ╱ │ ╲ │ │ = feedback signals │
│ ●───●───●───● ◀──P (params)│ = utility gradients │
│ │ ╱ │ ╲ │ ╱ │ │ = error propagation │
│ ●───●───●───● │ │
│ │ │ │
│ ▼ │ │
│ S (state) ──⊛──▶ S' │ │
│ │ │
└─────────────────────────────────────────────────────────┘
Given a monoidal category (M, ⊗, I) acting on C via ⊛:
ParaOptic M C (S, S') (A, A') = ∫^P M(I, P) × C(P ⊛ S, A) × C(P ⊛ A', S')
This coend captures:
P from the monoidal category MP ⊛ S → A (observation under parameters)P ⊛ A' → S' (update under parameters)An actegory is a category C with an action ⊛ : M × C → C satisfying:
I ⊛ X ≅ X (identity acts trivially)(P ⊗ Q) ⊛ X ≅ P ⊛ (Q ⊛ X) (associativity)Agency = choosing P to steer X.
open-games (-1) ⊗ parametrised-optics (0) ⊗ gay-mcp (+1) = 0 ✓
powers-pct (-1) ⊗ parametrised-optics (0) ⊗ alife (+1) = 0 ✓
lens-bidirectional (-1) ⊗ parametrised-optics (0) ⊗ active-inference (+1) = 0 ✓
{-# LANGUAGE GADTs #-}
-- Parametrised lens
data PLens p s a = PLens
{ pget :: p -> s -> a
, pset :: p -> s -> a -> s
}
-- Composition
(|.|) :: PLens p s a -> PLens p a b -> PLens p s b
(PLens g1 s1) |.| (PLens g2 s2) = PLens
{ pget = \p s -> g2 p (g1 p s)
, pset = \p s b -> s1 p s (s2 p (g1 p s) b)
}
-- Cybernetic control loop
controlLoop :: PLens Policy State Observation -> State -> State
controlLoop lens state =
let obs = pget lens policy state
err = reference - obs
action = gain * err
in pset lens policy state (obs + action)
using Catlab, Catlab.CategoricalAlgebra
# Schema for parametrised optic
@present SchParaOptic(FreeSchema) begin
Param::Ob
State::Ob
Obs::Ob
# Forward: P ⊛ S → A
forward::Hom(Param ⊗ State, Obs)
# Backward: P ⊛ A' → S'
backward::Hom(Param ⊗ Obs, State)
# Action composition
compose::Hom(Param ⊗ Param, Param)
end
@acset_type ParaOptic(SchParaOptic)
from dataclasses import dataclass
from typing import Callable, TypeVar
P, S, A, R = TypeVar('P'), TypeVar('S'), TypeVar('A'), TypeVar('R')
@dataclass
class OpenGame:
"""Parametrised optic for strategic interaction."""
play: Callable[[P, S], A] # Forward: strategy → outcome
coplay: Callable[[P, S, R], R] # Backward: utility propagation
def compose(self, other: 'OpenGame') -> 'OpenGame':
"""Sequential composition via ⊛."""
return OpenGame(
play=lambda p, s: other.play(p, self.play(p, s)),
coplay=lambda p, s, r: self.coplay(p, s, other.coplay(p, self.play(p, s), r))
)
def tensor(self, other: 'OpenGame') -> 'OpenGame':
"""Parallel composition via ⊗."""
return OpenGame(
play=lambda p, s: (self.play(p[0], s[0]), other.play(p[1], s[1])),
coplay=lambda p, s, r: (self.coplay(p[0], s[0], r[0]),
other.coplay(p[1], s[1], r[1]))
)
using Gay
# Seed for cybernetic color palette
gay_seed!(0xCYBER)
# Hierarchical control colors
CYBERNETIC_COLORS = Dict(
:agent => color_at(1), # Parameters
:system => color_at(2), # State
:forward => color_at(3), # Observation
:backward => color_at(4), # Utility/gradient
)
# ⊛ action visualization
function visualize_agency(params, state, action)
p_color = CYBERNETIC_COLORS[:agent]
s_color = CYBERNETIC_COLORS[:system]
# Blend represents ⊛ application
result_color = blend(p_color, s_color, action.intensity)
return result_color
end
| Skill | Trit | Connection |
|---|---|---|
open-games | -1 | Strategic optics |
glass-hopping | 0 | Bridge navigation |
cats-for-ai | 0 | CT for ML |
powers-pct | -1 | Hierarchical control |
active-inference | +1 | Free energy minimization |
alife | +1 | Agency in simulation |
Skill Name: parametrised-optics-cybernetics Type: Categorical Framework / Cybernetics Trit: 0 (ERGODIC - bridges agent and system) Key Operator: ⊛ (actegory action = agency) Structure: Para(C) with lenses and open games
The interaction IS the skill improving itself.
Every use of this skill is an opportunity for worlding:
Add Interaction Exemplars here as the skill is used.
Part of: para-mensch-commons.
Rust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience